The .drft container · function

readColliders

The hulls a COLL chunk carries, as views over the fetched buffer.

Explained in The .drft container.

function readColliders(buffer: ArrayBuffer, offset: number, byteLength: number): readonly Float32Array[]
import { readColliders } from '@driftengine/drft';

Parameters

ParameterTypeDescription
bufferArrayBuffer
offsetnumber
byteLengthnumber

In depth

Views rather than copies, exactly like the vertex arrays, so a load allocates nothing beyond the array holding them. They keep the file alive for as long as they are held, which is the same trade DrftTexture.bytes makes and for the same reason.