Documentation / scene / ClipmapTerrain
Class: ClipmapTerrain
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:68
ClipmapTerrain implements an efficient terrain rendering system using clipmaps.
Clipmaps provide level-of-detail (LOD) rendering for large terrains by using multiple nested grids at different resolutions. The terrain automatically adjusts detail levels based on camera distance, providing high detail near the camera and lower detail in the distance.
Key features:
- Automatic LOD management based on camera position
- Support for height maps, splat maps, and detail textures
- Integrated grass rendering system
Extends
GraphNode<this> &object&Disposable<this> &IMixinDrawable
Implements
Constructors
Constructor
new ClipmapTerrain(
scene,sizeX?,sizeZ?,clipMapTileSize?):ClipmapTerrain
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:97
Creates a new clipmap terrain instance.
Parameters
scene
Scene to add the terrain to
sizeX?
number = 256
Terrain width in world units (default: 256)
sizeZ?
number = 256
Terrain depth in world units (default: 256)
clipMapTileSize?
number = 64
Size of each clipmap tile in vertices (default: 64) Larger values use more memory but reduce draw calls
Returns
ClipmapTerrain
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:166
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:168
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:170
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:172
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:6065
Returns
boolean
Inherited from
applyMixins(GraphNode, mixinDrawable).disposed
placeToOctree
Get Signature
get placeToOctree():
boolean
Defined in: libs/scene/src/scene/scene_node.ts:312
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:315
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:326
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:335
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:338
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:347
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:350
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:366
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:369
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:378
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:381
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:390
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:393
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:402
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:405
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:414
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:417
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:430
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:433
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:447
All script attachments on this node.
Returns
Set Signature
set scripts(
value):void
Defined in: libs/scene/src/scene/scene_node.ts:450
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:456
Script configs for all script attachments.
Returns
unknown[]
Set Signature
set scriptConfigs(
value):void
Defined in: libs/scene/src/scene/scene_node.ts:459
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:474
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:477
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:481
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:487
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:501
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:504
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:513
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:523
Shared model reference for instancing/streaming systems.
Returns
Set Signature
set sharedModel(
model):void
Defined in: libs/scene/src/scene/scene_node.ts:526
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:530
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:533
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:774
Clip mode
Returns
boolean
Set Signature
set clipTestEnabled(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:777
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:781
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:789
Show state
Returns
Set Signature
set showState(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:792
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:810
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:813
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:817
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:820
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:902
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:913
Bounding box draw mode
Returns
number
Set Signature
set boundingBoxDrawMode(
mode):void
Defined in: libs/scene/src/scene/scene_node.ts:916
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:1204
Parent of the xform
Returns
Set Signature
set parent(
p):void
Defined in: libs/scene/src/scene/scene_node.ts:1207
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:1213
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:1219
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:1222
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:1228
Scaling of the xform
Returns
Vector3
Set Signature
set scale(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:1231
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:1237
Rotation of the xform
Returns
Quaternion
Set Signature
set rotation(
val):void
Defined in: libs/scene/src/scene/scene_node.ts:1240
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:1346
Local transformation matrix of the xform
Returns
Immutable<Matrix4x4>
Set Signature
set localMatrix(
matrix):void
Defined in: libs/scene/src/scene/scene_node.ts:1353
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:1357
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:1362
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:1367
Inverse of the world transformation matrix of the xform
Returns
Immutable<Matrix4x4>
Inherited from
applyMixins(GraphNode, mixinDrawable).invWorldMatrix
grassRenderer
Get Signature
get grassRenderer():
GrassRenderer
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:125
Gets the integrated grass renderer for this terrain. The grass renderer handles vegetation rendering on the terrain surface.
Returns
The grass renderer instance
MAX_DETAIL_MAP_COUNT
Get Signature
get MAX_DETAIL_MAP_COUNT():
number
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:134
Gets the maximum number of detail maps supported by the terrain material. Detail maps provide surface texturing (grass, rock, sand, etc.).
Returns
number
Maximum number of detail maps
numDetailMaps
Get Signature
get numDetailMaps():
number
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:194
The current number of active detail maps. Detail maps define different surface materials (grass, rock, etc.).
Returns
number
Number of active detail maps
Set Signature
set numDetailMaps(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:197
Parameters
val
number
Returns
void
castShadow
Get Signature
get castShadow():
boolean
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:221
Wether the mesh node casts shadows
Returns
boolean
Set Signature
set castShadow(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:224
Parameters
val
boolean
Returns
void
sizeX
Get Signature
get sizeX():
number
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:228
The terrain width.
Returns
number
Set Signature
set sizeX(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:231
Parameters
val
number
Returns
void
sizeZ
Get Signature
get sizeZ():
number
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:238
The terrain depth.
Returns
number
Set Signature
set sizeZ(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:241
Parameters
val
number
Returns
void
heightMap
Get Signature
get heightMap():
Texture2D<unknown>
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:248
The current height map texture.
Returns
Texture2D<unknown>
Set Signature
set heightMap(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:251
Parameters
val
Texture2D<unknown>
Returns
void
splatMap
Get Signature
get splatMap():
Texture2D<unknown> |Texture2DArray<unknown>
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:258
The splat map texture
Returns
Texture2D<unknown> | Texture2DArray<unknown>
material
Get Signature
get material():
ClipmapTerrainMaterial
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:262
Material instance of the terrain
Returns
wireframe
Get Signature
get wireframe():
boolean
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:266
whether wireframe rendering is enabled
Returns
boolean
Set Signature
set wireframe(
val):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:269
Parameters
val
boolean
Returns
void
worldRegion
Get Signature
get worldRegion():
Immutable<Vector4>
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:357
the actual world-space region covered by this terrain (After applying world transform).
Returns
Immutable<Vector4>
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:635
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:594
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:639
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:598
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:643
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:602
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:647
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:606
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:6066
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():
ClipmapTerrain
Defined in: libs/scene/src/scene/graph_node.ts:49
Returns the owning scene node (transform and hierarchy).
Returns
ClipmapTerrain
Implementation of
Inherited from
applyMixins(GraphNode, mixinDrawable).getNode
Call Signature
getNode():
SceneNode
Defined in: libs/scene/src/render/drawable_mixin.ts:69
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
getPrefabNode()
getPrefabNode():
SceneNode
Defined in: libs/scene/src/scene/scene_node.ts:357
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
hasChild()
hasChild(
child):boolean
Defined in: libs/scene/src/scene/scene_node.ts:577
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:583
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:591
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():
ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:602
Detach this node from its parent.
Returns
ClipmapTerrain
this
Inherited from
applyMixins(GraphNode, mixinDrawable).remove
traverse()
traverse(
v):void
Defined in: libs/scene/src/scene/scene_node.ts:611
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:625
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:644
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:661
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:665
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:669
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:673
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:677
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:681
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:685
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:689
Type guard: true if this node is a batch group.
Returns
this is BatchGroup
Inherited from
applyMixins(GraphNode, mixinDrawable).isBatchGroup
isCamera()
isCamera():
this is Camera
Defined in: libs/scene/src/scene/scene_node.ts:697
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:701
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:715
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:726
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:737
Gets the world space bounding volume of the node
Returns
The world space bounding volume of the node
Inherited from
applyMixins(GraphNode, mixinDrawable).getWorldBoundingVolume
invalidateBoundingVolume()
invalidateBoundingVolume():
void
Defined in: libs/scene/src/scene/scene_node.ts:753
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:758
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:830
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:845
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:853
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:868
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:890
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:973
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:991
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:1027
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:1035
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:1051
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:1073
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:1081
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:1097
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:1106
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:1174
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:1178
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:1249
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:1250
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:1269
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:1270
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:1280
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:1281
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:1300
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:1301
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:1309
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):ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:1320
Moves the xform by an offset vector
Parameters
delta
Vector3
The offset vector
Returns
ClipmapTerrain
self
Inherited from
applyMixins(GraphNode, mixinDrawable).moveBy
scaleBy()
scaleBy(
factor):ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:1329
Scales the xform by a given scale factor
Parameters
factor
Vector3
The scale factor
Returns
ClipmapTerrain
self
Inherited from
applyMixins(GraphNode, mixinDrawable).scaleBy
setLocalTransform()
setLocalTransform(
matrix):ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:1338
Sets the local transform matrix of the xform
Parameters
matrix
Matrix4x4
The transform matrix to set
Returns
ClipmapTerrain
self
Inherited from
applyMixins(GraphNode, mixinDrawable).setLocalTransform
lookAt()
lookAt(
eye,target,up):ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:1396
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
ClipmapTerrain
self
Inherited from
applyMixins(GraphNode, mixinDrawable).lookAt
update()
update(
frameId,elapsedInSeconds,deltaInSeconds):void
Defined in: libs/scene/src/scene/scene_node.ts:1406
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
Inherited from
applyMixins(GraphNode, mixinDrawable).update
reparent()
reparent(
p?):ClipmapTerrain
Defined in: libs/scene/src/scene/scene_node.ts:1432
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
ClipmapTerrain
self
Inherited from
applyMixins(GraphNode, mixinDrawable).reparent
clone()
clone():
Promise<ClipmapTerrain>
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:203
Clone this node.
Returns
Promise<ClipmapTerrain>
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.
Overrides
applyMixins(GraphNode, mixinDrawable).clone
setSize()
setSize(
sizeX,sizeZ):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:213
Sets the terrain size. Triggers height map resize if dimensions change.
Parameters
sizeX
number
New width
sizeZ
number
New depth
Returns
void
getPickTarget()
getPickTarget():
PickTarget
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:275
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
getMorphData()
getMorphData():
any
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:281
Returns the morph target data texture (if morphing is used).
Returns
any
Implementation of
getMorphInfo()
getMorphInfo():
any
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:287
Returns the morph information buffer (weights, ranges, etc.).
Returns
any
Implementation of
getQueueType()
getQueueType():
number
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:293
Returns the type/category of render queue this object belongs to.
Returns
number
Implementation of
isUnlit()
isUnlit():
boolean
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:299
True if shading is unlit (does not depend on scene lighting).
Returns
boolean
Implementation of
needSceneColor()
needSceneColor():
boolean
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:305
Whether the object requires access to the scene color buffer.
Returns
boolean
Implementation of
needSceneDepth()
needSceneDepth():
boolean
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:311
Whether the object requires access to the scene depth (linear or non-linear).
Returns
boolean
Implementation of
getMaterial()
getMaterial():
ClipmapTerrainMaterial
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:317
Returns the bound material driving shading for this drawable.
Returns
Implementation of
getPrimitive()
getPrimitive():
any
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:323
Returns the geometry primitive to be drawn.
Returns
any
Implementation of
isClipmapTerrain()
isClipmapTerrain():
this is ClipmapTerrain
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:329
Type guard: true if this node is a clipmap terrain.
Returns
this is ClipmapTerrain
Overrides
applyMixins(GraphNode, mixinDrawable).isClipmapTerrain
computeBoundingVolume()
computeBoundingVolume():
any
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:335
Computes the bounding volume of the node
Returns
any
The output bounding volume
Overrides
applyMixins(GraphNode, mixinDrawable).computeBoundingVolume
computeWorldBoundingVolume()
computeWorldBoundingVolume():
BoundingBox
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:341
Computes the world space bounding volume of the node
Returns
The output bounding volume
Overrides
applyMixins(GraphNode, mixinDrawable).computeWorldBoundingVolume
calculateLocalTransform()
calculateLocalTransform(
outMatrix):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:366
Calculates the local transformation matrix. For terrains, this only includes translation.
Parameters
outMatrix
Matrix4x4
Output matrix to store the result
Returns
void
Overrides
applyMixins(GraphNode, mixinDrawable).calculateLocalTransform
calculateWorldTransform()
calculateWorldTransform(
outMatrix):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:375
Calculates the world transformation matrix. Terrains inherit only translation from parent nodes.
Parameters
outMatrix
Matrix4x4
Output matrix to store the result
Returns
void
Overrides
applyMixins(GraphNode, mixinDrawable).calculateWorldTransform
updateBoundingBox()
updateBoundingBox():
void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:396
Updates the terrain's bounding box by analyzing the height map. This is an asynchronous operation that reads back GPU data.
Returns
void
Example
// Update bounding box after changing height map
terrain.heightMap = newHeightMap;
terrain.updateBoundingBox();updatePerCamera()
updatePerCamera(
camera,_elapsedInSeconds,_deltaInSeconds):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:441
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
Overrides
applyMixins(GraphNode, mixinDrawable).updatePerCamera
updateRegion()
updateRegion():
void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:499
Updates the terrain material region based on current position and scale. Should be called after changing position, scale, or height map.
Returns
void
draw()
draw(
ctx,renderQueue):void
Defined in: libs/scene/src/scene/terrain-cm/terrain-cm.ts:514
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/terrain-cm/terrain-cm.ts:609
Disposes of all resources used by this terrain. Should be called when the terrain is no longer needed.
Returns
void
Overrides
applyMixins(GraphNode, mixinDrawable).onDispose