Objects (*.obj.json)
Catalog definition under sprites/<id>.obj.json. Instances use the obj command.
{
"id": "lamp_widget",
"layer": "overlay",
"parts": [
{ "id": "bg", "kind": "rect", "width": 40, "height": 283, "color": "#343a52e0" },
{
"id": "ptr",
"kind": "polygon",
"points": [[20, 0], [0, 13], [20, 26]],
"bind": { "y": { "flag": "score", "map": { "5": 23 }, "default": 23 } }
}
]
}
Usually you need
| Key | Type | Effect |
|---|---|---|
id | string | Required definition id |
parts | array | Required parts |
layer | string | Default plane (overlay, …) |
Root keys
| Key | Type | Effect |
|---|---|---|
id | string | Definition id |
parts | array | Part list |
layer | string | Default draw layer |
transition / transition_in / transition_out | kind | Default show/hide |
duration / transition_duration | number | Seconds |
modulate | color | Root tint |
scale | number or [sx,sy] | Root scale |
rotation_degrees | number | Root rotation |
Parts
Kinds: image | rect | polygon | text.
Meters and HUD gadgets in the root demo are mostly rect + polygon (and bind) — you do not need sprite art for a score lamp. Use image when you have a PNG face.
Shared
| Key | Type | Effect |
|---|---|---|
id | string | Part id (for update) |
kind | enum | Shape |
x / y / width / height / order | number | Geometry / draw order |
points | [[x,y],…] | Polygon |
color / opacity / visible | — | Look |
path / value / image fields | — | Image source |
frames / fps / loop / intervals | — | Flipbook |
bind | object | Flag → property — Binds |
Text parts
| Key | Type | Effect |
|---|---|---|
text | string | Caption |
bbcode_enabled | bool | Rich text |
font_size | number | Size |
align_h | string | Align |
autowrap | bool | Wrap |
No shader / sfx patch on text parts.