|
@@ -388,19 +388,22 @@ Object.assign( THREE.ObjectLoader.prototype, {
|
|
|
texture.uuid = data.uuid;
|
|
|
|
|
|
if ( data.name !== undefined ) texture.name = data.name;
|
|
|
+
|
|
|
if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping );
|
|
|
- if ( data.offset !== undefined ) texture.offset = new THREE.Vector2( data.offset[ 0 ], data.offset[ 1 ] );
|
|
|
- if ( data.repeat !== undefined ) texture.repeat = new THREE.Vector2( data.repeat[ 0 ], data.repeat[ 1 ] );
|
|
|
- if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter );
|
|
|
- if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter );
|
|
|
- if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;
|
|
|
- if ( Array.isArray( data.wrap ) ) {
|
|
|
+
|
|
|
+ if ( data.offset !== undefined ) texture.offset.fromArray( data.offset );
|
|
|
+ if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );
|
|
|
+ if ( data.wrap !== undefined ) {
|
|
|
|
|
|
texture.wrapS = parseConstant( data.wrap[ 0 ] );
|
|
|
texture.wrapT = parseConstant( data.wrap[ 1 ] );
|
|
|
|
|
|
}
|
|
|
|
|
|
+ if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter );
|
|
|
+ if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter );
|
|
|
+ if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;
|
|
|
+
|
|
|
if ( data.flipY !== undefined ) texture.flipY = data.flipY;
|
|
|
|
|
|
textures[ data.uuid ] = texture;
|