Murl Engine Lua Addon API  Version 1.0 beta
Murl.Logic.Animation.Color

A template class to create an ITimeline object with key animation capabilities.


Table members

Inherited


Murl.Logic.IAppTimeline
Murl.Logic.Timeline

Typedefs


Murl.Logic.Animation.Color.ValueType

The template parameter value type.

Returns
Murl.Color

Murl.Logic.Animation.Color.Key

Type definition of the animation key data type.

Returns
Murl.Logic.AnimationKey.Color

Murl.Logic.Animation.Color.Ptr

The Animation shared pointer type.

Returns
Murl.SharedPointer.LogicAnimationColor


Functions


Murl.Logic.Animation.Color.new()

Create an Animation object.

Murl.SharedPointer.LogicAnimationColor new()

Returns
Murl.SharedPointer.LogicAnimationColor The Animation shared pointer.

Murl.Logic.Animation.Color.Create()

Create an Animation object.

Murl.SharedPointer.LogicAnimationColor Create()

Returns
Murl.SharedPointer.LogicAnimationColor The Animation shared pointer.


Methods


AddKey(time, value)

Add a key to the animation key array with linear interpolation.

Murl.Logic.AnimationKey.Color AddKey(Number time, Murl.Color value)

Parameters
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.Color The added key.

AddKey(time, value, interpolation)

Add a key to the animation key array.

Murl.Logic.AnimationKey.Color AddKey(Number time, Murl.Color value, Murl.IEnums.Interpolation interpolation)

Parameters
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.Color The added key.

AddKey(key)

Add a key to the animation key array.

Murl.Logic.AnimationKey.Color AddKey(Murl.Logic.AnimationKey.Color key)

Parameters
keyThe key to copy and add.
Returns
Murl.Logic.AnimationKey.Color The added key.

SetKey(index, time, value)

Set a key in the animation key array with linear interpolation.

Murl.Logic.AnimationKey.Color SetKey(Integer index, Number time, Murl.Color value)

Parameters
indexThe zero-based index of the key to set.
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.Color The set key.

SetKey(index, time, value, interpolation)

Set a key in the animation key array.

Murl.Logic.AnimationKey.Color SetKey(Integer index, Number time, Murl.Color value, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to set.
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.Color The set key.

SetKey(index, key)

Set a key in the animation key array.

Murl.Logic.AnimationKey.Color SetKey(Integer index, Murl.Logic.AnimationKey.Color key)

Parameters
indexThe zero-based index of the key to set.
keyThe key to copy and set.
Returns
Murl.Logic.AnimationKey.Color The added key.

InsertKey(index, time, value)

Insert a key to the animation key array with linear interpolation.

Murl.Logic.AnimationKey.Color InsertKey(Integer index, Number time, Murl.Color value)

Parameters
indexThe zero-based index of the key to insert.
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.Color The inserted key.

InsertKey(index, time, value, interpolation)

Insert a key to the animation key array.

Murl.Logic.AnimationKey.Color InsertKey(Integer index, Number time, Murl.Color value, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to insert.
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.Color The inserted key.

InsertKey(index, key)

Insert a key to the animation key array.

Murl.Logic.AnimationKey.Color InsertKey(Integer index, Murl.Logic.AnimationKey.Color key)

Parameters
indexThe zero-based index of the key to insert.
keyThe key to copy and insert.
Returns
Murl.Logic.AnimationKey.Color The inserted key.

GetNumberOfKeys()

Get the number of keys.

Integer GetNumberOfKeys()

Returns
Integer The number of keys.

GetKey(index)

Get a key from the animation key array.

Murl.Logic.AnimationKey.Color GetKey(Integer index)

Parameters
indexThe zero-based index of the key.
Returns
Murl.Logic.AnimationKey.Color The key at the specified index.

ModifyKeyTime(index, time)

Modify the time of a key in the animation key array.

Boolean ModifyKeyTime(Integer index, Number time)

Parameters
indexThe zero-based index of the key to modify.
timeThe time for the key in seconds.
Returns
Boolean true if successful, false if the index is out of range.

ModifyKeyValue(index, value)

Modify the value of a key in the animation key array.

Boolean ModifyKeyValue(Integer index, Murl.Color value)

Parameters
indexThe zero-based index of the key to modify.
valueThe value for the key.
Returns
Boolean true if successful, false if the index is out of range.

ModifyKeyInterpoation(index, interpolation)

Modify the interpolation of a key in the animation key array.

Boolean ModifyKeyInterpoation(Integer index, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to modify.
interpolationThe interpolation type.
Returns
Boolean true if successful, false if the index is out of range.

SetNumberOfKeys(n)

Set the number of keys.

Boolean SetNumberOfKeys(Integer n)

Parameters
nThe number of keys.
Returns
Boolean true if successful.

RemoveKey(index, count)

Remove keys at a given position.

Boolean RemoveKey(Integer index, Integer count)

Parameters
indexThe zero-based index from where to remove the keys.
countThe number of keys to remove.
Returns
Boolean true if successful.

EmptyKeys()

Empty the keys, but keep the underlying storage.

EmptyKeys()


ClearKeys()

Clear the keys and remove the underlying storage.

ClearKeys()


SetIntermediateKeys(midTime, midValue, endTime, endValue, interpolation)

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, Murl.Color midValue, Number endTime, Murl.Color endValue, Murl.IEnums.Interpolation interpolation)

Parameters
midTimeThe time between zero and the endTime.
midValueThe value at mid time.
endTimeThe end time.
endValueThe value at end time.
interpolationThe interpolation type.

OnEvaluateAnimation(currentValue)

Called if the current value is set. This method is empty and can be overwritten.

OnEvaluateAnimation(Murl.Color currentValue)

Parameters
currentValueThe current value.

GetCurrentValue()

Get the current value.

Murl.Color GetCurrentValue()

Returns
Murl.Color The current value.

StartForward()

Start the timeline forward. The first animation array key is the start time, the last animation array key is the end time.

Boolean StartForward()

Returns
Boolean true if successful.

StartBackward()

Start the timeline backward. The last animation array key is the start time, the first animation array key is the end time.

Boolean StartBackward()

Returns
Boolean true if successful.

SetStartTimeFromKey(index)

Set the timeline start time from a specified key index.

Boolean SetStartTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetEndTimeFromKey(index)

Set the timeline end time from a specified key index.

Boolean SetEndTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetLoopStartTimeFromKey(index)

Set the timeline loop start time from a specified key index.

Boolean SetLoopStartTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetLoopEndTimeFromKey(index)

Set the timeline loop end time from a specified key index.

Boolean SetLoopEndTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

HasPassedTimeFromKey(index)

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)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if the current time has passed the key time within the most recent tick.

IsOnTimeFromKey(index)

Check if the current time is the time from a specified key index.

Boolean IsOnTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if the current time is the key time.

Reset()

Reset the animation.

Reset()