Reference Source
public class | source

GLTFDefaultDataSource

Default data access strategy for GLTFLoaderPlugin.

This just loads assets using XMLHttpRequest.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

getArrayBuffer(glTFSrc: String | Number, binarySrc: String | Number, ok: Function, error: Function)

Gets glTF binary attachment.

public

getGLB(glbSrc: String | Number, ok: Function, error: Function)

Gets binary glTF file.

public

getGLTF(glTFSrc: String | Number, ok: Function, error: Function)

Gets glTF JSON.

public

getMetaModel(metaModelSrc: String | Number, ok: Function, error: Function)

Gets metamodel JSON.

Public Constructors

public constructor() source

Public Methods

public getArrayBuffer(glTFSrc: String | Number, binarySrc: String | Number, ok: Function, error: Function) source

Gets glTF binary attachment.

Note that this method requires the source of the glTF JSON asset. This is because the binary attachment source could be relative to the glTF source, IE. it may not be a global ID.

Params:

NameTypeAttributeDescription
glTFSrc String | Number

Identifies the glTF JSON asset.

binarySrc String | Number

Identifies the glTF binary asset.

ok Function

Fired on successful loading of the glTF binary asset.

error Function

Fired on error while loading the glTF binary asset.

public getGLB(glbSrc: String | Number, ok: Function, error: Function) source

Gets binary glTF file.

Params:

NameTypeAttributeDescription
glbSrc String | Number

Identifies the .glb asset.

ok Function

Fired on successful loading of the .glb asset.

error Function

Fired on error while loading the .glb asset.

public getGLTF(glTFSrc: String | Number, ok: Function, error: Function) source

Gets glTF JSON.

Params:

NameTypeAttributeDescription
glTFSrc String | Number

Identifies the glTF JSON asset.

ok Function

Fired on successful loading of the glTF JSON asset.

error Function

Fired on error while loading the glTF JSON asset.

public getMetaModel(metaModelSrc: String | Number, ok: Function, error: Function) source

Gets metamodel JSON.

Params:

NameTypeAttributeDescription
metaModelSrc String | Number

Identifies the metamodel JSON asset.

ok Function

Fired on successful loading of the metamodel JSON asset.

error Function

Fired on error while loading the metamodel JSON asset.