Documentation / scene / ZHairStrandSetJSON
Type Alias: ZHairStrandSetJSON
ZHairStrandSetJSON =
object
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:56
One strand set as described by the manifest.
Remarks
Mirrors StrandCurveSet, with the per-point colour and transparency channels a .hair file may carry. Control points are contiguous: strand i owns the pointCounts[i] points following the running sum of the counts before it.
Properties
name
name:
string
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:58
Name carried over from the source object.
strandCount
strandCount:
number
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:60
Number of strands.
pointCount
pointCount:
number
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:62
Total control points across all strands.
bounds
bounds: [
number,number,number,number,number,number]
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:71
Axis-aligned bounds of the control points, as [minX, minY, minZ, maxX, maxY, maxZ].
Remarks
In the file's own units, before unitScale is applied, so that a reader can size a node without touching the payload.
positions
positions:
ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:73
Control point positions, 3 float32 per point.
pointCounts
pointCounts:
ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:75
Control point count per strand, 1 uint32 each.
widths?
optionalwidths?:ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:77
Strand width as a diameter, in the same unit as positions.
widthPerStrand?
optionalwidthPerStrand?:boolean
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:79
True when widths holds one value per strand rather than per point.
uv?
optionaluv?:ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:81
Root UV, 2 float32 each.
uvPerPoint?
optionaluvPerPoint?:boolean
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:83
True when uv holds one pair per point rather than per strand.
colors?
optionalcolors?:ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:85
Per-point colour, 3 float32 each. Only .hair sources carry this.
transparency?
optionaltransparency?:ZHairBufferRef
Defined in: libs/scene/src/asset/loaders/zhair/zhair_format.ts:87
Per-point transparency, 1 float32 each. Only .hair sources carry this.