Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

FieldTypeDefaultEffect
instance_idstring—Runtime instance id
objectstring—Def id (required on first show)
showbool—Show / hide (true + object to create)
x / ynumber0 on createPosition

All fields

FieldTypeDefaultEffect
instance_idstring—Instance
objectstring—Definition id
showbool—Visibility
x / ynumber0Position
transition / durationkind / number"instant" / 0Show/hide
color / opacity / sfx…—Look / loop sfx
shader / shader_params——Shader
bind / layout / interactionobject—Binds / host / hooks
apply"persistent" | "node_local""persistent"Scope
updateobject—Part patch
destroyboolfalseDestroy instance
whenexpression—Skip when falsy

Def shape: Objects. Guide: Sprites and objects.