Helpers Animation
scripts/vscripts/alyxlib/helpers/animation.lua
Methods
CreateAnimation
Creates a new animation function.
The returned function should be called with a time value between 0 and 1.
Parameters
entity
EntityHandle
Entity to animategetter
function
Function to get the current valuesetter
function
Function to set the new valuetargetValue
T
Value to animate tocurveFunc
function
Animation curve
Returns
- function
New animation function
Animate
Animates a value over time on an entity.
Parameters
entity
EntityHandle
Entity to animategetter
function
Function to get the current valuesetter
function
Function to set the new valuetargetValue
T
Value to animate tocurveFunc
Animation.Curves,function
Animation curvetime
number
Total time of the animationfinishCallback(optional)
function
Callback that is called when the animation is finished
Animate
Animates a value over time on this entity.
Parameters
getter
function
Function to get the current valuesetter
function
Function to set the new valuetargetValue
T
Value to animate tocurveFunc
Animation.Curves,function
Animation curvetime
number
Total time of the animationfinishCallback(optional)
function
Callback that is called when the animation is finished