Class Node
Hierarchy
- Node
Implements
Index
Constructors
Properties
Accessors
Methods
- add
Behavior - begin
Animation - compute
World Matrix - create
Animation Range - delete
Animation Range - dispose
- get
Animation ByName - get
Animation Range - get
Animation Ranges - get
Behavior ByName - get
Child Meshes - get
Children - get
Class Name - get
Descendants - get
Engine - get
Hierarchy Bounding Vectors - get
Scene - get
World Matrix - is
Descendant Of - is
Disposed - is
Enabled - is
Ready - remove
Behavior - serialize
Animation Ranges - set
Enabled - Add
Node Constructor - Construct
- Parse
Animation Ranges
Constructors
constructor
Properties
animationsSearch playground for animations
Gets a list of Animations associated with the node
idSearch playground for id
Gets or sets the id of the node
inspectable Custom PropertiesSearch playground for inspectableCustomProperties
List of inspectable custom properties (used by the Inspector)
metadataSearch playground for metadata
Gets or sets an object used to store user defined information for the node
nameSearch playground for name
Gets or sets the name of the node
on Dispose ObservableSearch playground for onDisposeObservable
An event triggered when the mesh is disposed
on ReadySearch playground for onReady
Callback raised when the node is ready to be used
reserved Data StoreSearch playground for reservedDataStore
For internal use only. Please do not use.
stateSearch playground for state
Gets or sets a string used to store user defined state for the node
unique IdSearch playground for uniqueId
Gets or sets the unique id of the node
Accessors
animation Properties Override
-
Gets or sets the animation properties override
Returns Nullable<AnimationPropertiesOverride>
-
Gets or sets the animation properties override
Parameters
-
value: Nullable<AnimationPropertiesOverride>
Returns any
-
behaviors
do Not Serialize
-
Gets or sets a boolean used to define if the node must be serialized
Returns boolean
-
Gets or sets a boolean used to define if the node must be serialized
Parameters
-
value: boolean
Returns any
-
on Dispose
-
Sets a callback that will be raised when the node will be disposed
Parameters
-
callback: () => void
-
-
Returns void
-
-
Returns any
-
parent
world Matrix From Cache
-
Returns directly the latest state of the mesh World matrix. A Matrix is returned.
Returns Matrix
Methods
add BehaviorSearch playground for addBehavior
begin AnimationSearch playground for beginAnimation
-
Will start the animation sequence
Parameters
-
name: string
defines the range frames for animation sequence
-
Optional loop: boolean
defines if the animation should loop (false by default)
-
Optional speedRatio: number
defines the speed factor in which to run the animation (1 by default)
-
Optional onAnimationEnd: () => void
defines a function to be executed when the animation ended (undefined by default)
-
-
Returns void
-
-
Returns Nullable<Animatable>
the object created for this animation. If range does not exist, it will return null
-
compute World MatrixSearch playground for computeWorldMatrix
-
Computes the world matrix of the node
Parameters
-
Optional force: boolean
defines if the cache version should be invalidated forcing the world matrix to be created from scratch
Returns Matrix
the world matrix
-
create Animation RangeSearch playground for createAnimationRange
-
Creates an animation range for this node
Parameters
-
name: string
defines the name of the range
-
from: number
defines the starting key
-
to: number
defines the end key
Returns void
-
delete Animation RangeSearch playground for deleteAnimationRange
-
Delete a specific animation range
Parameters
-
name: string
defines the name of the range to delete
-
Optional deleteFrames: boolean
defines if animation frames from the range must be deleted as well
Returns void
-
disposeSearch playground for dispose
-
Releases resources associated with this node.
Parameters
-
Optional doNotRecurse: boolean
Set to true to not recurse into each children (recurse into each children by default)
-
Optional disposeMaterialAndTextures: boolean
Set to true to also dispose referenced materials and textures (false by default)
Returns void
-
get Animation ByNameSearch playground for getAnimationByName
get Animation RangeSearch playground for getAnimationRange
-
Get an animation range by name
Parameters
-
name: string
defines the name of the animation range to look for
Returns Nullable<AnimationRange>
null if not found else the requested animation range
-
get Animation RangesSearch playground for getAnimationRanges
-
Gets the list of all animation ranges defined on this node
Returns Nullable<AnimationRange>[]
an array
get Behavior ByNameSearch playground for getBehaviorByName
get Child MeshesSearch playground for getChildMeshes
-
Get all child-meshes of this node
Parameters
-
Optional directDescendantsOnly: boolean
defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)
-
Optional predicate: (node: Node) => boolean
defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
-
-
Parameters
-
node: Node
Returns boolean
-
-
-
Returns AbstractMesh[]
an array of AbstractMesh
-
get ChildrenSearch playground for getChildren
-
Get all direct children of this node
Parameters
-
Optional predicate: (node: Node) => boolean
defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
-
-
Parameters
-
node: Node
Returns boolean
-
-
-
-
Optional directDescendantsOnly: boolean
defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: true)
Returns Node[]
an array of Node
-
get Class NameSearch playground for getClassName
-
Gets a string identifying the name of the class
Returns string
"Node" string
get DescendantsSearch playground for getDescendants
-
Will return all nodes that have this node as ascendant
Parameters
-
Optional directDescendantsOnly: boolean
defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered
-
Optional predicate: (node: Node) => boolean
defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored
-
-
Parameters
-
node: Node
Returns boolean
-
-
-
Returns Node[]
all children nodes of all types
-
get EngineSearch playground for getEngine
-
Gets the engine of the node
Returns Engine
a Engine
get Hierarchy Bounding VectorsSearch playground for getHierarchyBoundingVectors
-
Return the minimum and maximum world vectors of the entire hierarchy under current node
Parameters
-
Optional includeDescendants: boolean
Include bounding info from descendants as well (true by default)
-
Optional predicate: Nullable<(abstractMesh: AbstractMesh) => boolean>
defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors
Returns { max: Vector3; min: Vector3 }
the new bounding vectors
-
get SceneSearch playground for getScene
-
Gets the scene of the node
Returns Scene
a scene
get World MatrixSearch playground for getWorldMatrix
-
Returns the latest update of the World matrix
Returns Matrix
a Matrix
is Descendant OfSearch playground for isDescendantOf
-
Is this node a descendant of the given node? The function will iterate up the hierarchy until the ancestor was found or no more parents defined
Parameters
-
ancestor: Node
defines the parent node to inspect
Returns boolean
a boolean indicating if this node is a descendant of the given node
-
is DisposedSearch playground for isDisposed
-
Gets a boolean indicating if the node has been disposed
Returns boolean
true if the node was disposed
is EnabledSearch playground for isEnabled
-
Is this node enabled? If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true
Parameters
-
Optional checkAncestors: boolean
indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors
Returns boolean
whether this node (and its parent) is enabled
-
is ReadySearch playground for isReady
-
Is this node ready to be used/rendered
Parameters
-
Optional completeCheck: boolean
defines if a complete check (including materials and lights) has to be done (false by default)
Returns boolean
true if the node is ready
-
remove BehaviorSearch playground for removeBehavior
serialize Animation RangesSearch playground for serializeAnimationRanges
-
Serialize animation ranges into a JSON compatible object
Returns any
serialization object
set EnabledSearch playground for setEnabled
-
Set the enabled state of this node
Parameters
-
value: boolean
defines the new enabled state
Returns void
-
Static Add Node ConstructorSearch playground for AddNodeConstructor
-
Add a new node constructor
Parameters
-
type: string
defines the type name of the node to construct
-
constructorFunc: NodeConstructor
defines the constructor function
Returns void
-
Static ConstructSearch playground for Construct
-
Returns a node constructor based on type name
Parameters
-
type: string
defines the type name
-
name: string
defines the new node name
-
scene: Scene
defines the hosting scene
-
Optional options: any
defines optional options to transmit to constructors
Returns Nullable<() => Node>
the new constructor or null
-
Node is the basic class for all scene objects (Mesh, Light, Camera.)