Download node_modules/three/src/loaders/Loader.js from SimWorld-AI/industrial-harbor-viewer: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/loaders/Loader.js
- Command line
-
hf download hf://spaces/SimWorld-AI/industrial-harbor-viewer/node_modules/three/src/loaders/Loader.js
-
curl -L -o Loader.js https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/loaders/Loader.js
1.06 kB
| import { DefaultLoadingManager } from './LoadingManager.js'; | |
| class Loader { | |
| constructor( manager ) { | |
| this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; | |
| this.crossOrigin = 'anonymous'; | |
| this.withCredentials = false; | |
| this.path = ''; | |
| this.resourcePath = ''; | |
| this.requestHeader = {}; | |
| } | |
| load( /* url, onLoad, onProgress, onError */ ) {} | |
| loadAsync( url, onProgress ) { | |
| const scope = this; | |
| return new Promise( function ( resolve, reject ) { | |
| scope.load( url, resolve, onProgress, reject ); | |
| } ); | |
| } | |
| parse( /* data */ ) {} | |
| setCrossOrigin( crossOrigin ) { | |
| this.crossOrigin = crossOrigin; | |
| return this; | |
| } | |
| setWithCredentials( value ) { | |
| this.withCredentials = value; | |
| return this; | |
| } | |
| setPath( path ) { | |
| this.path = path; | |
| return this; | |
| } | |
| setResourcePath( resourcePath ) { | |
| this.resourcePath = resourcePath; | |
| return this; | |
| } | |
| setRequestHeader( requestHeader ) { | |
| this.requestHeader = requestHeader; | |
| return this; | |
| } | |
| } | |
| Loader.DEFAULT_MATERIAL_NAME = '__DEFAULT'; | |
| export { Loader }; | |