Skip to content

Documentation / scene / ZHairLoadOptions

Type Alias: ZHairLoadOptions ​

ZHairLoadOptions = object

Defined in: libs/scene/src/asset/loaders/zhair/zhair_loader.ts:21

How much of a .zhair file to keep.

Properties ​

strandStride? ​

optional strandStride?: number

Defined in: libs/scene/src/asset/loaders/zhair/zhair_loader.ts:31

Keep one strand in every strandStride.

Remarks ​

Decimating by a stride rather than by taking a leading slice keeps the kept strands spread over the whole scalp; a slice would leave a bald patch, because strands are stored in the order the groom generated them. Defaults to 1, which keeps everything.


maxStrands? ​

optional maxStrands?: number

Defined in: libs/scene/src/asset/loaders/zhair/zhair_loader.ts:39

Upper bound on the number of strands kept, across all sets.

Remarks ​

Applied on top of strandStride by widening the stride further, so the result stays evenly spread instead of stopping partway through the groom.


scale? ​

optional scale?: number

Defined in: libs/scene/src/asset/loaders/zhair/zhair_loader.ts:48

Scale applied to positions and widths alike.

Remarks ​

Defaults to the file's own unitScale. Width is a length in the same unit as position, so the two must convert together - leaving width unscaled makes strands a hundred times too thick and they read as ribbons rather than hair.


widthScale? ​

optional widthScale?: number

Defined in: libs/scene/src/asset/loaders/zhair/zhair_loader.ts:50

Extra multiplier on width only, for art direction. Defaults to 1.

Released under the MIT License.