IFClite TypeScript API
    Preparing search index...

    Class ArrayArena

    Aligned storage for the 4-byte arrays a reader copies out (mesh positions, normals, indices). Allocating one ArrayBuffer per array was most of a large cache hit's chunk decode in Chrome (~150 vs ~75 ms for Holter-shaped data). Arrays from one arena share ~1 MiB blocks, so a structured clone of one of them copies its whole block: post an owned copy instead.

    Index
    • capacityHint: an upper bound of the bytes that will be taken, e.g. a chunk record's decompressed length.

      Parameters

      • OptionalcapacityHint: number

      Returns ArrayArena

    buffer: ArrayBuffer | null

    The buffer the last take returned an offset into.

    • Reserve byteLength bytes at a 4-byte aligned offset; read the buffer from buffer.

      Parameters

      • byteLength: number

      Returns number