How to use the Loader function from three
Find comprehensive JavaScript three.Loader code examples handpicked from public code repositorys.
54 55 56 57 58 59 60 61 62 63
*/ } load ( url, rootPath, assetMap, rootName, rootFileExt ) { const baseURL = THREE.Loader.prototype.extractUrlBase(url); return new Promise((resolve, reject) => { const manager = new THREE.LoadingManager();
4 5 6 7 8 9 10 11 12 13
* @author Mugen87 / https://github.com/Mugen87 */ THREE.ColladaLoader = function (manager) { THREE.Loader.call(this, manager); }; THREE.ColladaLoader.prototype = Object.assign(Object.create(THREE.Loader.prototype), {
+ 15 other calls in file
GitHub: 52black/scratch-vm
559 560 561 562 563 564 565 566 567
}, loadTexture: function ( url, mapping, onLoad, onProgress, onError ) { var texture; var loader = THREE.Loader.Handlers.get( url ); var manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager; if ( loader === null ) {
+ 18 other calls in file
GitHub: vinzdef/three-svg-loader
![vinzdef profile picture](/vinzdef.png?size=40)
9 10 11 12 13 14 15 16 17 18
/* three-svg-loader mod */ var THREE = require('three') var SVGLoader = function ( manager ) { THREE.Loader.call( this, manager ); }; /* three-svg-loader mod */
+ 11 other calls in file
18 19 20 21 22 23 24 25 26 27
this.withCredentials = false; } LegacyJSONLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), { constructor: LegacyJSONLoader, load: function ( url, onLoad, onProgress, onError ) {
+ 15 other calls in file
476 477 478 479 480 481 482 483 484
}, loadTexture: function loadTexture(url, mapping, onLoad, onProgress, onError) { var texture = void 0; var loader = THREE.Loader.Handlers.get(url); var manager = this.manager !== undefined ? this.manager : THREE.DefaultLoadingManager; if (loader === null) {
517 518 519 520 521 522 523 524 525
}, loadTexture: function ( url, mapping, onLoad, onProgress, onError ) { let texture; let loader = THREE.Loader.Handlers.get( url ); let manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager; if ( loader === null ) {
+ 21 other calls in file
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877
return Promise.resolve( sourceURI ).then( function ( sourceURI ) { // Load Texture resource. var loader = THREE.Loader.Handlers.get( sourceURI ); if ( ! loader ) { loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
+ 8 other calls in file
248 249 250 251 252 253 254 255 256 257
} else { if (THREE.Loader.Handlers.get('.tga') === null) { var tgaLoader = new THREE.TGALoader(); tgaLoader.setPath(this.textureLoader.path); THREE.Loader.Handlers.add(/\.tga$/i, tgaLoader); } type = 'image/tga'; break;
three.Vector3 is the most popular function in three (22341 examples)