Import
DRACOLoader is an addon, and must be imported explicitly, see Installation#Addons.
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
Constructor
new DRACOLoader( manager : LoadingManager )
Constructs a new Draco loader.
| manager |
The loading manager. |
Methods
.load( url : string, onLoad : function, onProgress : onProgressCallback, onError : onErrorCallback )
Starts loading from the given URL and passes the loaded Draco asset
to the onLoad() callback.
| url |
The path/URL of the file to be loaded. This can also be a data URI. |
| onLoad |
Executed when the loading process has been finished. |
| onProgress |
Executed while the loading is in progress. |
| onError |
Executed when errors occur. |
- Overrides: Loader#load
.parse( buffer : ArrayBuffer, onLoad : function, onError : onErrorCallback )
Parses the given Draco data.
| buffer |
The raw Draco data as an array buffer. |
| onLoad |
Executed when the loading/parsing process has been finished. |
| onError |
Executed when errors occur. |
- Overrides: Loader#parse
.setDecoderConfig( config : Object ) : DRACOLoader
Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins.
| config |
The decoder config. |
- Returns: A reference to this loader.
.setDecoderPath( path : string ) : DRACOLoader
Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins.
| path |
The decoder path. |
- Returns: A reference to this loader.
.setWorkerLimit( workerLimit : number ) : DRACOLoader
Sets the maximum number of Web Workers to be used during decoding. A lower limit may be preferable if workers are also for other tasks in the application.
| workerLimit |
The worker limit. |
- Returns: A reference to this loader.