Function assertValidGLBHeader

  • Internal

    Fail fast with a clear message on a corrupt binary GLB whose 12-byte header declares a total length larger than the actual file. Without this guard, loaders.gl trusts the bogus length, reads chunks/accessors past the end of the buffer, and throws a cryptic RangeError: Offset is outside the bounds of the DataView. Only inspects binary GLB input (magic glTF); JSON .gltf (string/object) and non-buffer inputs are left for loaders.gl to handle.

    Parameters

    • fileData: any

    Returns void