|
@@ -3,6 +3,7 @@ import { UVMapping } from '../constants';
|
|
import { MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping, LinearEncoding, UnsignedByteType, RGBAFormat, LinearMipMapLinearFilter, LinearFilter } from '../constants';
|
|
import { MirroredRepeatWrapping, ClampToEdgeWrapping, RepeatWrapping, LinearEncoding, UnsignedByteType, RGBAFormat, LinearMipMapLinearFilter, LinearFilter } from '../constants';
|
|
import { _Math } from '../math/Math';
|
|
import { _Math } from '../math/Math';
|
|
import { Vector2 } from '../math/Vector2';
|
|
import { Vector2 } from '../math/Vector2';
|
|
|
|
+import { Matrix3 } from '../math/Matrix3';
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author mrdoob / http://mrdoob.com/
|
|
@@ -38,8 +39,9 @@ function Texture( image, mapping, wrapS, wrapT, magFilter, minFilter, format, ty
|
|
|
|
|
|
this.offset = new Vector2( 0, 0 );
|
|
this.offset = new Vector2( 0, 0 );
|
|
this.repeat = new Vector2( 1, 1 );
|
|
this.repeat = new Vector2( 1, 1 );
|
|
- this.rotation = 0;
|
|
|
|
- this.center = new Vector2( 0, 0 );
|
|
|
|
|
|
+
|
|
|
|
+ this.matrixAutoUpdate = true;
|
|
|
|
+ this.matrix = new Matrix3();
|
|
|
|
|
|
this.generateMipmaps = true;
|
|
this.generateMipmaps = true;
|
|
this.premultiplyAlpha = false;
|
|
this.premultiplyAlpha = false;
|
|
@@ -104,8 +106,9 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
|
|
|
|
|
|
this.offset.copy( source.offset );
|
|
this.offset.copy( source.offset );
|
|
this.repeat.copy( source.repeat );
|
|
this.repeat.copy( source.repeat );
|
|
- this.rotation = source.rotation;
|
|
|
|
- this.center.copy( source.center );
|
|
|
|
|
|
+
|
|
|
|
+ this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
|
|
+ this.matrix.copy( source.matrix );
|
|
|
|
|
|
this.generateMipmaps = source.generateMipmaps;
|
|
this.generateMipmaps = source.generateMipmaps;
|
|
this.premultiplyAlpha = source.premultiplyAlpha;
|
|
this.premultiplyAlpha = source.premultiplyAlpha;
|
|
@@ -179,8 +182,10 @@ Object.assign( Texture.prototype, EventDispatcher.prototype, {
|
|
|
|
|
|
repeat: [ this.repeat.x, this.repeat.y ],
|
|
repeat: [ this.repeat.x, this.repeat.y ],
|
|
offset: [ this.offset.x, this.offset.y ],
|
|
offset: [ this.offset.x, this.offset.y ],
|
|
- rotation: this.rotation,
|
|
|
|
- center: [ this.center.x, this.center.y ],
|
|
|
|
|
|
+
|
|
|
|
+ matrixAutoUpdate: this.matrixAutoUpdate,
|
|
|
|
+ matrix: this.matrix.toArray(),
|
|
|
|
+
|
|
wrap: [ this.wrapS, this.wrapT ],
|
|
wrap: [ this.wrapS, this.wrapT ],
|
|
|
|
|
|
minFilter: this.minFilter,
|
|
minFilter: this.minFilter,
|