Appearance
@tmrw-realityos/charm • Docs
@tmrw-realityos/charm / TinyGltf
Class: TinyGltf
Constructors
new TinyGltf()
new TinyGltf():
TinyGltf
Returns
Properties
loadImageSlots
loadImageSlots:
string
[]
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:86
Methods
loadFromBinary()
loadFromBinary(
arrayBuffer
,baseUrl
):Promise
<GlTf
>
Parameters
• arrayBuffer: ArrayBuffer
• baseUrl: string
Returns
Promise
<GlTf
>
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:150
loadFromJson()
loadFromJson(
json
,baseUrl
,binaryChunk
?):Promise
<GlTf
>
Parameters
• json: GlTf
• baseUrl: string
• binaryChunk?: ArrayBuffer
Returns
Promise
<GlTf
>
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:165
loadFromUrl()
loadFromUrl(
url
,format
?):Promise
<GlTf
>
Parameters
• url: string
• format?: "gltf"
| "glb"
Returns
Promise
<GlTf
>
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:94
parseGlbChuncks()
parseGlbChuncks(
arrayBuffer
):object
Parameters
• arrayBuffer: ArrayBuffer
Returns
object
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:117
componentCountForType()
static
componentCountForType(type
):number
Parameters
• type: string
Returns
number
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:311
packedArrayStrideForAccessor()
static
packedArrayStrideForAccessor(accessor
):number
Parameters
• accessor
• accessor.componentType: number
• accessor.type: string
Returns
number
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:347
sizeForComponentType()
static
sizeForComponentType(componentType
):number
Parameters
• componentType: number
Returns
number