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.
obj_props is a dictionary that maps human-readable property name strings to GD’s internal numeric property IDs. It is primarily used with the object() and trigger() core functions to build object configuration dictionaries in a readable way, without memorising raw numeric IDs.
How to Use
Import obj_props and use bracket notation to reference properties as computed keys:
import { object, obj_props } from 'geometry-dash-gjs';
object({
[obj_props.OBJ_ID]: 1,
[obj_props.X]: 75,
[obj_props.Y]: 105,
[obj_props.GROUPS]: [group(1), group(2)],
}).add();
You can also destructure the properties you need:
const { OBJ_ID, X, Y, DURATION, TARGET } = obj_props;
trigger({
[OBJ_ID]: 901,
[X]: 300,
[Y]: 200,
[DURATION]: 1.5,
[TARGET]: group(5),
}).add();
Always use bracket notation [obj_props.X] as a computed key when building object dictionaries. Plain string keys like "X" will not be recognised by GD’s internal parser.
Properties that control where an object sits in the level and how it is oriented.
| Property | Description |
|---|
OBJ_ID | Object ID — determines which GD object is placed |
X | X position in GD units |
Y | Y position in GD units |
ROTATION | Rotation in degrees |
SCALING | Uniform scale factor |
HORIZONTAL_FLIP | Mirror the object horizontally |
VERTICAL_FLIP | Mirror the object vertically |
Groups & Colors
Properties for assigning groups and color channels.
| Property | Description |
|---|
GROUPS | Array of group IDs the object belongs to |
COLOR | Primary color channel (channel 1) |
COLOR_2 | Secondary color channel (channel 2) |
TARGET_COLOR | Target color channel used by color triggers |
GROUP_PARENT | Marks the object as a group parent |
HVS | HSV string for color channel 1 |
COLOR_2_HVS | HSV string for color channel 2 |
HVS_ENABLED | Enable custom HSV for channel 1 |
COLOR_2_HVS_ENABLED | Enable custom HSV for channel 2 |
Trigger Properties
Properties that apply specifically to trigger objects.
| Property | Description |
|---|
DURATION | Duration of the trigger’s effect in seconds |
TOUCH_TRIGGERED | Trigger activates on player touch |
SPAWN_TRIGGERED | Trigger activates on spawn (via spawn trigger) |
SPAWN_DURATION | Delay between spawned trigger activation |
ACTIVE_TRIGGER | Marks trigger as active from the start |
Visual
Properties that control rendering and layer ordering.
| Property | Description |
|---|
OPACITY | Object opacity (0 = invisible, 1 = fully visible) |
BLENDING | Enable additive blending |
Z_LAYER | Z-layer for depth sorting |
Z_ORDER | Z-order within the Z-layer |
EDITOR_LAYER_1 | Editor display layer 1 |
EDITOR_LAYER_2 | Editor display layer 2 |
DONT_FADE | Prevent the object from fading in/out |
DONT_ENTER | Prevent the object from entering with the camera |
Pulse / Color Effects
Properties for pulse trigger configuration and copied color effects.
| Property | Description |
|---|
FADE_IN | Fade-in time for pulse |
HOLD | Hold time for pulse |
FADE_OUT | Fade-out time for pulse |
PULSE_HSV | Use HSV mode for pulse |
COPIED_COLOR_ID | Source channel to copy color from |
COPIED_COLOR_HVS | HSV offset for the copied color |
COPY_OPACITY | Copy opacity from the source channel |
PLAYER_COLOR_1 | Use Player 1’s color |
PLAYER_COLOR_2 | Use Player 2’s color |
MAIN_ONLY | Apply effect to main color only |
DETAIL_ONLY | Apply effect to detail color only |
Move / Rotate
Properties used by move and rotate triggers.
| Property | Description |
|---|
MOVE_X | Horizontal displacement in GD units |
MOVE_Y | Vertical displacement in GD units |
ROTATE_DEGREES | Degrees to rotate the target |
LOCK_TO_PLAYER_X | Lock the object’s X axis to the player |
LOCK_TO_PLAYER_Y | Lock the object’s Y axis to the player |
Spawn / Target
Properties for targeting groups and controlling activation.
| Property | Description |
|---|
TARGET | Group ID of the trigger’s target |
TARGET_TYPE | Type of the target (group / color / etc.) |
YELLOW_TELEPORTATION_PORTAL_DISTANCE | Distance offset for yellow teleport portals |
ACTIVATE_GROUP | Activate the target group on trigger |
Text
| Property | Description |
|---|
TEXT | Text string for text objects (base64-encoded in GD) |
Trigger Colors
RGB color values used directly on trigger objects.
| Property | Description |
|---|
TRIGGER_RED | Red component (0–255) |
TRIGGER_GREEN | Green component (0–255) |
TRIGGER_BLUE | Blue component (0–255) |
Miscellaneous
| Property | Description |
|---|
PORTAL_CHECKED | Whether a portal has been validated by the editor |
Additional Properties
obj_props contains many more properties used by specific trigger and object types. The full set covers advanced follow triggers, song editing, SFX, particle systems, item triggers, and more. A non-exhaustive selection of commonly accessed additional properties:
| Property | Description |
|---|
EASING | Easing type for move/rotate/scale triggers |
EASING_RATE | Easing rate modifier |
ITEM | Item ID used by pickup and count triggers |
COUNT | Count value for count triggers |
SPEED | Speed modifier |
DELAY | Delay in seconds |
INTERVAL | Minimum trigger interval |
MULTI_TRIGGER | Allow the trigger to fire multiple times |
COMPARISON | Comparison type for instant count triggers |
DUAL_MODE | Enable dual-player mode |
ZOOM | Camera zoom amount |
SONG_ID | Song ID for song triggers |
SONG_VOLUME | Song volume (0–1) |
SONG_SPEED | Song speed modifier |
SONG_LOOP | Loop the song |
SONG_CHANNEL | Audio channel for the song |
PARTICLE_DATA | Serialised particle properties string |
GRAVITY | Gravity magnitude for gravity triggers |
SEQUENCE | Sequence data string |
MODE | Sequence mode (stop / loop / last) |
REMAPS | Remap data for remappable trigger functions |
TYPE_1 | Item type 1 for item edit/compare |
TYPE_2 | Item type 2 for item edit/compare |
ASSIGN_OP | Assignment operator for item edit |
COMP_OP | Comparison operator for item compare |
MOD | Modifier scalar for item expressions |
ABSNEG_1 | Abs/neg flag for first item operand |
ABSNEG_2 | Abs/neg flag for second item operand |
RFC_1 | Round/floor/ceil flag for first operand |
RFC_2 | Round/floor/ceil flag for second operand |
When exploring unfamiliar trigger types, check which properties they expose in the GD editor and look up the corresponding obj_props key in the full type declaration at properties/obj_props.d.ts.