Skip to main content

Class: GLTFLoader2

Asset-Management.GLTFLoader2

Hierarchy

  • GLTFLoader

    GLTFLoader2

Implements

Properties

isGLTFLoader2

isGLTFLoader2: boolean = true

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:13


preparsers

preparsers: GLTFPreparser[] = []

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:19

Constructors

constructor

new GLTFLoader2(manager)

Parameters

NameType
managerLoadingManager

Overrides

GLTFLoader.constructor

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:14

Methods

preparse

preparse(data, path): Promise<string | ArrayBuffer>

Parameters

NameType
datastring | ArrayBuffer
pathstring

Returns

Promise<string | ArrayBuffer>

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:21


parse

parse(data, path, onLoad, onError?, url?): void

Parameters

NameType
datastring | ArrayBuffer
pathstring
onLoad(gltf: GLTF) => void
onError?(event: ErrorEvent) => void
url?string

Returns

void

Overrides

GLTFLoader.parse

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:28


transform

transform(res, options): Object3D<Event, string>

Transform after load, like convert geometry to mesh, etc. for reference see DRACOLoader2

Parameters

NameType
resGLTF
optionsAnyOptions

Returns

Object3D<Event, string>

Implementation of

ILoader.transform

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:37


register

register(callback): GLTFLoader2

Parameters

NameType
callback(parser: GLTFParser) => GLTFLoaderPlugin

Returns

GLTFLoader2

Overrides

GLTFLoader.register

Defined in

webgi/src/extras/asset_manager/importer/threejs/loaders/GLTFLoader2.ts:50