UNPKG

@loaders.gl/gltf

Version:

Framework-independent loader for the glTF format

22 lines (18 loc) 537 B
export type GLBBinChunk = { byteOffset: number; byteLength: number; arrayBuffer: ArrayBuffer; }; export type GLB = { type: string; version: number; // Version 2 of binary glTF container format // Put less important stuff in a header, to avoid clutter header: { byteOffset: number; // Byte offset into the initial arrayBuffer byteLength: number; hasBinChunk: boolean; }; // Per spec we must iterate over chunks, ignoring all except JSON and BIN json: Record<string, any>; binChunks: GLBBinChunk[]; };