Constructs a new ImageAnchorGroup.
The name of the transform node.
The image tracker which will be used.
A babylonjs scene.
The anchorId which will define the current anchor.
Gets a list of Animations associated with the node
A point in 3D space (including orientation) in a fixed location relative to a tracked object or environment.
Gets or sets the id of the node
Gets or sets a boolean indicating that non uniform scaling (when at least one component is different from others) should be ignored. By default the system will update normals to compensate
List of inspectable custom properties (used by the Inspector)
Gets or sets an object used to store user defined information for the node
Gets or sets the name of the node
An event triggered after the world matrix is updated
An event triggered when the mesh is disposed
Callback raised when the node is ready to be used
Gets or sets a boolean indicating that even if rotationQuaternion is defined, you can keep updating rotation property and Babylon.js will just mix both
For internal use only. Please do not use.
Multiplication factor on scale x/y/z when computing the world matrix. Eg. for a 1x1x1 cube setting this to 2 will make it a 2x2x2 cube
Gets or sets a string used to store user defined state for the node
Gets or sets the unique id of the node
Object will rotate to face the camera
Object will not rotate to face the camera
Object will rotate to face the camera's position instead of orientation
Object will rotate to face the camera but only on the x axis
Object will rotate to face the camera but only on the y axis
Object will rotate to face the camera but only on the z axis
Returns the current mesh absolute position. Returns a Vector3.
Returns the current mesh absolute rotation. Returns a Quaternion.
Returns the current mesh absolute scaling. Returns a Vector3.
Gets or sets the animation properties override
Gets or sets the animation properties override
Gets the list of attached behaviors
Gets or sets the billboard mode. Default is 0.
Value | Type | Description |
---|---|---|
0 | BILLBOARDMODE_NONE | |
1 | BILLBOARDMODE_X | |
2 | BILLBOARDMODE_Y | |
4 | BILLBOARDMODE_Z | |
7 | BILLBOARDMODE_ALL |
Gets or sets the billboard mode. Default is 0.
Value | Type | Description |
---|---|---|
0 | BILLBOARDMODE_NONE | |
1 | BILLBOARDMODE_X | |
2 | BILLBOARDMODE_Y | |
4 | BILLBOARDMODE_Z | |
7 | BILLBOARDMODE_ALL |
Gets or sets a boolean used to define if the node must be serialized
Gets or sets a boolean used to define if the node must be serialized
The forward direction of that transform in world space.
Gets or sets the distance of the object to max, often used by skybox
Gets or sets the distance of the object to max, often used by skybox
True if the World matrix has been frozen.
True if the scaling property of this object is non uniform eg. (1,2,1)
Sets a callback that will be raised when the node will be disposed
Gets or sets the parent of the node (without keeping the current position in the scene)
Gets or sets the parent of the node (without keeping the current position in the scene)
Gets or set the node position (default is (0.0, 0.0, 0.0))
Gets or set the node position (default is (0.0, 0.0, 0.0))
Gets or sets a boolean indicating that parent rotation should be preserved when using billboards. This could be useful for glTF objects where parent rotation helps converting from right handed to left handed
Gets or sets a boolean indicating that parent rotation should be preserved when using billboards. This could be useful for glTF objects where parent rotation helps converting from right handed to left handed
The right direction of that transform in world space.
Gets or sets the rotation property : a Vector3 defining the rotation value in radians around each local axis X, Y, Z (default is (0.0, 0.0, 0.0)). If rotation quaternion is set, this Vector3 will be ignored and copy from the quaternion
Gets or sets the rotation property : a Vector3 defining the rotation value in radians around each local axis X, Y, Z (default is (0.0, 0.0, 0.0)). If rotation quaternion is set, this Vector3 will be ignored and copy from the quaternion
Gets or sets the rotation Quaternion property : this a Quaternion object defining the node rotation by using a unit quaternion (undefined by default, but can be null). If set, only the rotationQuaternion is then used to compute the node rotation (ie. node.rotation will be ignored)
Gets or sets the rotation Quaternion property : this a Quaternion object defining the node rotation by using a unit quaternion (undefined by default, but can be null). If set, only the rotationQuaternion is then used to compute the node rotation (ie. node.rotation will be ignored)
Gets or sets the scaling property : a Vector3 defining the node scaling along each local axis X, Y, Z (default is (0.0, 0.0, 0.0)).
Gets or sets the scaling property : a Vector3 defining the node scaling along each local axis X, Y, Z (default is (0.0, 0.0, 0.0)).
The up direction of that transform in world space.
Returns directly the latest state of the mesh World matrix. A Matrix is returned.
Attach a behavior to the node
defines the behavior to attach
defines that the behavior must be attached even if the scene is still loading
the current Node
Adds a rotation step to the mesh current rotation. x, y, z are Euler angles expressed in radians. This methods updates the current mesh rotation, either mesh.rotation, either mesh.rotationQuaternion if it's set. This means this rotation is made in the mesh local space only. It's useful to set a custom rotation order different from the BJS standard one YXZ. Example : this rotates the mesh first around its local X axis, then around its local Z axis, finally around its local Y axis.
mesh.addRotation(x1, 0, 0).addRotation(0, 0, z2).addRotation(0, 0, y3);
Note that addRotation()
accumulates the passed rotation values to the current ones and computes the .rotation or .rotationQuaternion updated values.
Under the hood, only quaternions are used. So it's a little faster is you use .rotationQuaternion because it doesn't need to translate them back to Euler angles.
Rotation to add
Rotation to add
Rotation to add
the TransformNode.
Attach the current TransformNode to another TransformNode associated with a bone
Bone affecting the TransformNode
TransformNode associated with the bone
this object
Will start the animation sequence
defines the range frames for animation sequence
defines if the animation should loop (false by default)
defines the speed factor in which to run the animation (1 by default)
defines a function to be executed when the animation ended (undefined by default)
the object created for this animation. If range does not exist, it will return null
Clone the current transform node
Name of the new clone
New parent for the clone
Do not clone children hierarchy
the new transform node
Computes the world matrix of the node
defines if the cache version should be invalidated forcing the world matrix to be created from scratch
the world matrix
Creates an animation range for this node
defines the name of the range
defines the starting key
defines the end key
Delete a specific animation range
defines the name of the range to delete
defines if animation frames from the range must be deleted as well
Detach the transform node if its associated with a bone
this object
Removes the observer.
Prevents the World matrix to be computed any longer
defines an optional matrix to use as world matrix
the TransformNode.
Returns a new Vector3 set with the mesh pivot point World coordinates.
a new Vector3 set with the mesh pivot point World coordinates.
Sets the Vector3 "result" coordinates with the mesh pivot point World coordinates.
vector3 to store the result
this TransformNode.
Retuns the mesh absolute position in the World.
a Vector3.
Get an animation by name
defines the name of the animation to look for
null if not found else the requested animation
Get an animation range by name
defines the name of the animation range to look for
null if not found else the requested animation range
Gets the list of all animation ranges defined on this node
an array
Gets an attached behavior by name
defines the name of the behavior to look for
null if behavior was not found else the requested behavior
Get all child-meshes of this node
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)
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
an array of AbstractMesh
Get all child-transformNodes of this node
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
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
an array of TransformNode
Get all direct children of this node
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
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)
an array of Node
Gets a string identifying the name of the class
"TransformNode" string
Will return all nodes that have this node as ascendant
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
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
all children nodes of all types
Returns a new Vector3 that is the localAxis, expressed in the mesh local space, rotated like the mesh. This Vector3 is expressed in the World space.
axis to rotate
a new Vector3 that is the localAxis, expressed in the mesh local space, rotated like the mesh.
Sets the Vector3 "result" as the rotated Vector3 "localAxis" in the same rotation than the mesh. localAxis is expressed in the mesh local space. result is computed in the Wordl space from the mesh World matrix.
axis to rotate
the resulting transformnode
this TransformNode.
Returns the distance from the mesh to the active camera
defines the camera to use
the distance
Gets the engine of the node
a Engine
Return the minimum and maximum world vectors of the entire hierarchy under current node
Include bounding info from descendants as well (true by default)
defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors
the new bounding vectors
Returns the mesh pivot matrix. Default : Identity.
the matrix
Returns a new Vector3 set with the mesh pivot point coordinates in the local space.
the pivot point
Sets the passed Vector3 "result" with the coordinates of the mesh pivot point in the local space.
the vector3 to store the result
this TransformNode.
Returns the mesh Pose matrix.
the pose matrix
Returns the mesh position in the local space from the current World matrix values.
a new Vector3.
Gets the position of the current mesh in camera space
defines the camera to use
a position
Gets the scene of the node
a scene
Returns the latest update of the World matrix
a Matrix
Instantiate (when possible) or clone that node with its hierarchy
defines the new parent to use for the instance (or clone)
defines options to configure how copy is done
defines an option callback to call when a clone or an instance is created
an instance (or a clone) of the current node with its hiearchy
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
defines the parent node to inspect
a boolean indicating if this node is a descendant of the given node
Gets a boolean indicating if the node has been disposed
true if the node was disposed
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
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
whether this node (and its parent) is enabled
Is this node ready to be used/rendered
defines if a complete check (including materials and lights) has to be done (false by default)
true if the node is ready
Translates the mesh along the passed Vector3 in its local space.
the distance to translate in localspace
the TransformNode.
Orients a mesh towards a target point. Mesh must be drawn facing user.
the position (must be in same space as current mesh) to look at
optional yaw (y-axis) correction in radians
optional pitch (x-axis) correction in radians
optional roll (z-axis) correction in radians
the choosen space of the target
the TransformNode.
Flag the transform node as dirty (Forcing it to update everything)
if set to "rotation" the objects rotationQuaternion will be set to null
this transform node
Uniformly scales the mesh to fit inside of a unit cube (1 X 1 X 1 units)
Use the hierarchy's bounding box instead of the mesh's bounding box. Default is false
ignore rotation when computing the scale (ie. object will be axis aligned). Default is false
predicate that is passed in to getHierarchyBoundingVectors when selecting which object should be included when scaling
the current mesh
If you'd like to be called back after the mesh position, rotation or scaling has been updated.
callback function to add
the TransformNode.
Remove an attached behavior
defines the behavior to attach
the current Node
Resets this nodeTransform's local matrix to Matrix.Identity().
indicates if all child nodeTransform's world-space transform should be preserved.
Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in the given space.
space (default LOCAL) can be either Space.LOCAL, either Space.WORLD.
Note that the property rotationQuaternion
is then automatically updated and the property rotation
is set to (0,0,0) and no longer used.
The passed axis is also normalized.
the axis to rotate around
the amount to rotate in radians
Space to rotate in (Default: local)
the TransformNode.
Rotates the mesh around the axis vector for the passed angle (amount) expressed in radians, in world space.
Note that the property rotationQuaternion
is then automatically updated and the property rotation
is set to (0,0,0) and no longer used.
The passed axis is also normalized. .
Method is based on http://www.euclideanspace.com/maths/geometry/affine/aroundPoint/index.htm
the point to rotate around
the axis to rotate around
the amount to rotate in radians
the TransformNode
Serializes the objects information.
defines the object to serialize in
the serialized object
Serialize animation ranges into a JSON compatible object
serialization object
Sets the mesh absolute position in the World from a Vector3 or an Array(3).
the absolute position to set
the TransformNode.
Sets this transform node rotation to the given local axis.
the axis in local space
optional yaw (y-axis) correction in radians
optional pitch (x-axis) correction in radians
optional roll (z-axis) correction in radians
this TransformNode
Set the enabled state of this node
defines the new enabled state
Defines the passed node as the parent of the current node. The node will remain exactly where it is and its position / rotation will be updated accordingly
the node ot set as the parent
this TransformNode.
Sets a new pivot matrix to the current node
defines the new pivot matrix to use
defines if the pivot matrix must be cancelled in the world matrix. When this parameter is set to true (default), the inverse of the pivot matrix is also applied at the end to cancel the transformation effect
the current TransformNode
Sets a new pivot point to the current node
defines the new pivot point to use
defines if the point is in world or local space (local by default)
the current TransformNode
Sets the mesh position in its local space.
the position to set in localspace
the TransformNode.
Sets a new matrix to apply before all other transformation
defines the transform matrix
the current TransformNode
Translates the mesh along the axis vector for the passed distance in the given space. space (default LOCAL) can be either Space.LOCAL, either Space.WORLD.
the axis to translate in
the distance to translate
Space to rotate in (Default: local)
the TransformNode.
Allows back the World matrix computation.
the TransformNode.
Removes a registered callback function.
callback function to remove
the TransformNode.
Copies the parameter passed Matrix into the mesh Pose matrix.
the matrix to copy the pose from
this TransformNode.
Add a new node constructor
defines the type name of the node to construct
defines the constructor function
Returns a node constructor based on type name
defines the type name
defines the new node name
defines the hosting scene
defines optional options to transmit to constructors
the new constructor or null
Returns a new TransformNode object parsed from the source provided.
is the source.
the scne the object belongs to
is a string, it's the root URL to prefix the delayLoadingFile
property with
a new TransformNode object parsed from the source provided.
Parse animation range data from a serialization object and store them into a given node
defines where to store the animation ranges
defines the serialization object to read data from
defines the hosting scene
Generated using TypeDoc
A BABYLON.TransformNode which attaches content to a known image as it moves around in the camera view.
https://docs.zap.works/universal-ar/web-libraries/babylonjs/image-tracking/