Difference between revisions of "DOMTransformExtended"
From Virtual World Web Wiki
(Documentation for the DOMTransformExtended class) |
(Documentation for the DOMTransformExtended class) |
||
Line 1: | Line 1: | ||
− | Represents a DOMTransform in JavaScript | + | Represents a [[DOMTransform]] in JavaScript |
*'''Inherits class: [[DOMObjectExtended]]''' | *'''Inherits class: [[DOMObjectExtended]]''' | ||
Line 10: | Line 10: | ||
:: | :: | ||
::The name of a bone in this node's parent's skeleton to which this object should be attached | ::The name of a bone in this node's parent's skeleton to which this object should be attached | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|bool ExcludeTransform {get; set;} // Via attribution on DOMTransform }} | :{{CSharp|bool ExcludeTransform {get; set;} // Via attribution on DOMTransform }} | ||
:: | :: | ||
::When true, this transform's value is excluded when calculating child node transforms | ::When true, this transform's value is excluded when calculating child node transforms | ||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|Point3D Position {get; set;} // Via attribution on DOMTransform }} | :{{CSharp|Point3D Position {get; set;} // Via attribution on DOMTransform }} | ||
Line 78: | Line 58: | ||
:: | :: | ||
::Gets or sets the transform's scale component | ::Gets or sets the transform's scale component | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
:{{CSharp|DOMTransformExtended TransformParent {get; set;} }} | :{{CSharp|DOMTransformExtended TransformParent {get; set;} }} | ||
Line 124: | Line 84: | ||
:: | :: | ||
::Gets or sets the Z part of the transform's position component | ::Gets or sets the Z part of the transform's position component | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
Line 165: | Line 96: | ||
:{{CSharp|DOMPhysicsExtended PathToVector(JSVector3 target, float speed, JSFlexibleFunction callback {{=}} NULL)}} | :{{CSharp|DOMPhysicsExtended PathToVector(JSVector3 target, float speed, JSFlexibleFunction callback {{=}} NULL)}} | ||
− | :{{CSharp|DOMPhysicsExtended PhysicsFollow(DOMTransformExtended target, float minDistance, float maxDistance)}} | + | :{{CSharp|DOMPhysicsExtended PhysicsFollow(DOMTransformExtended target, float minDistance {{=}} 0.0, float maxDistance {{=}} 2.0, bool alwaysFace {{=}} true, int maxPace {{=}} 2, float runDistance {{=}} 4.0, float sprintDistance {{=}} 6.0)}} |
:: | :: | ||
::Creates a DOMPhysics node as a direct child of this node requesting the Follow operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion. | ::Creates a DOMPhysics node as a direct child of this node requesting the Follow operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion. | ||
Line 171: | Line 102: | ||
:{{CSharp|DOMPhysicsExtended PhysicsFollowApproach(DOMTransformExtended target, float targetDistance, float runDistance, float abortDistance {{=}} 3.40282347E+38)}} | :{{CSharp|DOMPhysicsExtended PhysicsFollowApproach(DOMTransformExtended target, float targetDistance, float runDistance, float abortDistance {{=}} 3.40282347E+38)}} | ||
− | :{{CSharp|DOMPhysicsExtended PhysicsFollowPursuit(DOMTransformExtended target, float catchDistance, float escapeDistance)}} | + | :{{CSharp|DOMPhysicsExtended PhysicsFollowPursuit(DOMTransformExtended target, float catchDistance, float escapeDistance, bool alwaysFace {{=}} true, int maxPace {{=}} 2, float runDistance {{=}} 6.0, float sprintDistance {{=}} 10.0)}} |
− | :{{CSharp|DOMPhysicsExtended PhysicsFollowStayNear(DOMTransformExtended target, float minDistance, float maxDistance)}} | + | :{{CSharp|DOMPhysicsExtended PhysicsFollowStayNear(DOMTransformExtended target, float minDistance {{=}} 0.0, float maxDistance {{=}} 2.0, bool alwaysFace {{=}} true, int maxPace {{=}} 2, float runDistance {{=}} 4.0, float sprintDistance {{=}} 6.0)}} |
:{{CSharp|DOMPhysicsExtended PhysicsPathTo(float targetX, float targetY, float targetZ, float speed, JSFlexibleFunction callback {{=}} NULL)}} | :{{CSharp|DOMPhysicsExtended PhysicsPathTo(float targetX, float targetY, float targetZ, float speed, JSFlexibleFunction callback {{=}} NULL)}} |
Revision as of 20:14, 8 January 2018
Represents a DOMTransform in JavaScript
- Inherits class: DOMObjectExtended
- This is a JavaScript visible object
Remarks [edit]
Properties
- string AttachToBone {get; set;} // Via attribution on DOMTransform
- The name of a bone in this node's parent's skeleton to which this object should be attached
- bool ExcludeTransform {get; set;} // Via attribution on DOMTransform
- When true, this transform's value is excluded when calculating child node transforms
- Point3D Position {get; set;} // Via attribution on DOMTransform
- Gets or sets the transform's position component
- float RX {get; set;} // Via attribution on DOMTransform
- Gets or sets the X part of the transform's rotation component
- float RY {get; set;} // Via attribution on DOMTransform
- Gets or sets the Y part of the transform's rotation component
- float RZ {get; set;} // Via attribution on DOMTransform
- Gets or sets the Z part of the transform's rotation component
- Point3D Rotation {get; set;} // Via attribution on DOMTransform
- Gets or sets the transform's rotation component
- Point3D RotationAxis {get; set;} // Via attribution on DOMTransform
- A normal expressing the direction of rotation
- float RotationSpeed {get; set;} // Via attribution on DOMTransform
- The speed by which to multiply the RotationAxis
- float SX {get; set;} // Via attribution on DOMTransform
- Gets or sets the X part of the transform's scale component
- float SY {get; set;} // Via attribution on DOMTransform
- Gets or sets the Y part of the transform's scale component
- float SZ {get; set;} // Via attribution on DOMTransform
- Gets or sets the Z part of the transform's scale component
- Point3D Scale {get; set;} // Via attribution on DOMTransform
- Gets or sets the transform's scale component
- DOMTransformExtended TransformParent {get; set;}
- Gets a reference to this object’s DOMTransform parent, if it has been set to something other than normal node hierarchy.
- long TransformParentID {get; set;} // Via attribution on DOMTransform
- Sets the ID of another object in the same view that will be used as this object's transform parent instead of the object's natural position in the DOM hierarchy
- Point3D Velocity {get; set;} // Via attribution on DOMTransform
- If this object is moving, this is how fast (in units per second)
- Point3D WorldPosition {get;} // Via attribution on DOMTransform
- float X {get; set;} // Via attribution on DOMTransform
- Gets or sets the X part of the transform's position component
- float Y {get; set;} // Via attribution on DOMTransform
- Gets or sets the Y part of the transform's position component
- float Z {get; set;} // Via attribution on DOMTransform
- Gets or sets the Z part of the transform's position component
Methods
- bool MoveTo(float x, float y, float z, float speed, JSFlexibleFunction func = NULL)
- Moves this object smoothly, and linearly to the specified x,y,z location over time specified by speed. This is accomplished using a child DOMInterpolation node.
- DOMPhysicsExtended PathTo(float targetX, float targetY, float targetZ, float speed, JSFlexibleFunction callback = NULL)
- DOMPhysicsExtended PathToTarget(DOMTransformExtended target, float speed, JSFlexibleFunction callback = NULL)
- DOMPhysicsExtended PathToVector(JSVector3 target, float speed, JSFlexibleFunction callback = NULL)
- DOMPhysicsExtended PhysicsFollow(DOMTransformExtended target, float minDistance = 0.0, float maxDistance = 2.0, bool alwaysFace = true, int maxPace = 2, float runDistance = 4.0, float sprintDistance = 6.0)
- Creates a DOMPhysics node as a direct child of this node requesting the Follow operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- DOMPhysicsExtended PhysicsFollowApproach(DOMTransformExtended target, float targetDistance, float runDistance, float abortDistance = 3.40282347E+38)
- DOMPhysicsExtended PhysicsFollowPursuit(DOMTransformExtended target, float catchDistance, float escapeDistance, bool alwaysFace = true, int maxPace = 2, float runDistance = 6.0, float sprintDistance = 10.0)
- DOMPhysicsExtended PhysicsFollowStayNear(DOMTransformExtended target, float minDistance = 0.0, float maxDistance = 2.0, bool alwaysFace = true, int maxPace = 2, float runDistance = 4.0, float sprintDistance = 6.0)
- DOMPhysicsExtended PhysicsPathTo(float targetX, float targetY, float targetZ, float speed, JSFlexibleFunction callback = NULL)
- Creates a DOMPhysics node as a direct child of this node requesting the PathTo operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- DOMPhysicsExtended PhysicsPathToTarget(DOMTransformExtended target, float speed, JSFlexibleFunction callback = NULL)
- DOMPhysicsExtended PhysicsPathToVector(JSVector3 target, float speed, JSFlexibleFunction callback = NULL)
- Creates a DOMPhysics node as a direct child of this node requesting the PathToVector operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- DOMPhysicsExtended PhysicsProjectile(float directionX, float directionY, float directionZ, float speed, bool gravity, float maxDistance)
- Creates a DOMPhysics node as a direct child of this node requesting the Projectile operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- DOMPhysicsExtended PhysicsProjectileVector(JSVector3 direction, float speed, bool gravity, float maxDistance)
- Creates a DOMPhysics node as a direct child of this node requesting the ProjectileVector operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- DOMPhysicsExtended PhysicsSpawn(float radius, bool stack)
- Creates a DOMPhysics node as a direct child of this node requesting the Spawn operation and given the specified parameters. The returned DOMPhysics node can be used to start / stop the operation and monitor for its completion.
- void ResetTransformParent(bool restoreLastPosition = false)
- Resets this object’s transform parent reference to null so that it behaves normaly, transforming relative to the next DOMTransform up the hierarchy.
- bool RotateTo(float x, float y, float z, float speed, JSFlexibleFunction func = NULL)
- DOMPhysicsExtended RotateToFaceTarget(DOMTransformExtended target, float speed, JSFlexibleFunction callback = NULL)
- void SetPosition(float x, float y, float z)
- Sets the position (transform) of this object from its next parent DOMTransform or from world origin (0,0,0).
- void SetRotation(float x, float y, float z)
- Sets the rotation of this object relative to its next parent DOMTransform or from (0,0,0)
- void SetScale(float x, float y, float z)
- Sets the scale of this object relative to its next parent DOMTransform or from (1,1,1)
- void SetTransformParent(DOMTransformExtended target, JSVector3 position = NULL, JSVector3 rotation = NULL, JSVector3 scale = NULL)
- Sets this objects transform parent reference to the specified DOMTransform preventing it from transforming relative to the next DOMTransform up the hierarchy, but rather, the specified object instead. Sets the position, rotation, and scale to new values along with the transform parent change as a single atomic operation.