Whenever I try changing the color of my TextSprite, the code either breaks or the text vanishes. What's the right way to change the color?
Specifically, I have the following sprite:
reinforcementErrorSprite = new THREE.TextSprite({
text: percentCorrect + "%",
alignment: 'left',
// fontFamily: 'Arial, Helvetica, sans-serif',
fontSize: 0.51,
fontStyle: 'bold',
color: '#ec1b27',
});
When I try reinforcementErrorSprite.color = '<hex string>', the text vanishes. When I try reinforcementErrorSprite.color = new THREE.Color(<r, g, b>), the text vanishes. What's the right way to set the color?
Thanks in advance!
Whenever I try changing the color of my TextSprite, the code either breaks or the text vanishes. What's the right way to change the color?
Specifically, I have the following sprite:
When I try
reinforcementErrorSprite.color = '<hex string>', the text vanishes. When I tryreinforcementErrorSprite.color = new THREE.Color(<r, g, b>), the text vanishes. What's the right way to set the color?Thanks in advance!