Io - GLB
API reference — the GLB doors of @huukhanhnguyen/io: readers, writers and their option / result types, all on this page.
import { readGlb, writeGlb } from '@huukhanhnguyen/io'Source: ./glb, ./glbEntities. See all formats or the Guide.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
entitiesFromGlb
function
entitiesFromGlb(data: Uint8Array | ArrayBuffer, options?: { maxTriangles?: number; material?: string; flipV?: boolean; }): { entities: Entity[]; materials: GlbMaterialRecord[]; primaryMaterial?: GlbMaterialRecord; mesh: GlbTriangleMesh; triangleCount: number; }glbTextureDataUri
function
glbTextureDataUri(texture: GlbTexture): stringreadGlb
function
readGlb(data: Uint8Array): stringreadGlbMesh
function
readGlbMesh(data: Uint8Array | ArrayBuffer, options?: { maxTriangles?: number; }): { mesh: GlbTriangleMesh; materials: GlbMaterialRecord[]; primaryMaterial?: GlbMaterialRecord; triangleCount: number; }triMeshToFaces
function
triMeshToFaces(mesh: GlbTriangleMesh, options?: { material?: string; flipV?: boolean; }): Entity[]writeGlb
function
writeGlb(handle: string): Uint8Array