Skip to content

Documentation / loaders / HairFileModel

Type Alias: HairFileModel

HairFileModel = StrandCurveSet & object

Defined in: libs/loaders/src/hair/types.ts:78

A decoded HAIR file.

Type Declaration

header: HairFileHeader

The file's header, including the defaults used for absent arrays.

sourceUpAxis

sourceUpAxis: StrandUpAxis

Up axis the file's points were read as, and so the rotation that was undone to bring positions into the engine's Y-up frame.

transparency

transparency: Nullable<Float32Array>

Per-point transparency, or null when the file carries none.

colors

colors: Nullable<Float32Array>

Per-point colour, 3 floats each, or null when the file carries none.

Remarks

Extends StrandCurveSet, so it feeds the shared ribbon tessellator and the GPU strand path without conversion. width carries the file's thickness values, interpreted as a diameter to match the rest of the engine, and positions is already in the engine's Y-up frame.

Released under the MIT License.