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

Layer: sprites

Decorative or interactive sprites on a screen.

{
  "type": "sprites",
  "items": [
    {
      "id": "logo",
      "kind": "image",
      "image": "sprites/logo.png",
      "interaction": {
        "hit_test": "rect",
        "hooks": { "on_click": "url:https://example.com" }
      }
    }
  ]
}

Usually you need

KeyTypeEffect
type"sprites"Required
itemsarraySprite entries

Layer keys

KeyTypeEffect
type"sprites"Required
ordernumberZ
layout / style / modulate / scale—Layer chrome

Item keys

KeyTypeDefaultEffect
idstring—Locale merge key
kind"image" | "rect" | "polygon""image"Shape
image / pointspath / [[x,y],…]—Kind-specific
interactionobject—hooks, focusable, focus_order, hit_test, hooks_override
state_visualobject—Per-state look
modulate / scale / show_if—Tint, scale, condition

Root on_click etc. are invalid — use interaction.hooks.*. hit_test: rect (default), alpha (image), polygon (polygon only).

Actions and hooks · state_visual.