Fix CanvasRenderer sprite.raycast bug
@@ -23,6 +23,7 @@
parameters is an object that can be used to set up the default properties
</p>
<p>
+ rotation - the rotation of the sprite<br/>
color - the color of the sprite<br/>
program - the program used to draw the sprite
@@ -30,7 +31,10 @@
<h2>Properties</h2>
-
+ <h3>[property:Radians rotation]</h3>
+ <p>
+ The rotation of the sprite in radians. Default is 0.
+ </p>
<h3>[property:Color color]</h3>
@@ -7,7 +7,7 @@ THREE.SpriteCanvasMaterial = function ( parameters ) {
THREE.Material.call( this );
this.type = 'SpriteCanvasMaterial';
+ this.rotation = 0;
this.color = new THREE.Color( 0xffffff );
this.program = function () {};
@@ -878,6 +878,7 @@ THREE.Projector = function () {
} else if ( object instanceof THREE.Sprite ) {
+ object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
_vector4.set( _modelMatrix.elements[ 12 ], _modelMatrix.elements[ 13 ], _modelMatrix.elements[ 14 ], 1 );
_vector4.applyMatrix4( _viewProjectionMatrix );