|
@@ -160,9 +160,9 @@ var GLTFLoader = ( function () {
|
|
loader.setPath( this.path );
|
|
loader.setPath( this.path );
|
|
loader.setResponseType( 'arraybuffer' );
|
|
loader.setResponseType( 'arraybuffer' );
|
|
|
|
|
|
- if ( scope.crossOrigin === 'use-credentials' ) {
|
|
|
|
|
|
+ if ( this.options.crossOrigin === 'use-credentials' ) {
|
|
|
|
|
|
- loader.setWithCredentials( true );
|
|
|
|
|
|
+ this.fileLoader.setWithCredentials( true );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2973,52 +2973,12 @@ var GLTFLoader = ( function () {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- var outputArray = outputAccessor.array;
|
|
|
|
-
|
|
|
|
- if ( outputAccessor.normalized ) {
|
|
|
|
-
|
|
|
|
- var scale;
|
|
|
|
-
|
|
|
|
- if ( outputArray.constructor === Int8Array ) {
|
|
|
|
-
|
|
|
|
- scale = 1 / 127;
|
|
|
|
-
|
|
|
|
- } else if ( outputArray.constructor === Uint8Array ) {
|
|
|
|
-
|
|
|
|
- scale = 1 / 255;
|
|
|
|
-
|
|
|
|
- } else if ( outputArray.constructor == Int16Array ) {
|
|
|
|
-
|
|
|
|
- scale = 1 / 32767;
|
|
|
|
-
|
|
|
|
- } else if ( outputArray.constructor === Uint16Array ) {
|
|
|
|
-
|
|
|
|
- scale = 1 / 65535;
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
-
|
|
|
|
- throw new Error( 'THREE.GLTFLoader: Unsupported output accessor component type.' );
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var scaled = new Float32Array( outputArray.length );
|
|
|
|
-
|
|
|
|
- for ( var j = 0, jl = outputArray.length; j < jl; j ++ ) {
|
|
|
|
-
|
|
|
|
- scaled[j] = outputArray[j] * scale;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- outputArray = scaled;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
for ( var j = 0, jl = targetNames.length; j < jl; j ++ ) {
|
|
for ( var j = 0, jl = targetNames.length; j < jl; j ++ ) {
|
|
|
|
|
|
var track = new TypedKeyframeTrack(
|
|
var track = new TypedKeyframeTrack(
|
|
targetNames[ j ] + '.' + PATH_PROPERTIES[ target.path ],
|
|
targetNames[ j ] + '.' + PATH_PROPERTIES[ target.path ],
|
|
inputAccessor.array,
|
|
inputAccessor.array,
|
|
- outputArray,
|
|
|
|
|
|
+ outputAccessor.array,
|
|
interpolation
|
|
interpolation
|
|
);
|
|
);
|
|
|
|
|