How to use the FileLoader function from three
Find comprehensive JavaScript three.FileLoader code examples handpicked from public code repositorys.
18 19 20 21 22 23 24 25 26 27var scope = this; var path = (scope.path === '') ? THREE.LoaderUtils.extractUrlBase(url) : scope.path; var loader = new THREE.FileLoader(scope.manager); loader.setPath(scope.path); loader.load(url, function (text) { try {
+ 15 other calls in file
41 42 43 44 45 46 47 48 49var self = this; var path = ( self.path === undefined ) ? THREE.LoaderUtils.extractUrlBase( url ) : self.path; var loader = new THREE.FileLoader( this.manager ); loader.setResponseType( 'arraybuffer' ); loader.load( url, function ( buffer ) {
+ 21 other calls in file
GitHub: shinseed/BIMServer-NodeJs

7 8 9 10 11 12 13 14 15 16function ZipTools(path, vue) { this.zip = new JSZip(); this.vue = vue; this.fileLoader = new THREE.FileLoader(); this.fileLoader.setPath(path); this.fileLoader.setResponseType('arraybuffer'); this.zipContent = null;
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346this.primitiveCache = {}; this.textureLoader = new THREE.TextureLoader(this.options.manager); this.textureLoader.setCrossOrigin(this.options.crossOrigin); this.fileLoader = new THREE.FileLoader(this.options.manager); this.fileLoader.setResponseType("arraybuffer"); if (this.options.crossOrigin === "use-credentials") { this.fileLoader.setWithCredentials(true);
+ 29 other calls in file
110 111 112 113 114 115 116 117 118 119scope.manager.itemError( url ); scope.manager.itemEnd( url ); }; const loader = new THREE.FileLoader( this.manager ); loader.setPath( this.path ); loader.setResponseType( 'arraybuffer' ); loader.setRequestHeader( this.requestHeader ); loader.setWithCredentials( this.withCredentials );
+ 3 other calls in file
573 574 575 576 577 578 579 580 581 582/** * @param {string} src * @return {Promise} */ THREE.DRACOLoader._loadArrayBuffer = function (src) { var loader = new THREE.FileLoader(); loader.setResponseType("arraybuffer"); return new Promise(function (resolve, reject) { loader.load(src, resolve, undefined, reject); });
+ 29 other calls in file
GitHub: vinzdef/three-svg-loader

24 25 26 27 28 29 30 31 32 33load: function ( url, onLoad, onProgress, onError ) { var scope = this; var loader = new THREE.FileLoader( scope.manager ); loader.setPath( scope.path ); loader.load( url, function ( text ) { onLoad( scope.parse( text ) );
+ 5 other calls in file
62 63 64 65 66 67 68 69 70 71const jsLoader = new three_1.FileLoader(this.manager); jsLoader.setPath(this.transcoderPath); jsLoader.setWithCredentials(this.withCredentials); const jsContent = jsLoader.loadAsync('basis_transcoder.js'); // Load transcoder WASM binary. const binaryLoader = new three_1.FileLoader(this.manager); binaryLoader.setPath(this.transcoderPath); binaryLoader.setResponseType('arraybuffer'); binaryLoader.setWithCredentials(this.withCredentials); const binaryContent = binaryLoader.loadAsync('basis_transcoder.wasm');
+ 26 other calls in file
36 37 38 39 40 41 42 43 44 45* @param {THREE.LoadingManager} manager */ class MMDLoader extends three_1.Loader { constructor(manager) { super(manager); this.loader = new three_1.FileLoader(this.manager); this.parser = null; // lazy generation this.meshBuilder = new MeshBuilder(this.manager); this.animationBuilder = new AnimationBuilder(); }
+ 4 other calls in file
320 321 322 323 324 325 326 327 328 329const manager = new THREE.LoadingManager(function () { const zipped = fflate_module_1.zipSync(toZip, { level: 9 }); const blob = new Blob([zipped.buffer], { type: 'application/zip' }); save(blob, (title !== '' ? title : 'untitled') + '.zip'); }); const loader = new THREE.FileLoader(manager); loader.load('js/libs/app/index.html', function (content) { content = content.replace('<!-- title -->', title); const includes = []; content = content.replace('<!-- includes -->', includes.join('\n\t\t'));
+ 2 other calls in file
GitHub: alan-wu/ZincJS
6 7 8 9 10 11 12 13 14 15 16var Vector4 = THREE.Vector4; var Color = THREE.Color; var Vector2 = THREE.Vector2; var Face3 = require('../three/Geometry').Face3; var Geometry = require('../three/Geometry').Geometry; var FileLoader = THREE.FileLoader; var DefaultLoadingManager = THREE.DefaultLoadingManager; var VideoHandler = require('../videoHandler').VideoHandler; /**
+ 23 other calls in file
GitHub: star8ks/sketch
26 27 28 29 30 31 32 33 34 35url: './static/id.png', loader: THREE.TextureLoader }, { key: 'file-vs', url: './glsl/vert.glsl', loader: THREE.FileLoader }, { key: 'file-fs', url: './glsl/frag.glsl', loader: THREE.FileLoader
+ 3 other calls in file
713 714 715 716 717 718 719 720 721 722if (shader.extensions && shader.extensions[EXTENSIONS.KHR_BINARY_GLTF]) { return extensions[EXTENSIONS.KHR_BINARY_GLTF].loadShader(shader, dependencies.bufferViews); } return new Promise(function (resolve) { var loader = new THREE.FileLoader(options.manager); loader.setResponseType('text'); loader.load(resolveURL(shader.uri, options.path), function (shaderText) { resolve(shaderText); });
+ 29 other calls in file
GitHub: VeinKowal/veins
98 99 100 101 102 103 104 105 106 107scope.manager.itemError(url); scope.manager.itemEnd(url); }; var loader = new _three.FileLoader(this.manager); loader.setPath(this.path); loader.setResponseType('arraybuffer'); loader.setRequestHeader(this.requestHeader); loader.setWithCredentials(this.withCredentials);
+ 3 other calls in file
34 35 36 37 38 39 40 41 42 43 44}); }; prefLoader.setPath(PREFAB_PATH); // scene 数据加载器 const sceneLoader = new THREE.FileLoader(); sceneLoader.oldLoad = sceneLoader.load; sceneLoader.parse = (data) => JSON.parse(data); sceneLoader.load = function (path, callback) { sceneLoader.oldLoad(path, (data) => {
53 54 55 56 57 58 59 60 61 62var loader, cubeMapLoader, vert, frag, cubeMap, scene, renderer, camera, quad, _a, _b, _c; var _d, _e, _f; return __generator(this, function (_g) { switch (_g.label) { case 0: loader = new three_1.FileLoader(); cubeMapLoader = new three_1.CubeTextureLoader(); vert = loader.loadAsync("shaders/spheretracing/vert.3se"); frag = loader.loadAsync("shaders/spheretracing/frag.glsl"); cubeMap = cubeMapLoader
41 42 43 44 45 46 47 48 49 50var path = self.path === undefined ? THREE.LoaderUtils.extractUrlBase(url) : self.path; var loader = new THREE.FileLoader(this.manager); loader.setResponseType('arraybuffer'); loader.load( url,
GitHub: Indaym/ThreeJsAddons

21 22 23 24 25 26 27 28 29function OBJLoader2( manager ) { console.log( "Using THREE.OBJLoader2 version: " + OBJLOADER2_VERSION ); this.manager = Validator.verifyInput( manager, THREE.DefaultLoadingManager ); this.path = ''; this.fileLoader = new THREE.FileLoader( this.manager ); this.meshCreator = new MeshCreator(); this.parser = new Parser( this.meshCreator );
+ 3 other calls in file
three.Vector3 is the most popular function in three (22341 examples)

