Skip to content

FileLoader

new FileLoader(manager?)

THREE equivalent: THREE.FileLoader

Loads raw files via fetch(). Supports text, JSON, and ArrayBuffer response types.

Method Description
setResponseType(type: string): this Sets the expected response type: ‘text’, ‘json’, or ‘arraybuffer’.
setMimeType(type: string): this Sets the MIME type sent as the Accept header.
load(url: string, onLoad?: Function, onProgress?: Function, onError?: Function): void Fetches the file and passes the result to onLoad.