Garry's Mod Wiki

AnimationData

Description

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

Parameters

StartTime [number]

The system time value returned by SysTime when the animation starts/will start.

EndTime [number]

The system time value returned by SysTime when the animation ends/will end.

Ease [number]

The ease in/out level of the animation.

Default: -1

OnEnd [function]

The callback function that will be called upon completion of the animation. The arguments passed to it are:

  • table animData - This structure.
  • Panel tgtPanel - The panel the animation was run on.

Think [function]

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. The arguments passed to it are:

  • table animData - This structure.
  • Panel tgtPanel - The panel the animation is being run on.
  • number fraction - The progress fraction of the animation, between 0 and 1. The change rate of this number will not be linear if you are easing.

Pos [Vector]

The target position, or target translation of the panel object. Used by Panel:MoveTo and Panel:MoveBy respectively.

StartPos [Vector]

The position of the panel object when the animation started. Used by Panel:MoveTo and Panel:MoveBy.

SizeX [boolean]

Whether to resize the panel horizontally or not. Only used by Panel:SizeTo.

SizeY [boolean]

Whether to resize the panel vertically or not. Only used by Panel:SizeTo.

Size [Vector]

The target size of the panel object. Only used by Panel:SizeTo.

Default: (0, 0, 0)

StartSize [Vector]

The size of the panel object when the animation started. Only used by Panel:SizeTo.

Color [table]

The target colour of the panel object. Only used by Panel:ColorTo.

StartColor [table]

The colour of the panel object when the animation started. Only used by Panel:ColorTo.

Alpha [number]

The target alpha (0-255) of the panel object. Only used by Panel:AlphaTo.

StartAlpha [number]

The alpha (0-255) of the panel object when the animation started. Only used by Panel:AlphaTo.

Speed [number]

The speed to use for transitions when using linear interpolation (Lerp) animations. Only used by Panel:LerpPositions.

UseGravity [boolean]

Whether or not to use easing to make the panel 'jump' at its target, slowing as it approaches. Only used by Panel:LerpPositions.

Page Links


Special Pages


Wikis

?

Render Time: 65ms

DB GetPage 7
Generate Html 36
SaveChanges (1) 8
Render Body 0
Render Sidebar 12