Home Reference Source
public class | source

ModelConverter

Static Member Summary

Static Public Members
public static

Static Method Summary

Static Public Methods
public static

The static method to get singleton instance of this class.

Static Private Methods
private static

Constructor Summary

Public Constructor
public

constructor(enforcer: Symbol)

The constructor of GLTFLoader class.

Method Summary

Public Methods
public

convertToGLBoostModel(glBoostContext: *, gltfModel: *): *

Private Methods
private

_accessBinaryWithAccessor(accessor: *): *

private

_adjustByteAlign(typedArrayClass: *, arrayBuffer: *, alignSize: *, byteOffset: *, length: *): *

private

_checkBytesPerComponent(accessor: *): *

private

_checkComponentNumber(accessor: *): *

private

_checkDataViewMethod(accessor: *): *

private

_getDefaultShader(options: *): *

private

_setupAnimation(gltfModel: *, groups: *)

private

_setupHierarchy(glBoostContext: *, gltfModel: *, groups: *, glboostMeshes: *)

private

_setupMaterial(glBoostContext: *, gltfModel: *, gltfMaterial: *, materialJson: *, accessor: *, additional: *, vertexData: *, dataViewMethodDic: *, _positions: *, indices: *, geometry: *, i: *)

private

_setupMesh(glBoostContext: *, gltfModel: *): *

private

_setupSkeleton(glBoostContext: *, gltfModel: *, groups: *, glboostMeshes: *)

private

_setupTransform(gltfModel: *, groups: *)

Static Public Members

public static [singleton]: * source

Static Public Methods

public static getInstance(): GLTFLoader source

The static method to get singleton instance of this class.

Return:

GLTFLoader

The singleton instance of GLTFLoader class

Static Private Methods

private static _isSystemLittleEndian(): * source

Return:

*

Public Constructors

public constructor(enforcer: Symbol) source

The constructor of GLTFLoader class. But you cannot use this constructor directly because of this class is a singleton class. Use getInstance() static method.

Params:

NameTypeAttributeDescription
enforcer Symbol

a Symbol to forbid calling this constructor directly

Public Methods

public convertToGLBoostModel(glBoostContext: *, gltfModel: *): * source

Params:

NameTypeAttributeDescription
glBoostContext *
gltfModel *

Return:

*

Private Methods

private _accessBinaryWithAccessor(accessor: *): * source

Params:

NameTypeAttributeDescription
accessor *

Return:

*

private _adjustByteAlign(typedArrayClass: *, arrayBuffer: *, alignSize: *, byteOffset: *, length: *): * source

Params:

NameTypeAttributeDescription
typedArrayClass *
arrayBuffer *
alignSize *
byteOffset *
length *

Return:

*

private _checkBytesPerComponent(accessor: *): * source

Params:

NameTypeAttributeDescription
accessor *

Return:

*

private _checkComponentNumber(accessor: *): * source

Params:

NameTypeAttributeDescription
accessor *

Return:

*

private _checkDataViewMethod(accessor: *): * source

Params:

NameTypeAttributeDescription
accessor *

Return:

*

private _getDefaultShader(options: *): * source

Params:

NameTypeAttributeDescription
options *

Return:

*

private _setupAnimation(gltfModel: *, groups: *) source

Params:

NameTypeAttributeDescription
gltfModel *
groups *

private _setupHierarchy(glBoostContext: *, gltfModel: *, groups: *, glboostMeshes: *) source

Params:

NameTypeAttributeDescription
glBoostContext *
gltfModel *
groups *
glboostMeshes *

private _setupMaterial(glBoostContext: *, gltfModel: *, gltfMaterial: *, materialJson: *, accessor: *, additional: *, vertexData: *, dataViewMethodDic: *, _positions: *, indices: *, geometry: *, i: *) source

Params:

NameTypeAttributeDescription
glBoostContext *
gltfModel *
gltfMaterial *
materialJson *
accessor *
additional *
vertexData *
dataViewMethodDic *
_positions *
indices *
geometry *
i *

private _setupMesh(glBoostContext: *, gltfModel: *): * source

Params:

NameTypeAttributeDescription
glBoostContext *
gltfModel *

Return:

*

private _setupSkeleton(glBoostContext: *, gltfModel: *, groups: *, glboostMeshes: *) source

Params:

NameTypeAttributeDescription
glBoostContext *
gltfModel *
groups *
glboostMeshes *

private _setupTransform(gltfModel: *, groups: *) source

Params:

NameTypeAttributeDescription
gltfModel *
groups *