提交 dd1f7977 编写于 作者: M Mr.doob

Updated builds.

上级 d07e76d0
......@@ -30530,6 +30530,7 @@
this.setURLModifier = function ( transform ) {
urlModifier = transform;
return this;
};
......@@ -34050,6 +34051,50 @@
} );
/**
* @author Don McCurdy / https://www.donmccurdy.com
*/
var LoaderUtils = {
decodeText: function ( array ) {
if ( typeof TextDecoder !== 'undefined' ) {
return new TextDecoder().decode( array );
}
// Avoid the String.fromCharCode.apply(null, array) shortcut, which
// throws a "maximum call stack size exceeded" error for large arrays.
var s = '';
for ( var i = 0, il = array.length; i < il; i ++ ) {
// Implicitly assumes little-endian.
s += String.fromCharCode( array[ i ] );
}
return s;
},
extractUrlBase: function ( url ) {
var parts = url.split( '/' );
if ( parts.length === 1 ) return './';
parts.pop();
return parts.join( '/' ) + '/';
}
};
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
......@@ -34076,7 +34121,7 @@
var scope = this;
var texturePath = this.texturePath && ( typeof this.texturePath === "string" ) ? this.texturePath : Loader.prototype.extractUrlBase( url );
var texturePath = this.texturePath && ( typeof this.texturePath === 'string' ) ? this.texturePath : LoaderUtils.extractUrlBase( url );
var loader = new FileLoader( this.manager );
loader.setWithCredentials( this.withCredentials );
......@@ -37249,50 +37294,6 @@
} );
/**
* @author Don McCurdy / https://www.donmccurdy.com
*/
var LoaderUtils = {
decodeText: function ( array ) {
if ( typeof TextDecoder !== 'undefined' ) {
return new TextDecoder().decode( array );
}
// Avoid the String.fromCharCode.apply(null, array) shortcut, which
// throws a "maximum call stack size exceeded" error for large arrays.
var s = '';
for ( var i = 0, il = array.length; i < il; i ++ ) {
// Implicitly assumes little-endian.
s += String.fromCharCode( array[ i ] );
}
return s;
},
extractUrlBase: function ( url ) {
var parts = url.split( '/' );
if ( parts.length === 1 ) return './';
parts.pop();
return parts.join( '/' ) + '/';
}
};
/**
* @author mrdoob / http://mrdoob.com/
*/
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -30524,6 +30524,7 @@ function LoadingManager( onLoad, onProgress, onError ) {
this.setURLModifier = function ( transform ) {
urlModifier = transform;
return this;
};
......@@ -34044,6 +34045,50 @@ Object.assign( Loader.prototype, {
} );
/**
* @author Don McCurdy / https://www.donmccurdy.com
*/
var LoaderUtils = {
decodeText: function ( array ) {
if ( typeof TextDecoder !== 'undefined' ) {
return new TextDecoder().decode( array );
}
// Avoid the String.fromCharCode.apply(null, array) shortcut, which
// throws a "maximum call stack size exceeded" error for large arrays.
var s = '';
for ( var i = 0, il = array.length; i < il; i ++ ) {
// Implicitly assumes little-endian.
s += String.fromCharCode( array[ i ] );
}
return s;
},
extractUrlBase: function ( url ) {
var parts = url.split( '/' );
if ( parts.length === 1 ) return './';
parts.pop();
return parts.join( '/' ) + '/';
}
};
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
......@@ -34070,7 +34115,7 @@ Object.assign( JSONLoader.prototype, {
var scope = this;
var texturePath = this.texturePath && ( typeof this.texturePath === "string" ) ? this.texturePath : Loader.prototype.extractUrlBase( url );
var texturePath = this.texturePath && ( typeof this.texturePath === 'string' ) ? this.texturePath : LoaderUtils.extractUrlBase( url );
var loader = new FileLoader( this.manager );
loader.setWithCredentials( this.withCredentials );
......@@ -37243,50 +37288,6 @@ Object.assign( FontLoader.prototype, {
} );
/**
* @author Don McCurdy / https://www.donmccurdy.com
*/
var LoaderUtils = {
decodeText: function ( array ) {
if ( typeof TextDecoder !== 'undefined' ) {
return new TextDecoder().decode( array );
}
// Avoid the String.fromCharCode.apply(null, array) shortcut, which
// throws a "maximum call stack size exceeded" error for large arrays.
var s = '';
for ( var i = 0, il = array.length; i < il; i ++ ) {
// Implicitly assumes little-endian.
s += String.fromCharCode( array[ i ] );
}
return s;
},
extractUrlBase: function ( url ) {
var parts = url.split( '/' );
if ( parts.length === 1 ) return './';
parts.pop();
return parts.join( '/' ) + '/';
}
};
/**
* @author mrdoob / http://mrdoob.com/
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册