obj
Shows, updates, or destroys an instance of a catalog object (sprites/<id>.obj.json).
{
"type": "obj",
"object": "lamp_widget",
"instance_id": "score_lamp",
"show": true,
"x": 16,
"y": 16
}
Usually you need
| Field | Type | Default | Effect |
|---|---|---|---|
instance_id | string | — | Runtime instance id |
object | string | — | Def id (required on first show) |
show | bool | — | Show / hide (true + object to create) |
x / y | number | 0 on create | Position |
All fields
| Field | Type | Default | Effect |
|---|---|---|---|
instance_id | string | — | Instance |
object | string | — | Definition id |
show | bool | — | Visibility |
x / y | number | 0 | Position |
transition / duration | kind / number | "instant" / 0 | Show/hide |
color / opacity / sfx | … | — | Look / loop sfx |
shader / shader_params | — | — | Shader |
bind / layout / interaction | object | — | Binds / host / hooks |
apply | "persistent" | "node_local" | "persistent" | Scope |
update | object | — | Part patch |
destroy | bool | false | Destroy instance |
when | expression | — | Skip when falsy |
Def shape: Objects. Guide: Sprites and objects.