Documentation / scene / HairNode
Class: HairNode
Defined in: libs/scene/src/scene/hair.ts:61
Hair scene node.
Remarks
Point it at a .zhair asset with HairNode.setHairAsset, or hand it control points directly with HairNode.setStrands. Everything the draw call needs is derived from them.
Extends
GraphNode<this> &object&Disposable<this> &IMixinDrawable
Implements
Constructors
Constructor
new HairNode(
scene):HairNode
Defined in: libs/scene/src/scene/hair.ts:106
Creates an empty hair node.
Parameters
scene
Scene the node belongs to.
Returns
HairNode
Overrides
applyMixins(GraphNode, mixinDrawable).constructor
Properties
objectColor
readonlyobjectColor:Vector4
Defined in: libs/scene/src/render/drawable_mixin.ts:13
Inherited from
applyMixins(GraphNode, mixinDrawable).objectColor
BBOXDRAW_INHERITED
readonlystaticBBOXDRAW_INHERITED:-1=-1
Defined in: libs/scene/src/scene/scene_node.ts:167
Bounding-box draw mode inherited from nearest graph ancestor.
Inherited from
applyMixins(GraphNode, mixinDrawable).BBOXDRAW_INHERITED
BBOXDRAW_DISABLED
readonlystaticBBOXDRAW_DISABLED:0=0
Defined in: libs/scene/src/scene/scene_node.ts:169
Disable bounding-box visualization.
Inherited from
applyMixins(GraphNode, mixinDrawable).BBOXDRAW_DISABLED
BBOXDRAW_LOCAL
readonlystaticBBOXDRAW_LOCAL:1=1
Defined in: libs/scene/src/scene/scene_node.ts:171
Draw local-space bounding box.
Inherited from
applyMixins(GraphNode, mixinDrawable).BBOXDRAW_LOCAL
BBOXDRAW_WORLD
readonlystaticBBOXDRAW_WORLD:2=2
Defined in: libs/scene/src/scene/scene_node.ts:173
Draw world-space bounding box.
Inherited from
applyMixins(GraphNode, mixinDrawable).BBOXDRAW_WORLD
Accessors
disposed
Get Signature
get disposed():
boolean
Defined in: libs/base/dist/index.d.ts:6107
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).disposed
hairAsset
Get Signature
get hairAsset():
string
Defined in: libs/scene/src/scene/hair.ts:143
Path of the .zhair asset this node draws, or an empty string.
Returns
string
strandStride
Get Signature
get strandStride():
number
Defined in: libs/scene/src/scene/hair.ts:193
Draw one strand in every strandStride.
Remarks
A stride rather than a leading slice, so the kept strands stay spread over the whole scalp instead of leaving a bald patch. Only meaningful when the strands came from an asset; strands set directly are used as given.
Returns
number
Set Signature
set strandStride(
val):void
Defined in: libs/scene/src/scene/hair.ts:196
Parameters
val
number
Returns
void
maxStrands
Get Signature
get maxStrands():
number
Defined in: libs/scene/src/scene/hair.ts:210
Upper bound on the number of strands drawn, or 0 for no bound.
Remarks
Applied on top of HairNode.strandStride by widening the stride further, so the result stays evenly spread.
Returns
number
Set Signature
set maxStrands(
val):void
Defined in: libs/scene/src/scene/hair.ts:213
Parameters
val
number
Returns
void
strands
Get Signature
get strands():
HairStrandData
Defined in: libs/scene/src/scene/hair.ts:221
GPU-resident strand geometry, or null when none has been assigned.
Returns
strandCount
Get Signature
get strandCount():
number
Defined in: libs/scene/src/scene/hair.ts:225
Number of strands currently drawn.
Returns
number
albedoColor
Get Signature
get albedoColor():
Immutable<Vector4>
Defined in: libs/scene/src/scene/hair.ts:277
Base colour of the strands.
Returns
Immutable<Vector4>
Set Signature
set albedoColor(
value):void
Defined in: libs/scene/src/scene/hair.ts:280
Parameters
value
Vector4
Returns
void
shadingModel
Get Signature
get shadingModel():
HairShadingModel
Defined in: libs/scene/src/scene/hair.ts:290
Which scattering model shades the hair.
Remarks
kajiya-kay is the art-directed double lobe; marschner derives the lobes from the fibre and is the one that renders back-lighting.
Returns
Set Signature
set shadingModel(
value):void
Defined in: libs/scene/src/scene/hair.ts:293
Parameters
value
Returns
void
specular1Color
Get Signature
get specular1Color():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:297
Colour of the primary, near-white specular lobe.
Returns
Immutable<Vector3>
Set Signature
set specular1Color(
value):void
Defined in: libs/scene/src/scene/hair.ts:300
Parameters
value
Vector3
Returns
void
specular1Power
Get Signature
get specular1Power():
number
Defined in: libs/scene/src/scene/hair.ts:304
Exponent of the primary specular lobe.
Returns
number
Set Signature
set specular1Power(
value):void
Defined in: libs/scene/src/scene/hair.ts:307
Parameters
value
number
Returns
void
specular1Shift
Get Signature
get specular1Shift():
number
Defined in: libs/scene/src/scene/hair.ts:311
Shift of the primary specular lobe along the strand.
Returns
number
Set Signature
set specular1Shift(
value):void
Defined in: libs/scene/src/scene/hair.ts:314
Parameters
value
number
Returns
void
specular2Color
Get Signature
get specular2Color():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:318
Colour of the secondary, tinted specular lobe.
Returns
Immutable<Vector3>
Set Signature
set specular2Color(
value):void
Defined in: libs/scene/src/scene/hair.ts:321
Parameters
value
Vector3
Returns
void
specular2Power
Get Signature
get specular2Power():
number
Defined in: libs/scene/src/scene/hair.ts:325
Exponent of the secondary specular lobe.
Returns
number
Set Signature
set specular2Power(
value):void
Defined in: libs/scene/src/scene/hair.ts:328
Parameters
value
number
Returns
void
specular2Shift
Get Signature
get specular2Shift():
number
Defined in: libs/scene/src/scene/hair.ts:332
Shift of the secondary specular lobe along the strand.
Returns
number
Set Signature
set specular2Shift(
value):void
Defined in: libs/scene/src/scene/hair.ts:335
Parameters
value
number
Returns
void
diffuseWrap
Get Signature
get diffuseWrap():
number
Defined in: libs/scene/src/scene/hair.ts:339
How far diffuse lighting wraps around the fibre.
Returns
number
Set Signature
set diffuseWrap(
value):void
Defined in: libs/scene/src/scene/hair.ts:342
Parameters
value
number
Returns
void
transmissionColor
Get Signature
get transmissionColor():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:346
Colour of light transmitted through the fibre.
Returns
Immutable<Vector3>
Set Signature
set transmissionColor(
value):void
Defined in: libs/scene/src/scene/hair.ts:349
Parameters
value
Vector3
Returns
void
transmissionIntensity
Get Signature
get transmissionIntensity():
number
Defined in: libs/scene/src/scene/hair.ts:353
Strength of back-lit transmission.
Returns
number
Set Signature
set transmissionIntensity(
value):void
Defined in: libs/scene/src/scene/hair.ts:356
Parameters
value
number
Returns
void
transmissionPower
Get Signature
get transmissionPower():
number
Defined in: libs/scene/src/scene/hair.ts:360
Falloff exponent of back-lit transmission.
Returns
number
Set Signature
set transmissionPower(
value):void
Defined in: libs/scene/src/scene/hair.ts:363
Parameters
value
number
Returns
void
scatterColor
Get Signature
get scatterColor():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:367
Colour of multiple scattering within the groom.
Returns
Immutable<Vector3>
Set Signature
set scatterColor(
value):void
Defined in: libs/scene/src/scene/hair.ts:370
Parameters
value
Vector3
Returns
void
scatterIntensity
Get Signature
get scatterIntensity():
number
Defined in: libs/scene/src/scene/hair.ts:374
Strength of multiple scattering.
Returns
number
Set Signature
set scatterIntensity(
value):void
Defined in: libs/scene/src/scene/hair.ts:377
Parameters
value
number
Returns
void
scatterLocal
Get Signature
get scatterLocal():
number
Defined in: libs/scene/src/scene/hair.ts:381
Share of scattering taken as local rather than global.
Returns
number
Set Signature
set scatterLocal(
value):void
Defined in: libs/scene/src/scene/hair.ts:384
Parameters
value
number
Returns
void
scatterWrap
Get Signature
get scatterWrap():
number
Defined in: libs/scene/src/scene/hair.ts:388
How far scattered light wraps around the fibre.
Returns
number
Set Signature
set scatterWrap(
value):void
Defined in: libs/scene/src/scene/hair.ts:391
Parameters
value
number
Returns
void
marschnerShift
Get Signature
get marschnerShift():
number
Defined in: libs/scene/src/scene/hair.ts:395
Longitudinal shift of the Marschner lobes.
Returns
number
Set Signature
set marschnerShift(
value):void
Defined in: libs/scene/src/scene/hair.ts:398
Parameters
value
number
Returns
void
marschnerRoughness
Get Signature
get marschnerRoughness():
number
Defined in: libs/scene/src/scene/hair.ts:402
Longitudinal roughness of the Marschner lobes.
Returns
number
Set Signature
set marschnerRoughness(
value):void
Defined in: libs/scene/src/scene/hair.ts:405
Parameters
value
number
Returns
void
marschnerIOR
Get Signature
get marschnerIOR():
number
Defined in: libs/scene/src/scene/hair.ts:409
Index of refraction of the fibre.
Returns
number
Set Signature
set marschnerIOR(
value):void
Defined in: libs/scene/src/scene/hair.ts:412
Parameters
value
number
Returns
void
marschnerAbsorption
Get Signature
get marschnerAbsorption():
number
Defined in: libs/scene/src/scene/hair.ts:423
How strongly pigmented the fibre is.
Remarks
A multiplier on the distance transmitted light travels before leaving, so raising it deepens the colour of the TT and TRT paths without touching the white surface reflection.
Returns
number
Set Signature
set marschnerAbsorption(
value):void
Defined in: libs/scene/src/scene/hair.ts:426
Parameters
value
number
Returns
void
marschnerLobes
Get Signature
get marschnerLobes():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:430
Relative weight of the R, TT and TRT lobes.
Returns
Immutable<Vector3>
Set Signature
set marschnerLobes(
value):void
Defined in: libs/scene/src/scene/hair.ts:433
Parameters
value
Immutable<Vector3>
Returns
void
segmentsPerStrand
Get Signature
get segmentsPerStrand():
number
Defined in: libs/scene/src/scene/hair.ts:449
Ribbon segments generated per strand.
Remarks
The main quality dial, and independent of how many control points a strand has: the shader resamples the curve, so the same 30-point strand can be drawn with 12 segments close up and 3 far away.
Returns
number
Set Signature
set segmentsPerStrand(
val):void
Defined in: libs/scene/src/scene/hair.ts:452
Parameters
val
number
Returns
void
strandWidthScale
Get Signature
get strandWidthScale():
number
Defined in: libs/scene/src/scene/hair.ts:459
Multiplier on the width stored in the strand data.
Returns
number
Set Signature
set strandWidthScale(
value):void
Defined in: libs/scene/src/scene/hair.ts:462
Parameters
value
number
Returns
void
minStrandWidth
Get Signature
get minStrandWidth():
number
Defined in: libs/scene/src/scene/hair.ts:466
Lower bound on ribbon width, in world units.
Returns
number
Set Signature
set minStrandWidth(
value):void
Defined in: libs/scene/src/scene/hair.ts:469
Parameters
value
number
Returns
void
minPixelWidth
Get Signature
get minPixelWidth():
number
Defined in: libs/scene/src/scene/hair.ts:480
Lower bound on ribbon width, in pixels.
Remarks
Real hair is thinner than a pixel and rasterises to a flickering dotted line. Widening it to about a pixel and paying the extra coverage back in alpha keeps distant hair fading rather than breaking up.
Returns
number
Set Signature
set minPixelWidth(
value):void
Defined in: libs/scene/src/scene/hair.ts:483
Parameters
value
number
Returns
void
strandRoundness
Get Signature
get strandRoundness():
number
Defined in: libs/scene/src/scene/hair.ts:492
How far the shading normal bends across the ribbon, in [0, 1].
Remarks
At 0 a strand shades as a flat tape, at 1 as a cylinder.
Returns
number
Set Signature
set strandRoundness(
value):void
Defined in: libs/scene/src/scene/hair.ts:495
Parameters
value
number
Returns
void
rootOcclusion
Get Signature
get rootOcclusion():
number
Defined in: libs/scene/src/scene/hair.ts:512
Strength of the root-depth ambient occlusion, in [0, 1].
Remarks
Environment irradiance is not attenuated by anything - a shadow map answers for one light, not for the sky - so without this every strand of a groom receives the full sky and a dense hairstyle is lit as brightly in its interior as on its surface, which reads as a flat silhouette with no volume. Most obvious on pale hair, where there is little pigment to darken the interior instead. Set to 0 to disable.
Ambient light only: direct light is already attenuated by the shadow map, and under DOM by a graded transmittance, so it is left alone.
Returns
number
Set Signature
set rootOcclusion(
value):void
Defined in: libs/scene/src/scene/hair.ts:515
Parameters
value
number
Returns
void
rootOcclusionRange
Get Signature
get rootOcclusionRange():
number
Defined in: libs/scene/src/scene/hair.ts:525
How far along a strand the root occlusion reaches, in (0, 1].
Remarks
Short for a groom whose strands leave the scalp quickly, longer for one where they lie against each other most of their length.
Returns
number
Set Signature
set rootOcclusionRange(
value):void
Defined in: libs/scene/src/scene/hair.ts:528
Parameters
value
number
Returns
void
strandLOD
Get Signature
get strandLOD():
boolean
Defined in: libs/scene/src/scene/hair.ts:532
Drop strands with distance, redistributing their coverage to the survivors.
Returns
boolean
Set Signature
set strandLOD(
value):void
Defined in: libs/scene/src/scene/hair.ts:535
Parameters
value
boolean
Returns
void
minStrandLODRatio
Get Signature
get minStrandLODRatio():
number
Defined in: libs/scene/src/scene/hair.ts:539
Floor on the fraction of strands distance decimation keeps.
Returns
number
Set Signature
set minStrandLODRatio(
value):void
Defined in: libs/scene/src/scene/hair.ts:542
Parameters
value
number
Returns
void
blendMode
Get Signature
get blendMode():
BlendMode
Defined in: libs/scene/src/scene/hair.ts:558
How the strands blend with what is behind them.
Remarks
The pixel-width floor pays its widening back in alpha, which only means anything once blending is on; left at none every strand covers its pixel fully and a dense groom reads as a solid shell.
Returns
Set Signature
set blendMode(
value):void
Defined in: libs/scene/src/scene/hair.ts:561
Parameters
value
Returns
void
alphaCutoff
Get Signature
get alphaCutoff():
number
Defined in: libs/scene/src/scene/hair.ts:565
Alpha below which a fragment is discarded.
Returns
number
Set Signature
set alphaCutoff(
value):void
Defined in: libs/scene/src/scene/hair.ts:568
Parameters
value
number
Returns
void
alphaDither
Get Signature
get alphaDither():
boolean
Defined in: libs/scene/src/scene/hair.ts:572
Dither the alpha test, so a temporal filter resolves the soft edge.
Returns
boolean
Set Signature
set alphaDither(
value):void
Defined in: libs/scene/src/scene/hair.ts:575
Parameters
value
boolean
Returns
void
transparentMotionVector
Get Signature
get transparentMotionVector():
boolean
Defined in: libs/scene/src/scene/hair.ts:589
Whether a blended groom contributes motion vectors.
Remarks
Only meaningful with HairNode.blendMode set to something other than none. Blended geometry is otherwise absent from the prepass, so a groom carries the velocity of whatever is behind it and a temporal filter smears it as it swings - the same ghosting the dithered path avoids by being opaque. On by default, because a groom is dense enough to own its pixels and there is no reason to want the ghosting.
Returns
boolean
Set Signature
set transparentMotionVector(
value):void
Defined in: libs/scene/src/scene/hair.ts:592
Parameters
value
boolean
Returns
void
castShadow
Get Signature
get castShadow():
boolean
Defined in: libs/scene/src/scene/hair.ts:596
Whether the groom is drawn into shadow maps.
Returns
boolean
Set Signature
set castShadow(
val):void
Defined in: libs/scene/src/scene/hair.ts:599
Parameters
val
boolean
Returns
void
transparentShadowCaster
Get Signature
get transparentShadowCaster():
boolean
Defined in: libs/scene/src/scene/hair.ts:603
Let the shadow caster pass respect strand alpha, for softer self-shadowing.
Returns
boolean
Set Signature
set transparentShadowCaster(
value):void
Defined in: libs/scene/src/scene/hair.ts:606
Parameters
value
boolean
Returns
void
shadowAlphaCutoff
Get Signature
get shadowAlphaCutoff():
number
Defined in: libs/scene/src/scene/hair.ts:610
Alpha below which a fragment casts no shadow.
Returns
number
Set Signature
set shadowAlphaCutoff(
value):void
Defined in: libs/scene/src/scene/hair.ts:613
Parameters
value
number
Returns
void
simulationEnabled
Get Signature
get simulationEnabled():
boolean
Defined in: libs/scene/src/scene/hair.ts:628
Whether strand dynamics run on this groom.
Remarks
WebGPU only. Switching it on with no strands loaded is allowed - the simulation is built when the strands arrive.
Returns
boolean
Set Signature
set simulationEnabled(
val):void
Defined in: libs/scene/src/scene/hair.ts:631
Parameters
val
boolean
Returns
void
simulation
Get Signature
get simulation():
GPUHairSimulation
Defined in: libs/scene/src/scene/hair.ts:659
The running strand dynamics, or null when they are off or unsupported.
Remarks
Exposed so a caller can reach past the node's own dials - to set colliders, for one, which have no serialised form here.
Returns
gravity
Get Signature
get gravity():
Immutable<Vector3>
Defined in: libs/scene/src/scene/hair.ts:663
World-space gravity acting on the strands.
Returns
Immutable<Vector3>
Set Signature
set gravity(
value):void
Defined in: libs/scene/src/scene/hair.ts:666
Parameters
value
Vector3
Returns
void
localStiffness
Get Signature
get localStiffness():
number
Defined in: libs/scene/src/scene/hair.ts:682
How strongly strands keep the shape they were authored with, in [0, 1].
Remarks
The dial to reach for first. It holds the angle each segment makes with the one before it, measured against that segment's current direction rather than a fixed pose, so a groom keeps its curl while remaining free to hang and swing. It is also what damps a groom: without bending resistance a strand carries a disturbance up and down its length for seconds.
Returns
number
Set Signature
set localStiffness(
value):void
Defined in: libs/scene/src/scene/hair.ts:685
Parameters
value
number
Returns
void
localIterations
Get Signature
get localIterations():
number
Defined in: libs/scene/src/scene/hair.ts:692
Local shape constraint passes per substep.
Returns
number
Set Signature
set localIterations(
value):void
Defined in: libs/scene/src/scene/hair.ts:695
Parameters
value
number
Returns
void
globalStiffness
Get Signature
get globalStiffness():
number
Defined in: libs/scene/src/scene/hair.ts:711
How strongly strands are pulled back to their authored pose, in [0, 1].
Remarks
Off by default. It anchors a point to a fixed place rather than to its neighbours, which is a spring, and a groom held by springs reads as one. HairNode.localStiffness is what holds styling without that; this is for grooms that genuinely should not move far from how they were authored, and wants HairNode.globalRange set as well.
Returns
number
Set Signature
set globalStiffness(
value):void
Defined in: libs/scene/src/scene/hair.ts:714
Parameters
value
number
Returns
void
globalRange
Get Signature
get globalRange():
number
Defined in: libs/scene/src/scene/hair.ts:721
Fraction of a strand, from the root, the pose pull acts on, in [0, 1].
Returns
number
Set Signature
set globalRange(
value):void
Defined in: libs/scene/src/scene/hair.ts:724
Parameters
value
number
Returns
void
ftlDamping
Get Signature
get ftlDamping():
number
Defined in: libs/scene/src/scene/hair.ts:738
Share of a point's length correction fed back into its parent, in [0, 1].
Remarks
What keeps the solver from gaining energy as the node moves. Lowering it makes a groom livelier and, past a point, makes it whip; 0 removes the feedback entirely.
Returns
number
Set Signature
set ftlDamping(
value):void
Defined in: libs/scene/src/scene/hair.ts:741
Parameters
value
number
Returns
void
damping
Get Signature
get damping():
number
Defined in: libs/scene/src/scene/hair.ts:748
Velocity lost each step, in [0, 1].
Returns
number
Set Signature
set damping(
value):void
Defined in: libs/scene/src/scene/hair.ts:751
Parameters
value
number
Returns
void
friction
Get Signature
get friction():
number
Defined in: libs/scene/src/scene/hair.ts:758
Tangential motion removed at a contact, in [0, 1].
Returns
number
Set Signature
set friction(
value):void
Defined in: libs/scene/src/scene/hair.ts:761
Parameters
value
number
Returns
void
vspCoeff
Get Signature
get vspCoeff():
number
Defined in: libs/scene/src/scene/hair.ts:775
How much of the node's motion strands are carried along by, in [0, 1].
Remarks
0 leaves a groom exactly where it was in the world and lets the pinned roots drag it along, which is what produces lag; 1 carries it rigidly with the node, so it never lags. Lower values give a livelier, floppier groom.
Returns
number
Set Signature
set vspCoeff(
value):void
Defined in: libs/scene/src/scene/hair.ts:778
Parameters
value
number
Returns
void
vspAccelThreshold
Get Signature
get vspAccelThreshold():
number
Defined in: libs/scene/src/scene/hair.ts:785
Node acceleration above which strands are carried rigidly, in units/s².
Returns
number
Set Signature
set vspAccelThreshold(
value):void
Defined in: libs/scene/src/scene/hair.ts:788
Parameters
value
number
Returns
void
maxSpeedFactor
Get Signature
get maxSpeedFactor():
number
Defined in: libs/scene/src/scene/hair.ts:801
Per-substep ceiling on how far a point may travel, in segment lengths.
Remarks
A backstop against a single bad substep, not a dial to shape motion with: at the default it never engages during ordinary movement.
Returns
number
Set Signature
set maxSpeedFactor(
value):void
Defined in: libs/scene/src/scene/hair.ts:804
Parameters
value
number
Returns
void
substeps
Get Signature
get substeps():
number
Defined in: libs/scene/src/scene/hair.ts:811
Integration substeps per fixed step.
Returns
number
Set Signature
set substeps(
value):void
Defined in: libs/scene/src/scene/hair.ts:814
Parameters
value
number
Returns
void
placeToOctree
Get Signature
get placeToOctree():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:313
Whether the node should be inserted into the scene's spatial structure.
Remarks
Toggling this hints the scene to (re)place the node in octree/acceleration structures.
Returns
boolean
Set Signature
set placeToOctree(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:316
Parameters
val
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).placeToOctree
runtimeId
Get Signature
get runtimeId():
number
Defined in: libs/scene/src/scene/scene_node.ts:327
Node's runtime unique identifier
Returns
number
Inherited from
applyMixins(GraphNode, mixinDrawable).runtimeId
persistentId
Get Signature
get persistentId():
string
Defined in: libs/scene/src/scene/scene_node.ts:336
Node's persistent identifier.
Remarks
Changing this affects serialization and registry lookup; ensure uniqueness.
Returns
string
Set Signature
set persistentId(
id):void
Defined in: libs/scene/src/scene/scene_node.ts:339
Parameters
id
string
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).persistentId
prefabId
Get Signature
get prefabId():
string
Defined in: libs/scene/src/scene/scene_node.ts:348
If not empty, this node was loaded from a prefab
Remarks
Internal used for serialization
Returns
string
Set Signature
set prefabId(
id):void
Defined in: libs/scene/src/scene/scene_node.ts:351
Parameters
id
string
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).prefabId
jointTypeT
Get Signature
get jointTypeT():
"none"|"animated"|"static"
Defined in: libs/scene/src/scene/scene_node.ts:367
Translation type if this is a joint node of any skeleton
Remarks
Internal used for serialization
Returns
"none" | "animated" | "static"
Set Signature
set jointTypeT(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:370
Parameters
val
"none" | "animated" | "static"
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).jointTypeT
jointTypeS
Get Signature
get jointTypeS():
"none"|"animated"|"static"
Defined in: libs/scene/src/scene/scene_node.ts:379
Scale type if this is a joint node of any skeleton
Remarks
Internal used for serialization
Returns
"none" | "animated" | "static"
Set Signature
set jointTypeS(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:382
Parameters
val
"none" | "animated" | "static"
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).jointTypeS
jointTypeR
Get Signature
get jointTypeR():
"none"|"animated"|"static"
Defined in: libs/scene/src/scene/scene_node.ts:391
Rotation type if this is a joint node of any skeleton
Remarks
Internal used for serialization
Returns
"none" | "animated" | "static"
Set Signature
set jointTypeR(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:394
Parameters
val
"none" | "animated" | "static"
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).jointTypeR
metaData
Get Signature
get metaData():
Metadata
Defined in: libs/scene/src/scene/scene_node.ts:403
Arbitrary metadata associated with this node.
Remarks
Stored and transported with the node; format is application-defined.
Returns
Metadata
Set Signature
set metaData(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:406
Parameters
val
Metadata
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).metaData
script
Get Signature
get script():
string
Defined in: libs/scene/src/scene/scene_node.ts:415
Attached script filename or identifier (engine-specific).
Remarks
Integrates with the engine’s scripting system if available.
Returns
string
Set Signature
set script(
fileName):void
Defined in: libs/scene/src/scene/scene_node.ts:418
Parameters
fileName
string
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).script
scriptConfig
Get Signature
get scriptConfig():
object|unknown[]
Defined in: libs/scene/src/scene/scene_node.ts:431
Script component configuration payload used by editor/runtime script components.
Returns
object | unknown[]
Set Signature
set scriptConfig(
value):void
Defined in: libs/scene/src/scene/scene_node.ts:434
Parameters
value
object | unknown[]
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).scriptConfig
scripts
Get Signature
get scripts():
ScriptAttachment[]
Defined in: libs/scene/src/scene/scene_node.ts:448
All script attachments on this node.
Returns
Set Signature
set scripts(
value):void
Defined in: libs/scene/src/scene/scene_node.ts:451
Parameters
value
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).scripts
scriptConfigs
Get Signature
get scriptConfigs():
unknown[]
Defined in: libs/scene/src/scene/scene_node.ts:457
Script configs for all script attachments.
Returns
unknown[]
Set Signature
set scriptConfigs(
value):void
Defined in: libs/scene/src/scene/scene_node.ts:460
Parameters
value
unknown[]
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).scriptConfigs
name
Get Signature
get name():
string
Defined in: libs/scene/src/scene/scene_node.ts:475
Display name of the node (for UI/debugging).
Returns
string
Set Signature
set name(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:478
Parameters
val
string
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).name
scene
Get Signature
get scene():
Scene
Defined in: libs/scene/src/scene/scene_node.ts:482
The owning scene.
Returns
Inherited from
applyMixins(GraphNode, mixinDrawable).scene
attached
Get Signature
get attached():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:488
Whether this node is currently attached under the scene's root.
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).attached
sealed
Get Signature
get sealed():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:502
If true, the node is logically sealed; some operations (like cloning as child) may be restricted by engine policies.
Returns
boolean
Set Signature
set sealed(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:505
Parameters
val
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).sealed
animationSet
Get Signature
get animationSet():
AnimationSet
Defined in: libs/scene/src/scene/scene_node.ts:514
Lazily created animation set for this node.
Remarks
Accessing this schedules the node for update in the scene.
Returns
Inherited from
applyMixins(GraphNode, mixinDrawable).animationSet
sharedModel
Get Signature
get sharedModel():
SharedModel
Defined in: libs/scene/src/scene/scene_node.ts:524
Shared model reference for instancing/streaming systems.
Returns
Set Signature
set sharedModel(
model):void
Defined in: libs/scene/src/scene/scene_node.ts:527
Parameters
model
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).sharedModel
morphTargetGroups
Get Signature
get morphTargetGroups():
SceneMorphTargetGroup[]
Defined in: libs/scene/src/scene/scene_node.ts:531
Runtime morph target groups bound to this model instance.
Returns
Set Signature
set morphTargetGroups(
groups):void
Defined in: libs/scene/src/scene/scene_node.ts:534
Parameters
groups
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).morphTargetGroups
clipTestEnabled
Get Signature
get clipTestEnabled():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:779
Clip mode
Returns
boolean
Set Signature
set clipTestEnabled(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:782
Parameters
val
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).clipTestEnabled
hidden
Get Signature
get hidden():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:786
Computed value of show state
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).hidden
showState
Get Signature
get showState():
SceneNodeVisible
Defined in: libs/scene/src/scene/scene_node.ts:794
Show state
Returns
Set Signature
set showState(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:797
Parameters
val
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).showState
pickable
Get Signature
get pickable():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:815
Whether this node is enabled for CPU picking
Returns
boolean
Set Signature
set pickable(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:818
Parameters
val
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).pickable
gpuPickable
Get Signature
get gpuPickable():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:822
Whether this node is enabled for GPU picking
Returns
boolean
Set Signature
set gpuPickable(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:825
Parameters
val
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).gpuPickable
computedBoundingBoxDrawMode
Get Signature
get computedBoundingBoxDrawMode():
number
Defined in: libs/scene/src/scene/scene_node.ts:907
Computed value for bounding box draw mode
Returns
number
Inherited from
applyMixins(GraphNode, mixinDrawable).computedBoundingBoxDrawMode
boundingBoxDrawMode
Get Signature
get boundingBoxDrawMode():
number
Defined in: libs/scene/src/scene/scene_node.ts:918
Bounding box draw mode
Returns
number
Set Signature
set boundingBoxDrawMode(
mode):void
Defined in: libs/scene/src/scene/scene_node.ts:921
Parameters
mode
number
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).boundingBoxDrawMode
parent
Get Signature
get parent():
SceneNode
Defined in: libs/scene/src/scene/scene_node.ts:1211
Parent of the xform
Returns
Set Signature
set parent(
p):void
Defined in: libs/scene/src/scene/scene_node.ts:1214
Parameters
p
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).parent
children
Get Signature
get children():
SceneNode[]
Defined in: libs/scene/src/scene/scene_node.ts:1220
Children of this xform
Returns
Inherited from
applyMixins(GraphNode, mixinDrawable).children
position
Get Signature
get position():
Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1226
Position of the xform relative to it's parent
Returns
Vector3
Set Signature
set position(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:1229
Parameters
val
Vector3
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).position
scale
Get Signature
get scale():
Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1235
Scaling of the xform
Returns
Vector3
Set Signature
set scale(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:1238
Parameters
val
Vector3
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).scale
rotation
Get Signature
get rotation():
Quaternion
Defined in: libs/scene/src/scene/scene_node.ts:1244
Rotation of the xform
Returns
Quaternion
Set Signature
set rotation(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:1247
Parameters
val
Quaternion
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).rotation
localMatrix
Get Signature
get localMatrix():
Immutable<Matrix4x4>
Defined in: libs/scene/src/scene/scene_node.ts:1353
Local transformation matrix of the xform
Returns
Immutable<Matrix4x4>
Set Signature
set localMatrix(
matrix):void
Defined in: libs/scene/src/scene/scene_node.ts:1360
Parameters
matrix
Immutable<Matrix4x4>
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).localMatrix
worldMatrix
Get Signature
get worldMatrix():
Immutable<Matrix4x4>
Defined in: libs/scene/src/scene/scene_node.ts:1364
World transformation matrix of the xform
Returns
Immutable<Matrix4x4>
Inherited from
applyMixins(GraphNode, mixinDrawable).worldMatrix
worldMatrixDet
Get Signature
get worldMatrixDet():
number
Defined in: libs/scene/src/scene/scene_node.ts:1369
The determinant of world matrix
Returns
number
Inherited from
applyMixins(GraphNode, mixinDrawable).worldMatrixDet
invWorldMatrix
Get Signature
get invWorldMatrix():
Immutable<Matrix4x4>
Defined in: libs/scene/src/scene/scene_node.ts:1374
Inverse of the world transformation matrix of the xform
Returns
Immutable<Matrix4x4>
Inherited from
applyMixins(GraphNode, mixinDrawable).invWorldMatrix
Methods
isPrototypeOf()
staticisPrototypeOf(v):boolean
Defined in: libs/base/dist/index.d.ts:80
Parameters
v
object
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).isPrototypeOf
on()
Call Signature
on<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:671
IEventTarget.on
Type Parameters
K
K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"
Parameters
type
K
listener
EventListener<object & object, K>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).on
Call Signature
on<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:630
IEventTarget.on
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).on
once()
Call Signature
once<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:675
IEventTarget.once
Type Parameters
K
K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"
Parameters
type
K
listener
EventListener<object & object, K>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).once
Call Signature
once<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:634
IEventTarget.once
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).once
off()
Call Signature
off<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:679
IEventTarget.off
Type Parameters
K
K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"
Parameters
type
K
listener
EventListener<object & object, K>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).off
Call Signature
off<
K>(type,listener?,context?):void
Defined in: libs/base/dist/index.d.ts:638
IEventTarget.off
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener?
EventListener<{ dispose: []; }>
context?
unknown
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).off
dispatchEvent()
Call Signature
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/dist/index.d.ts:683
IEventTarget.dispatchEvent
Type Parameters
K
K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"
Parameters
type
K
args
...object & object[K]
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).dispatchEvent
Call Signature
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/dist/index.d.ts:642
IEventTarget.dispatchEvent
Type Parameters
K
K extends "dispose"
Parameters
type
K
args
...object[K]
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).dispatchEvent
dispose()
dispose():
void
Defined in: libs/base/dist/index.d.ts:6108
Releases all GPU resources and detaches from the renderer.
Returns
void
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).dispose
getDrawableId()
getDrawableId():
number
Defined in: libs/scene/src/render/drawable_mixin.ts:14
Unique, stable identifier for the drawable, used in caches and picking.
Returns
number
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getDrawableId
pushRenderQueueRef()
pushRenderQueueRef(
ref):void
Defined in: libs/scene/src/render/drawable_mixin.ts:15
Pushes a reference to the current render queue for cleanup or back-references.
Useful for batching or delayed state application.
Parameters
ref
Returns
void
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).pushRenderQueueRef
applyInstanceOffsetAndStride()
applyInstanceOffsetAndStride(
renderQueue,stride,offset):void
Defined in: libs/scene/src/render/drawable_mixin.ts:16
Parameters
renderQueue
stride
number
offset
number
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).applyInstanceOffsetAndStride
applyTransformUniforms()
applyTransformUniforms(
renderQueue):void
Defined in: libs/scene/src/render/drawable_mixin.ts:17
Applies transform-related uniforms to the active bind group or pipeline.
Parameters
renderQueue
The current render queue issuing this draw.
Returns
void
Implementation of
Drawable.applyTransformUniforms
Inherited from
applyMixins(GraphNode, mixinDrawable).applyTransformUniforms
applyMaterialUniforms()
applyMaterialUniforms(
instanceInfo):void
Defined in: libs/scene/src/render/drawable_mixin.ts:18
Parameters
instanceInfo
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).applyMaterialUniforms
applyMaterialUniformsAll()
applyMaterialUniformsAll():
void
Defined in: libs/scene/src/render/drawable_mixin.ts:19
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).applyMaterialUniformsAll
getObjectColor()
getObjectColor():
Vector4
Defined in: libs/scene/src/render/drawable_mixin.ts:20
Returns the unique color used for GPU picking (object ID in color).
Returns
Vector4
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getObjectColor
updateState()
updateState():
void
Defined in: libs/scene/src/render/drawable_mixin.ts:21
Updates internal state or GPU resources for this drawable, if needed.
Returns
void
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).updateState
bind()
bind(
ctx,renderQueue):void
Defined in: libs/scene/src/render/drawable_mixin.ts:22
Parameters
ctx
renderQueue
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).bind
getName()
getName():
string
Defined in: libs/scene/src/scene/graph_node.ts:36
Gets the name
Returns
string
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getName
isGraphNode()
isGraphNode():
this is GraphNode
Defined in: libs/scene/src/scene/graph_node.ts:43
Type guard: true if this node is a graph node.
Returns
this is GraphNode
Inherited from
applyMixins(GraphNode, mixinDrawable).isGraphNode
getNode()
Call Signature
getNode():
HairNode
Defined in: libs/scene/src/scene/graph_node.ts:49
Returns the owning scene node (transform and hierarchy).
Returns
HairNode
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getNode
Call Signature
getNode():
SceneNode
Defined in: libs/scene/src/render/drawable_mixin.ts:88
Returns
Implementation of
Drawable.getNode
Inherited from
applyMixins(GraphNode, mixinDrawable).getNode
getBoneMatrices()
getBoneMatrices():
Texture2D<unknown>
Defined in: libs/scene/src/scene/graph_node.ts:55
Returns the texture containing bone matrices for skinned meshes.
Returns
Texture2D<unknown>
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getBoneMatrices
getSortDistance()
getSortDistance(
camera):number
Defined in: libs/scene/src/scene/graph_node.ts:61
Computes the distance used for sorting (e.g., transparent draw order).
Parameters
camera
Camera from which to compute distance (usually camera -> object).
Returns
number
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getSortDistance
isBatchable()
isBatchable():
this is BatchDrawable
Defined in: libs/scene/src/scene/graph_node.ts:72
Returns true if the object supports instanced rendering.
When true, the object should also implement the BatchDrawable methods.
Returns
this is BatchDrawable
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).isBatchable
setHairAsset()
setHairAsset(
path):Promise<void>
Defined in: libs/scene/src/scene/hair.ts:157
Loads a .zhair asset.
Parameters
path
string
Asset path, or an empty string to clear the node.
Returns
Promise<void>
Remarks
The opened file is kept, so changing HairNode.strandStride or HairNode.maxStrands afterwards re-decimates what is already in memory instead of reading it again - and never touches the source archive the asset was converted from.
setStrands()
setStrands(
source):void
Defined in: libs/scene/src/scene/hair.ts:239
Replaces the strands this node draws.
Parameters
source
Control points and topology, or null to clear the node.
Returns
void
Remarks
The direct route, for strands built in code rather than loaded from an asset. Uploads the control points, sizes the draw call and recomputes the bounding box; the previous strand data is released and any running simulation is rebuilt, since its rest pose comes from the strands.
update()
update(
frameId,elapsedInSeconds,deltaInSeconds):void
Defined in: libs/scene/src/scene/hair.ts:832
Update node state once per-frame
Parameters
frameId
number
Current frame id
elapsedInSeconds
number
Elapsed time from game start in seconds
deltaInSeconds
number
Elapsed time since previous frame in seconds
Returns
void
Overrides
applyMixins(GraphNode, mixinDrawable).update
computeBoundingVolume()
computeBoundingVolume():
BoundingBox
Defined in: libs/scene/src/scene/hair.ts:853
Computes the bounding volume of the node
Returns
The output bounding volume
Overrides
applyMixins(GraphNode, mixinDrawable).computeBoundingVolume
isHair()
isHair():
this is HairNode
Defined in: libs/scene/src/scene/hair.ts:866
Type guard: true if this node is a hair node.
Returns
this is HairNode
Overrides
applyMixins(GraphNode, mixinDrawable).isHair
getPickTarget()
getPickTarget():
PickTarget
Defined in: libs/scene/src/scene/hair.ts:870
Returns the pick target override to be reported when this object is picked.
If not set, a default target derived from the node/material may be used.
Returns
Implementation of
getMaterial()
getMaterial():
HairStrandMaterial
Defined in: libs/scene/src/scene/hair.ts:874
Returns the bound material driving shading for this drawable.
Returns
Implementation of
getPrimitive()
getPrimitive():
Primitive
Defined in: libs/scene/src/scene/hair.ts:878
Returns the geometry primitive to be drawn.
Returns
Implementation of
getMorphData()
getMorphData():
any
Defined in: libs/scene/src/scene/hair.ts:882
Returns the morph target data texture (if morphing is used).
Returns
any
Implementation of
getMorphInfo()
getMorphInfo():
any
Defined in: libs/scene/src/scene/hair.ts:886
Returns the morph information buffer (weights, ranges, etc.).
Returns
any
Implementation of
getSkinInfluenceData()
getSkinInfluenceData():
any
Defined in: libs/scene/src/scene/hair.ts:890
Returns additional per-vertex skinning influences packed in a texture, if needed.
Returns
any
Implementation of
getQueueType()
getQueueType():
number
Defined in: libs/scene/src/scene/hair.ts:894
Returns the type/category of render queue this object belongs to.
Returns
number
Implementation of
isUnlit()
isUnlit():
boolean
Defined in: libs/scene/src/scene/hair.ts:898
True if shading is unlit (does not depend on scene lighting).
Returns
boolean
Implementation of
needSceneColor()
needSceneColor():
boolean
Defined in: libs/scene/src/scene/hair.ts:902
Whether the object requires access to the scene color buffer.
Returns
boolean
Implementation of
needSceneDepth()
needSceneDepth():
boolean
Defined in: libs/scene/src/scene/hair.ts:906
Whether the object requires access to the scene depth (linear or non-linear).
Returns
boolean
Implementation of
draw()
draw(
ctx,renderQueue):void
Defined in: libs/scene/src/scene/hair.ts:910
Issues draw commands for this object.
Parameters
ctx
Full draw context for the current pass.
renderQueue
The current render queue issuing this draw.
Returns
void
Implementation of
onDispose()
protectedonDispose():void
Defined in: libs/scene/src/scene/hair.ts:920
Disposes the node
Returns
void
Overrides
applyMixins(GraphNode, mixinDrawable).onDispose
getPrefabNode()
getPrefabNode():
SceneNode
Defined in: libs/scene/src/scene/scene_node.ts:358
Get prefab node this node belongs to, or null if this node does not belongs to any prefab
Returns
prefab node this node belongs to
Inherited from
applyMixins(GraphNode, mixinDrawable).getPrefabNode
clone()
clone():
Promise<HairNode>
Defined in: libs/scene/src/scene/scene_node.ts:548
Clone this node.
Returns
Promise<HairNode>
New node instance
Remarks
If a shared model exists, it may create an instanced node. The clone is attached under the same parent; children are cloned based on method and recursive.
Inherited from
applyMixins(GraphNode, mixinDrawable).clone
hasChild()
hasChild(
child):boolean
Defined in: libs/scene/src/scene/scene_node.ts:578
Whether the given node is a direct child of this node.
Parameters
child
The node to be checked
Returns
boolean
true if the given node is a direct child of this node, false otherwise
Inherited from
applyMixins(GraphNode, mixinDrawable).hasChild
removeChildren()
removeChildren():
void
Defined in: libs/scene/src/scene/scene_node.ts:584
Remove all children from this node.
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).removeChildren
isParentOf()
isParentOf(
child):boolean
Defined in: libs/scene/src/scene/scene_node.ts:592
Whether this node is an ancestor (direct or indirect) of the given node.
Parameters
child
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).isParentOf
remove()
remove():
HairNode
Defined in: libs/scene/src/scene/scene_node.ts:603
Detach this node from its parent.
Returns
HairNode
this
Inherited from
applyMixins(GraphNode, mixinDrawable).remove
traverse()
traverse(
v):void
Defined in: libs/scene/src/scene/scene_node.ts:612
Depth-first traversal of this node's subtree (pre-order).
Parameters
v
Visitor invoked on each node.
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).traverse
iterate()
iterate(
callback):boolean
Defined in: libs/scene/src/scene/scene_node.ts:626
Iterate self and descendants in pre-order.
Warning: Do not remove children during this iteration. To allow removal, use iterateBottomToTop.
Parameters
callback
Called for each node; if returns true, iteration stops.
Returns
boolean
If returns true, the iteration will immediately stop.
Inherited from
applyMixins(GraphNode, mixinDrawable).iterate
iterateBottomToTop()
iterateBottomToTop(
callback):boolean
Defined in: libs/scene/src/scene/scene_node.ts:645
Iterate self and descendants in reverse post-order (bottom-to-top).
Child nodes can be safely removed during this iteration.
Parameters
callback
Called for each node; if returns true, iteration stops.
Returns
boolean
If returns true, the iteration will immediately stop.
Inherited from
applyMixins(GraphNode, mixinDrawable).iterateBottomToTop
isLight()
isLight():
this is BaseLight
Defined in: libs/scene/src/scene/scene_node.ts:662
Type guard: true if this node is a light.
Returns
this is BaseLight
Inherited from
applyMixins(GraphNode, mixinDrawable).isLight
isMesh()
isMesh():
this is Mesh
Defined in: libs/scene/src/scene/scene_node.ts:666
Type guard: true if this node is a mesh.
Returns
this is Mesh
Inherited from
applyMixins(GraphNode, mixinDrawable).isMesh
isSprite()
isSprite():
this is Sprite
Defined in: libs/scene/src/scene/scene_node.ts:670
Type guard: true if this node is a sprite
Returns
this is Sprite
Inherited from
applyMixins(GraphNode, mixinDrawable).isSprite
isMSDFTextSprite()
isMSDFTextSprite():
this is MSDFTextSprite
Defined in: libs/scene/src/scene/scene_node.ts:674
Type guard: true if this node is a MSDF text sprite
Returns
this is MSDFTextSprite
Inherited from
applyMixins(GraphNode, mixinDrawable).isMSDFTextSprite
isMSDFText()
isMSDFText():
this is MSDFText
Defined in: libs/scene/src/scene/scene_node.ts:678
Type guard: true if this node is a MSDF text sprite
Returns
this is MSDFText
Inherited from
applyMixins(GraphNode, mixinDrawable).isMSDFText
isWater()
isWater():
this is Water
Defined in: libs/scene/src/scene/scene_node.ts:682
Type guard: true if this node is a water node.
Returns
this is Water
Inherited from
applyMixins(GraphNode, mixinDrawable).isWater
isParticleSystem()
isParticleSystem():
this is ParticleSystem
Defined in: libs/scene/src/scene/scene_node.ts:690
Type guard: true if this node is a particle system.
Returns
this is ParticleSystem
Inherited from
applyMixins(GraphNode, mixinDrawable).isParticleSystem
isBatchGroup()
isBatchGroup():
this is BatchGroup
Defined in: libs/scene/src/scene/scene_node.ts:694
Type guard: true if this node is a batch group.
Returns
this is BatchGroup
Inherited from
applyMixins(GraphNode, mixinDrawable).isBatchGroup
isClipmapTerrain()
isClipmapTerrain():
this is ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:698
Type guard: true if this node is a clipmap terrain.
Returns
this is ClipmapTerrain
Inherited from
applyMixins(GraphNode, mixinDrawable).isClipmapTerrain
isCamera()
isCamera():
this is Camera
Defined in: libs/scene/src/scene/scene_node.ts:702
true if this is a camera node, false otherwise
Returns
this is Camera
Inherited from
applyMixins(GraphNode, mixinDrawable).isCamera
isPunctualLight()
isPunctualLight():
this is PunctualLight
Defined in: libs/scene/src/scene/scene_node.ts:706
true if this is a punctual light node, false otherwise
Returns
this is PunctualLight
Inherited from
applyMixins(GraphNode, mixinDrawable).isPunctualLight
getBoundingVolume()
getBoundingVolume():
BoundingVolume
Defined in: libs/scene/src/scene/scene_node.ts:720
Gets the bounding volume of the node
Returns
The bounding volume of the node
Inherited from
applyMixins(GraphNode, mixinDrawable).getBoundingVolume
setBoundingVolume()
setBoundingVolume(
bv):void
Defined in: libs/scene/src/scene/scene_node.ts:731
Sets the bounding volume of the node
Parameters
bv
The bounding volume to set
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).setBoundingVolume
getWorldBoundingVolume()
getWorldBoundingVolume():
BoundingVolume
Defined in: libs/scene/src/scene/scene_node.ts:742
Gets the world space bounding volume of the node
Returns
The world space bounding volume of the node
Inherited from
applyMixins(GraphNode, mixinDrawable).getWorldBoundingVolume
computeWorldBoundingVolume()
computeWorldBoundingVolume(
localBV):BoundingVolume
Defined in: libs/scene/src/scene/scene_node.ts:752
Computes the world space bounding volume of the node
Parameters
localBV
Returns
The output bounding volume
Inherited from
applyMixins(GraphNode, mixinDrawable).computeWorldBoundingVolume
invalidateBoundingVolume()
invalidateBoundingVolume():
void
Defined in: libs/scene/src/scene/scene_node.ts:758
Force the bounding volume to be recalculated
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).invalidateBoundingVolume
invalidateWorldBoundingVolume()
invalidateWorldBoundingVolume(
transformChanged):void
Defined in: libs/scene/src/scene/scene_node.ts:763
Force the world space bounding volume to be recalculated
Parameters
transformChanged
boolean
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).invalidateWorldBoundingVolume
findNodeById()
findNodeById<
T>(id):T
Defined in: libs/scene/src/scene/scene_node.ts:835
Finds a scene node by its persistent ID.
Type Parameters
T
T extends SceneNode
Expected node type.
Parameters
id
string
Persistent identifier to match against SceneNode.persistentId.
Returns
T
The first matching node, or null if not found.
Inherited from
applyMixins(GraphNode, mixinDrawable).findNodeById
findSkeletonById()
findSkeletonById(
id):SkinBinding
Defined in: libs/scene/src/scene/scene_node.ts:850
Finds a skeleton object by its persistent ID.
Parameters
id
string
Persistent identifier to match against Skeleton.persistentId.
Returns
The first matchign node, or null if not found.
Inherited from
applyMixins(GraphNode, mixinDrawable).findSkeletonById
findSkinBindingById()
findSkinBindingById(
id):SkinBinding
Defined in: libs/scene/src/scene/scene_node.ts:858
Finds a skin binding by its persistent ID.
Parameters
id
string
Persistent identifier to match against SkinBinding.persistentId.
Returns
The first matching binding, or null if not found.
Inherited from
applyMixins(GraphNode, mixinDrawable).findSkinBindingById
findSkeletonRigById()
findSkeletonRigById(
id):SkeletonRig
Defined in: libs/scene/src/scene/scene_node.ts:873
Finds a shared skeleton rig by its persistent ID.
Parameters
id
string
Persistent identifier to match against SkeletonRig.persistentId.
Returns
The first matching rig, or null if not found.
Inherited from
applyMixins(GraphNode, mixinDrawable).findSkeletonRigById
findNodeByName()
findNodeByName<
T>(name):T
Defined in: libs/scene/src/scene/scene_node.ts:895
Finds a scene node by name.
If multiple nodes share the same name, returns the first match encountered during traversal.
Type Parameters
T
T extends SceneNode
Expected node type.
Parameters
name
string
Node name to match.
Returns
T
The first matching node, or null if not found.
Remarks
Names are not guaranteed unique. Prefer IDs for stable references.
Inherited from
applyMixins(GraphNode, mixinDrawable).findNodeByName
getSerializedMorphTargetGroups()
getSerializedMorphTargetGroups():
SerializedMorphTargetGroup[]
Defined in: libs/scene/src/scene/scene_node.ts:978
Returns serialized morph target groups for this node.
Returns
Inherited from
applyMixins(GraphNode, mixinDrawable).getSerializedMorphTargetGroups
setSerializedMorphTargetGroups()
setSerializedMorphTargetGroups(
groups):void
Defined in: libs/scene/src/scene/scene_node.ts:996
Restores serialized morph target groups for this node.
Parameters
groups
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).setSerializedMorphTargetGroups
invalidateTransform()
invalidateTransform(
invalidateLocal?):void
Defined in: libs/scene/src/scene/scene_node.ts:1032
Force transform update and notify descendants.
Parameters
invalidateLocal?
boolean = true
If true, also invalidate local matrix; otherwise only invalidate world matrix.
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).invalidateTransform
setMorphTargetWeight()
setMorphTargetWeight(
name,weight):void
Defined in: libs/scene/src/scene/scene_node.ts:1040
Set morph target weight by name for all meshes in the subtree.
Parameters
name
string
Morph target name
weight
number
Morph target weight
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).setMorphTargetWeight
setMorphTargetGroupWeight()
setMorphTargetGroupWeight(
name,weight):void
Defined in: libs/scene/src/scene/scene_node.ts:1056
Set morph target group weight for the model instance.
Parameters
name
string
Morph target group name
weight
number
Group weight
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).setMorphTargetGroupWeight
getMorphTargetGroupWeight()
getMorphTargetGroupWeight(
name):number
Defined in: libs/scene/src/scene/scene_node.ts:1078
Get morph target group weight.
Parameters
name
string
Morph target group name
Returns
number
The group weight, or 0 if no group was found
Inherited from
applyMixins(GraphNode, mixinDrawable).getMorphTargetGroupWeight
collectMorphTargetNames()
collectMorphTargetNames():
string[]
Defined in: libs/scene/src/scene/scene_node.ts:1086
Collect all morph target names from meshes in the subtree.
Returns
string[]
Array of unique morph target names
Inherited from
applyMixins(GraphNode, mixinDrawable).collectMorphTargetNames
collectMorphTargetGroupNames()
collectMorphTargetGroupNames():
string[]
Defined in: libs/scene/src/scene/scene_node.ts:1102
Collect all model-level morph target group names.
Returns
string[]
Array of morph target group names
Inherited from
applyMixins(GraphNode, mixinDrawable).collectMorphTargetGroupNames
onPostClone()
protectedonPostClone():void|Promise<void>
Defined in: libs/scene/src/scene/scene_node.ts:1111
Get called when the node was just created by cloning from other node
Returns
void | Promise<void>
Inherited from
applyMixins(GraphNode, mixinDrawable).onPostClone
_onAttached()
protected_onAttached():void
Defined in: libs/scene/src/scene/scene_node.ts:1181
Get called when this node is attached to scene
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable)._onAttached
_onDetached()
protected_onDetached():void
Defined in: libs/scene/src/scene/scene_node.ts:1185
Get called when this node is detached from scene
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable)._onDetached
worldToThis()
Call Signature
worldToThis(
v,result?):Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1256
Transform world coordinate to local space
Parameters
v
Vector3
point or vector in world space
result?
Vector3
The output result
Returns
Vector3
The transformed local space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).worldToThis
Call Signature
worldToThis(
v,result?):Vector4
Defined in: libs/scene/src/scene/scene_node.ts:1257
Transform world coordinate to local space
Parameters
v
Vector4
point or vector in world space
result?
Vector4
The output result
Returns
Vector4
The transformed local space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).worldToThis
otherToThis()
Call Signature
otherToThis(
other,v,result?):Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1276
Transform coordinate in other coordinate space to local space
Parameters
other
The other coordinate space
v
Vector3
point or vector in other coordinate space
result?
Vector3
The output result
Returns
Vector3
The transformed local space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).otherToThis
Call Signature
otherToThis(
other,v,result?):Vector4
Defined in: libs/scene/src/scene/scene_node.ts:1277
Transform coordinate in other coordinate space to local space
Parameters
other
The other coordinate space
v
Vector4
point or vector in other coordinate space
result?
Vector4
The output result
Returns
Vector4
The transformed local space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).otherToThis
thisToWorld()
Call Signature
thisToWorld(
v,result?):Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1287
Transform local coordinate to world space
Parameters
v
Vector3
point or vector in local space
result?
Vector3
The output result
Returns
Vector3
The transformed world space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).thisToWorld
Call Signature
thisToWorld(
v,result?):Vector4
Defined in: libs/scene/src/scene/scene_node.ts:1288
Transform local coordinate to world space
Parameters
v
Vector4
point or vector in local space
result?
Vector4
The output result
Returns
Vector4
The transformed world space coordinate
Inherited from
applyMixins(GraphNode, mixinDrawable).thisToWorld
thisToOther()
Call Signature
thisToOther(
other,v,result?):Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1307
Transform local space coordinate to other coordinate space
Parameters
other
The other coordinate space
v
Vector3
point or vector in localspace
result?
Vector3
The output result
Returns
Vector3
The transformed coordinate in other coordinate space
Inherited from
applyMixins(GraphNode, mixinDrawable).thisToOther
Call Signature
thisToOther(
other,v,result?):Vector4
Defined in: libs/scene/src/scene/scene_node.ts:1308
Transform local space coordinate to other coordinate space
Parameters
other
The other coordinate space
v
Vector4
point or vector in localspace
result?
Vector4
The output result
Returns
Vector4
The transformed coordinate in other coordinate space
Inherited from
applyMixins(GraphNode, mixinDrawable).thisToOther
getWorldPosition()
getWorldPosition(
outPos?):Vector3
Defined in: libs/scene/src/scene/scene_node.ts:1316
Gets the position of the xform in world space
Parameters
outPos?
Vector3
Returns
Vector3
position of the xform in world space
Inherited from
applyMixins(GraphNode, mixinDrawable).getWorldPosition
moveBy()
moveBy(
delta):HairNode
Defined in: libs/scene/src/scene/scene_node.ts:1327
Moves the xform by an offset vector
Parameters
delta
Vector3
The offset vector
Returns
HairNode
self
Inherited from
applyMixins(GraphNode, mixinDrawable).moveBy
scaleBy()
scaleBy(
factor):HairNode
Defined in: libs/scene/src/scene/scene_node.ts:1336
Scales the xform by a given scale factor
Parameters
factor
Vector3
The scale factor
Returns
HairNode
self
Inherited from
applyMixins(GraphNode, mixinDrawable).scaleBy
setLocalTransform()
setLocalTransform(
matrix):HairNode
Defined in: libs/scene/src/scene/scene_node.ts:1345
Sets the local transform matrix of the xform
Parameters
matrix
Matrix4x4
The transform matrix to set
Returns
HairNode
self
Inherited from
applyMixins(GraphNode, mixinDrawable).setLocalTransform
calculateLocalTransform()
calculateLocalTransform(
outMatrix):void
Defined in: libs/scene/src/scene/scene_node.ts:1382
Calculate local transform matrix
Parameters
outMatrix
Matrix4x4
Matrix object that holds the result of calculation
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).calculateLocalTransform
calculateWorldTransform()
calculateWorldTransform(
outMatrix):void
Defined in: libs/scene/src/scene/scene_node.ts:1389
Calculate world transform matrix
Parameters
outMatrix
Matrix4x4
Matrix object that holds the result of calculation
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).calculateWorldTransform
lookAt()
lookAt(
eye,target,up):HairNode
Defined in: libs/scene/src/scene/scene_node.ts:1403
Sets the local tranformation matrix by a look-at matrix
Parameters
eye
Vector3
The eye position used to make the look-at matrix
target
Vector3
The target position used to make the look-at matrix
up
Vector3
The up vector used to make the look-at matrix
Returns
HairNode
self
Inherited from
applyMixins(GraphNode, mixinDrawable).lookAt
updatePerCamera()
updatePerCamera(
_camera,_elapsedInSeconds,_deltaInSeconds):void
Defined in: libs/scene/src/scene/scene_node.ts:1433
Update node state once per-camera
Parameters
_camera
Updates according to which camera
_elapsedInSeconds
number
Elapsed time from game start in seconds
_deltaInSeconds
number
Elapsed time since previous frame in seconds
Returns
void
Inherited from
applyMixins(GraphNode, mixinDrawable).updatePerCamera
reparent()
reparent(
p?):HairNode
Defined in: libs/scene/src/scene/scene_node.ts:1439
Removes this node from it's parent and add this node to another parent node if required
Parameters
p?
The new parent node that this node should be added to or null
Returns
HairNode
self
Inherited from
applyMixins(GraphNode, mixinDrawable).reparent