I am using CSS2D to display text labels as in the official example and it works OK.
Now I want to perform a one-off rotation of some of the labels in the viewing plane.
I have tried applying a CSS transform to the div before making a CSS2DObject out of the div.
But it doesnt seem to be working (the labels are still horizontal).
Here is my code (for a single label):-
var myDiv = document.createElement( 'div' );
myDiv.className = className;
myDiv.textContent = labelStr;
myDiv.style.marginTop = '-1em';
var degrees = 45;
/* *** These do not work ***
myDiv.style.webkitTransform = 'rotate('+degrees+'deg)';
myDiv.style.mozTransform = 'rotate('+degrees+'deg)';
myDiv.style.msTransform = 'rotate('+degrees+'deg)';
myDiv.style.oTransform = 'rotate('+degrees+'deg)';
myDiv.style.transform = 'rotate('+degrees+'deg)';
*/
var myLabel = new CSS2DObject( myDiv );
myLabel.position.set( dX, dY, dZ );
//myLabel.rotateZ( degrees * Math.PI/180 ); //... *** Does not work ***
scene.add( myLabel );
I'd be grateful for any suggestions!
