未验证 提交 e848b24a 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #14892 from 06wj/patch0

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
</p>
......@@ -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>
<p>
......
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册