提交 854e16c1 编写于 作者: T Tentone

Texture center serialization, copy and documentation

上级 6d743fb0
......@@ -149,7 +149,12 @@
<h3>[property:number rotation]</h3>
<div>
How much the texture is rotated around the center point ( 0.5, 0.5 ), in radians. Postive values are counter-clockwise. Default is *0*.
How much the texture is rotated around the center point, in radians. Postive values are counter-clockwise. Default is *0*.
</div>
<h3>[property:Vector2 center]</h3>
<div>
Indicates where the center of rotation is. To rotate around the center point set this value to (0.5, 0.5). Default value is (0.0, 0.0).
</div>
<h3>[property:boolean matrixAutoUpdate]</h3>
......
......@@ -496,6 +496,7 @@ Object.assign( ObjectLoader.prototype, {
if ( data.offset !== undefined ) texture.offset.fromArray( data.offset );
if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );
if ( data.center !== undefined ) texture.center.fromArray( data.center );
if ( data.rotation !== undefined ) texture.rotation = data.rotation;
if ( data.wrap !== undefined ) {
......
......@@ -108,6 +108,7 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
this.offset.copy( source.offset );
this.repeat.copy( source.repeat );
this.center.copy( source.center );
this.rotation = source.rotation;
this.matrixAutoUpdate = source.matrixAutoUpdate;
......@@ -185,6 +186,7 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
repeat: [ this.repeat.x, this.repeat.y ],
offset: [ this.offset.x, this.offset.y ],
center: [ this.center.x, this.center.y ],
rotation: this.rotation,
wrap: [ this.wrapS, this.wrapT ],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册