Garry's Mod Wiki

AnimationData

Description

Table used by panel animation methods, primarily Panel:AnimationThinkInternal, and returned by Panel:NewAnimation.

Members

number StartTime
The system time value returned by SysTime when the animation starts/will start.
number EndTime
The system time value returned by SysTime when the animation ends/will end.
number Ease
The ease in/out level of the animation.

Default: -1

function OnEnd
The callback function that will be called upon completion of the animation.
Function argument(s):
1 table animData - This structure.
2 Panel tgtPanel - The panel the animation was run on.
function Think
The think function called every frame that will animate the panel object. This varies based on the animation. You can create a custom function for this if you aren't using the stock panel methods.
Function argument(s):
1 table animData - This structure.
2 Panel tgtPanel - The panel the animation is being run on.
Vector Pos
The target position, or target translation of the panel object. Used by Panel:MoveTo and Panel:MoveBy respectively.
Vector StartPos
The position of the panel object when the animation started. Used by Panel:MoveTo and Panel:MoveBy.
boolean SizeX
Whether to resize the panel horizontally or not. Only used by Panel:SizeTo.
boolean SizeY
Whether to resize the panel vertically or not. Only used by Panel:SizeTo.
Vector Size
The target size of the panel object. Only used by Panel:SizeTo.

Default: (0, 0, 0)

Vector StartSize
The size of the panel object when the animation started. Only used by Panel:SizeTo.
table Color
The target colour of the panel object. Only used by Panel:ColorTo.
table StartColor
The colour of the panel object when the animation started. Only used by Panel:ColorTo.
number Alpha
The target alpha (0-255) of the panel object. Only used by Panel:AlphaTo.
number StartAlpha
The alpha (0-255) of the panel object when the animation started. Only used by Panel:AlphaTo.
number Speed
The speed to use for transitions when using linear interpolation (Lerp) animations. Only used by Panel:LerpPositions.
boolean UseGravity
Whether or not to use easing to make the panel 'jump' at its target, slowing as it approaches. Only used by Panel:LerpPositions.