Skip to content

Commit ca85e3a

Browse files
committed
Loader: Improved loadTexture.
1 parent bb982de commit ca85e3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/loaders/Loader.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ THREE.Loader.prototype = {
7676

7777
if ( repeat !== undefined ) {
7878

79-
texture.repeat.set( repeat[ 0 ], repeat[ 1 ] );
79+
texture.repeat.fromArray( repeat );
8080

81-
if ( repeat[ 0 ] > 1 ) texture.wrapS = THREE.RepeatWrapping;
82-
if ( repeat[ 1 ] > 1 ) texture.wrapT = THREE.RepeatWrapping;
81+
if ( repeat[ 0 ] !== 1 ) texture.wrapS = THREE.RepeatWrapping;
82+
if ( repeat[ 1 ] !== 1 ) texture.wrapT = THREE.RepeatWrapping;
8383

8484
}
8585

8686
if ( offset !== undefined ) {
8787

88-
texture.offset.set( offset[ 0 ], offset[ 1 ] );
88+
texture.offset.fromArray( offset );
8989

9090
}
9191

0 commit comments

Comments
 (0)