Model loading · function

colliderBeside

The collision hull a vehicle folder ships beside its model, or null.

Explained in Importing models.

function colliderBeside(names: readonly string[]): string | null
import { colliderBeside } from '@driftengine/assets';

Parameters

ParameterTypeDescription
namesreadonly string[]

In depth

A convention, not a statement in any file, which is why it is one named function instead of a rule spread through the baker: a folder naming its hull differently gets no collider and the baker says what it looked for, rather than leaving a consumer to wonder why physics has nothing to work with.

It is read by the ordinary reader and baked as its own asset. Carrying a hull inside the model's own file would mean defining COLL, which is a declared FourCC with no payload, no reader and no writer — a format decision about whether a hull is triangle soup or a set of convex hulls, and not one an import should make in passing.