GLTFLoader

THREE.GLTFLoader
class GLTFLoader(manager: UndefOr[LoadingManager]) extends Object

A loader for loading GLTF resources. The .gltf and .glb file extensions are supported.

Attributes

Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def load(url: String, onLoad: Function1[GLTFResult, Unit], onProgress: Function3[Any, Int, Int, Unit], onError: Function1[Error, Unit]): Unit

Loads a GLTF resource from a URL with callback-style API.

Loads a GLTF resource from a URL with callback-style API.

Attributes

def loadAsync(url: String, onProgress: UndefOr[Function3[Any, Int, Int, Unit]]): Promise[GLTFResult]

Loads a GLTF resource from a URL asynchronously.

Loads a GLTF resource from a URL asynchronously.

Attributes

def parse(data: String | ArrayBuffer, path: String, onLoad: Function1[GLTFResult, Unit], onError: Function1[Error, Unit]): Unit

Parses a GLTF JSON string and returns the result.

Parses a GLTF JSON string and returns the result.

Attributes

def parseAsync(data: String | ArrayBuffer, path: String): Promise[GLTFResult]

Parses a GLTF JSON string asynchronously and returns the result.

Parses a GLTF JSON string asynchronously and returns the result.

Attributes

def setCrossOrigin(value: String): this.type

Sets the crossOrigin string to implement CORS.

Sets the crossOrigin string to implement CORS.

Attributes

def setDRACOLoader(dracoLoader: Object): this.type

Sets the Draco loader to use for decompressing Draco compressed geometry.

Sets the Draco loader to use for decompressing Draco compressed geometry.

Attributes

def setKTX2Loader(ktx2Loader: Object): this.type

Sets the KTX2 loader to use for loading KTX2 compressed textures.

Sets the KTX2 loader to use for loading KTX2 compressed textures.

Attributes

def setMeshoptDecoder(meshoptDecoder: Object): this.type

Sets the meshopt decoder to use for decompressing meshopt compressed geometry.

Sets the meshopt decoder to use for decompressing meshopt compressed geometry.

Attributes

def setPath(path: String): this.type

Sets the base path for resolving references.

Sets the base path for resolving references.

Attributes

def setRequestHeader(value: Dictionary[String]): this.type

Sets the request headers to use when fetching resources.

Sets the request headers to use when fetching resources.

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

var crossOrigin: String

The crossOrigin string to implement CORS for loading the url.

The crossOrigin string to implement CORS for loading the url.

Attributes

var dracoLoader: UndefOr[Object]

Whether the .gltf loader should output more verbose messages.

Whether the .gltf loader should output more verbose messages.

Attributes

var ktx2Loader: UndefOr[Object]

A loader to be used for loading KTX2 textures.

A loader to be used for loading KTX2 textures.

Attributes

var meshoptDecoder: UndefOr[Object]

A loader to be used for loading meshopt compressed files.

A loader to be used for loading meshopt compressed files.

Attributes

var path: String

The path to use when loading resources referenced by the GLTF asset.

The path to use when loading resources referenced by the GLTF asset.

Attributes

var requestHeader: Dictionary[String]

Whether the .gltf loader requires the use of worker threads.

Whether the .gltf loader requires the use of worker threads.

Attributes