提交 35b2609f 编写于 作者: M Mr.doob

Moved Sprite.rotation to SpriteMaterial.rotation.

上级 d0171efd
......@@ -178,7 +178,7 @@
}
sprite.rotation += 0.1 * ( c / group.children.length );
sprite.material.rotation += 0.1 * ( c / group.children.length );
sprite.scale.set( scale * imageWidth, scale * imageHeight, 1.0 );
if ( material.map !== mapC )
......
......@@ -238,7 +238,7 @@ THREE.SpritePlugin = function () {
_gl.uniform1f( uniforms.opacity, material.opacity );
_gl.uniform3f( uniforms.color, material.color.r, material.color.g, material.color.b );
_gl.uniform1f( uniforms.rotation, sprite.rotation );
_gl.uniform1f( uniforms.rotation, material.rotation );
_gl.uniform2fv( uniforms.scale, scale );
_gl.uniform2f( uniforms.halfViewport, halfViewportWidth, halfViewportHeight );
......
......@@ -34,6 +34,7 @@ THREE.SpriteMaterial = function ( parameters ) {
this.depthTest = !this.useScreenCoordinates;
this.sizeAttenuation = !this.useScreenCoordinates;
this.alignment = THREE.SpriteAlignment.center.clone();
this.rotation = 0;
this.fog = false;
......
......@@ -9,8 +9,6 @@ THREE.Sprite = function ( material ) {
this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
this.rotation = 0;
};
THREE.Sprite.prototype = Object.create( THREE.Object3D.prototype );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册