Documentation Index
Fetch the complete documentation index at: https://mintlify.com/g-js-api/G.js/llms.txt
Use this file to discover all available pages before exploring further.
keyframe_system is a factory that returns two paired builder functions — keyframe and animate — for creating GD keyframe animation triggers. Each keyframe defines a pose for an object at a point in time; animate drives a target group through an ordered sequence of those poses.
For a narrative walkthrough see Keyframes.
keyframe_system
Initializes a keyframe system and returns a{ keyframe, animate } pair. Both builders use the same internal keyframe list, so they must be used together.
{ keyframe, animate } where both members are builder functions described below.
keyframe
Creates a single keyframe trigger that defines object pose at a given point in the animation sequence. Must have.add() called to place it in the level.
Target X position of the object at this keyframe.
Target Y position of the object at this keyframe.
Target rotation in degrees.
Target X scale factor.
Target Y scale factor.
Seconds to transition from the previous keyframe to this one.
Easing function for the transition. Use an easing constant — see the Easing Constants table below.
GJsObject — call .add().
animate
Creates an animate trigger that drives a target group through the keyframes defined in this keyframe system.Group ID of the object(s) to animate.
The keyframes list associated with this animation. Typically the ordered array collected from calls to
keyframe(...).Total animation duration override in seconds. When
0, individual keyframe durations are used.Global easing override for the entire animation.
GJsObject — call .add().
Easing Constants
Import easing constants fromgeometry-dash-gjs. They are also documented in full in the Constants reference.
| Constant | Value | Description |
|---|---|---|
NONE | 0 | No easing (linear) |
EASE_IN_OUT | 1 | Ease in and out |
EASE_IN | 2 | Ease in only |
EASE_OUT | 3 | Ease out only |
ELASTIC_IN_OUT | 4 | Elastic ease in and out |
ELASTIC_IN | 5 | Elastic ease in |
ELASTIC_OUT | 6 | Elastic ease out |
BOUNCE_IN_OUT | 7 | Bounce ease in and out |
BOUNCE_IN | 8 | Bounce ease in |
BOUNCE_OUT | 9 | Bounce ease out |
EXPONENTIAL_IN_OUT | 10 | Exponential ease in and out |
EXPONENTIAL_IN | 11 | Exponential ease in |
EXPONENTIAL_OUT | 12 | Exponential ease out |
SINE_IN_OUT | 13 | Sine ease in and out |
SINE_IN | 14 | Sine ease in |
SINE_OUT | 15 | Sine ease out |
BACK_IN_OUT | 16 | Back ease in and out |
BACK_IN | 17 | Back ease in |
BACK_OUT | 18 | Back ease out |
Full Example
Both
keyframe(...) and animate(...) return GJsObject instances. You must call .add() on each one individually for them to appear in the exported level.