Skip to content

@tmrw-realityos/charm / Exports / TinyGltf

Class: TinyGltf

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TinyGltf(): TinyGltf

Returns

TinyGltf

Properties

loadImageSlots

loadImageSlots: string[]

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:86

Methods

loadFromBinary

loadFromBinary(arrayBuffer, baseUrl): Promise<GlTf>

Parameters

NameType
arrayBufferArrayBuffer
baseUrlstring

Returns

Promise<GlTf>

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:150


loadFromJson

loadFromJson(json, baseUrl, binaryChunk?): Promise<GlTf>

Parameters

NameType
jsonGlTf
baseUrlstring
binaryChunk?ArrayBuffer

Returns

Promise<GlTf>

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:165


loadFromUrl

loadFromUrl(url, format?): Promise<GlTf>

Parameters

NameType
urlstring
format?"gltf" | "glb"

Returns

Promise<GlTf>

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:94


parseGlbChuncks

parseGlbChuncks(arrayBuffer): Object

Parameters

NameType
arrayBufferArrayBuffer

Returns

Object

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:117


componentCountForType

componentCountForType(type): number

Parameters

NameType
typestring

Returns

number

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:311


packedArrayStrideForAccessor

packedArrayStrideForAccessor(accessor): number

Parameters

NameType
accessorObject
accessor.componentTypenumber
accessor.typestring

Returns

number

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:347


sizeForComponentType

sizeForComponentType(componentType): number

Parameters

NameType
componentTypenumber

Returns

number

Defined in

packages/charm/src/fileFormats/TinyGltf.ts:326