AnimationCurveTrack
ClassContainer for one or more AnimationCurves.
- Available on all platforms
Since Lens Scripting v234
Container for one or more AnimationCurves. Can be sampled to drive attributes (e.g. animation, vfx, code etc.)
Index
Properties
Methods
Remarks
When evaluating multiple values, the values are selected from left to right in order. For example, for a vec3 containing x,y,z it will correspond to track index 0, 1, 2 from left to right.
Extends
Properties
name
name:
string
The name of the Asset in Lens Studio.
Default Value
""
Inherited from
uniqueIdentifier
readonlyuniqueIdentifier:string
Since
Lens Scripting Version 176
Inherited from
AnimationTrack.uniqueIdentifier
Methods
create()
staticcreate(name):AnimationCurveTrack
Create new animation curve track.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
AnimationCurveTrack
Since
Lens Scripting Version 299
evaluateNumber()
evaluateNumber(
time):number
Samples the track at the given time to get some value.
Parameters
| Parameter | Type |
|---|---|
time | number |
Returns
number
Since
Lens Scripting Version 234
evaluateRotation()
evaluateRotation(
time):quat
Samples the track at the given time to get some value. Returns 0 for non-existent channels.
Parameters
| Parameter | Type |
|---|---|
time | number |
Returns
Since
Lens Scripting Version 234
evaluateVec2()
evaluateVec2(
time):vec2
Samples the track at the given time to get some value. Returns 0 for non-existent channels.
Parameters
| Parameter | Type |
|---|---|
time | number |
Returns
Since
Lens Scripting Version 234
evaluateVec3()
evaluateVec3(
time):vec3
Samples the track at the given time to get some value. Returns 0 for non-existent channels.
Parameters
| Parameter | Type |
|---|---|
time | number |
Returns
Since
Lens Scripting Version 234
evaluateVec4()
evaluateVec4(
time):vec4
Samples the track at the given time to get some value. Returns 0 for non-existent channels.
Parameters
| Parameter | Type |
|---|---|
time | number |
Returns
Since
Lens Scripting Version 234
getProperties()
getProperties():
AnimationCurve[]
Retrieves all properties.
Returns
Since
Lens Scripting Version 333
getProperty()
getProperty(
key):AnimationCurve
Retrieves an AnimationCurve associated with the given key.
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
Since
Lens Scripting Version 234
getPropertyKeys()
getPropertyKeys():
string[]
Returns an array of strings, which are the names of properties associated with the AnimationCurveTrack.
Returns
string[]
Since
Lens Scripting Version 234
getTypeName()
staticgetTypeName():TypeName<AnimationCurveTrack>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<AnimationCurveTrack>
Since
Lens Scripting Version 234
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
setProperty()
setProperty(
key,curve):void
Sets an AnimationCurve to a given key.
Parameters
| Parameter | Type |
|---|---|
key | string |
curve | AnimationCurve |
Returns
void
Since
Lens Scripting Version 234