![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
A template class to create an ITimeline object with key animation capabilities.
Murl.Logic.IAppTimeline
Murl.Logic.Timeline
Type definition of the animation key data type.
The Animation shared pointer type.
Create an Animation object.
Murl.SharedPointer.LogicAnimationSInt32 new()
Create an Animation object.
Murl.SharedPointer.LogicAnimationSInt32 Create()
Add a key to the animation key array with linear interpolation.
Murl.Logic.AnimationKey.SInt32 AddKey(Number time, Integer value)
time | The time for the key in seconds. |
value | The value for the key. |
Add a key to the animation key array.
Murl.Logic.AnimationKey.SInt32 AddKey(Number time, Integer value, Murl.IEnums.Interpolation interpolation)
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Add a key to the animation key array.
Murl.Logic.AnimationKey.SInt32 AddKey(Murl.Logic.AnimationKey.SInt32 key)
key | The key to copy and add. |
Set a key in the animation key array with linear interpolation.
Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Number time, Integer value)
index | The zero-based index of the key to set. |
time | The time for the key in seconds. |
value | The value for the key. |
Set a key in the animation key array.
Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Number time, Integer value, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to set. |
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Set a key in the animation key array.
Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Murl.Logic.AnimationKey.SInt32 key)
index | The zero-based index of the key to set. |
key | The key to copy and set. |
Insert a key to the animation key array with linear interpolation.
Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Number time, Integer value)
index | The zero-based index of the key to insert. |
time | The time for the key in seconds. |
value | The value for the key. |
Insert a key to the animation key array.
Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Number time, Integer value, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to insert. |
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Insert a key to the animation key array.
Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Murl.Logic.AnimationKey.SInt32 key)
index | The zero-based index of the key to insert. |
key | The key to copy and insert. |
Get the number of keys.
Integer GetNumberOfKeys()
Get a key from the animation key array.
Murl.Logic.AnimationKey.SInt32 GetKey(Integer index)
index | The zero-based index of the key. |
Modify the time of a key in the animation key array.
Boolean ModifyKeyTime(Integer index, Number time)
index | The zero-based index of the key to modify. |
time | The time for the key in seconds. |
Modify the value of a key in the animation key array.
Boolean ModifyKeyValue(Integer index, Integer value)
index | The zero-based index of the key to modify. |
value | The value for the key. |
Modify the interpolation of a key in the animation key array.
Boolean ModifyKeyInterpoation(Integer index, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to modify. |
interpolation | The interpolation type. |
Set the number of keys.
Boolean SetNumberOfKeys(Integer n)
n | The number of keys. |
Remove keys at a given position.
Boolean RemoveKey(Integer index, Integer count)
index | The zero-based index from where to remove the keys. |
count | The number of keys to remove. |
Empty the keys, but keep the underlying storage.
EmptyKeys()
Clear the keys and remove the underlying storage.
ClearKeys()
Set keys for an intermediate time and value. Enter an interpolation curve at a variable time with a specified value.
Setup key 0 with start time zero and key 1 with the given end time; the mid value is the value at mid time using the given interpolation.
The keys are typically used with Start(midTime, endTime).
SetIntermediateKeys(Number midTime, Integer midValue, Number endTime, Integer endValue, Murl.IEnums.Interpolation interpolation)
midTime | The time between zero and the endTime. |
midValue | The value at mid time. |
endTime | The end time. |
endValue | The value at end time. |
interpolation | The interpolation type. |
Called if the current value is set. This method is empty and can be overwritten.
OnEvaluateAnimation(Integer currentValue)
currentValue | The current value. |
Get the current value.
Integer GetCurrentValue()
Start the timeline forward. The first animation array key is the start time, the last animation array key is the end time.
Boolean StartForward()
Start the timeline backward. The last animation array key is the start time, the first animation array key is the end time.
Boolean StartBackward()
Set the timeline start time from a specified key index.
Boolean SetStartTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline end time from a specified key index.
Boolean SetEndTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline loop start time from a specified key index.
Boolean SetLoopStartTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline loop end time from a specified key index.
Boolean SetLoopEndTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Check if the current time has passed the time from a specified key index. Does not consider loops, for evaluating loops see ITimeline::HasPassedLoop().
Boolean HasPassedTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Check if the current time is the time from a specified key index.
Boolean IsOnTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Reset the animation.
Reset()