@tmrw-realityos/charm / Exports / TinyGltf
Class: TinyGltf
Table of contents
Constructors
Properties
Methods
- loadFromBinary
- loadFromJson
- loadFromUrl
- parseGlbChuncks
- componentCountForType
- packedArrayStrideForAccessor
- sizeForComponentType
Constructors
constructor
• 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
| Name | Type |
|---|---|
arrayBuffer | ArrayBuffer |
baseUrl | string |
Returns
Promise<GlTf>
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:150
loadFromJson
▸ loadFromJson(json, baseUrl, binaryChunk?): Promise<GlTf>
Parameters
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
url | string |
format? | "gltf" | "glb" |
Returns
Promise<GlTf>
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:94
parseGlbChuncks
▸ parseGlbChuncks(arrayBuffer): Object
Parameters
| Name | Type |
|---|---|
arrayBuffer | ArrayBuffer |
Returns
Object
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:117
componentCountForType
▸ componentCountForType(type): number
Parameters
| Name | Type |
|---|---|
type | string |
Returns
number
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:311
packedArrayStrideForAccessor
▸ packedArrayStrideForAccessor(accessor): number
Parameters
| Name | Type |
|---|---|
accessor | Object |
accessor.componentType | number |
accessor.type | string |
Returns
number
Defined in
packages/charm/src/fileFormats/TinyGltf.ts:347
sizeForComponentType
▸ sizeForComponentType(componentType): number
Parameters
| Name | Type |
|---|---|
componentType | number |
Returns
number