Gizmos
Gizmos are things you place in Scape that do something. A Gizmo can be a switch, an instrument, a game piece, a light, or a tile that changes how players move.
The Scape SDK lets you define them in TypeScript. You describe state, actions and bounded presentation. Scape supplies permissions, persistence, rendering, sound output and authoritative movement.
A small definition, many possibilities
A project collects one or more defineObject definitions. Each placed instance has independent state. Actions update that state through a pure reducer; views and effects describe how Scape presents the result.
| Capability | Start with |
|---|---|
| One Gizmo controls another | Connectors and signals |
| Solana/Ethereum tokens and prediction markets | Host market data |
| Websites and custom HTML interfaces | Website and HTML panels |
| Shared state and buttons | Counter |
| Editor configuration and participants | Voting booth |
| State-driven light and a toggle | Lamp |
| Cosmetic arrival feedback | Pressure pad |
| Directional movement | Floor fan |
| Shared action feedback | Chime |
| Same-floor travel | Jump pad |
| World selection and navigation | World picking and navigation |
Start building
Install the public CLI, scaffold a project, and connect it to your developer world on scape.wtf. Edit a definition and see accepted changes in the world. Quickstart walks through the full flow.
Test uploaded Gizmos in your private developer world, then create a release and install it in worlds you own. Each world keeps its installed version until you explicitly update it. You can also buy Gizmos or submit your own for sale through the Gizmo shop.
How Gizmos run
Your code does not receive the DOM, raw Three.js scene, camera, shaders, audio context, network, credentials, or timers. Effects are declarative recipes, not unrestricted rendering callbacks. Scape isolates uploaded code; the SDK's local test runtime alone does not.
The local TV implementation introduces a host-owned media declaration for live television. It selects an opaque catalogue ID through an editor action; the host supplies discovery, listings and the video popover. It requires the matching SDK, server, Worker and native iPhone binary and is not yet available in the published SDK. Arbitrary media URLs and embedded web audio are not part of this capability.
Gizmo actions do not run AI models. To connect an external model-driven participant, use the separate Agent API.
Host market data
SDK 0.3.4 adds market: { kind: 'solana-token', field: 'token', action: 'select' }. The named editor action validates and saves a GizmoMarketToken (or null), using validGizmoMarketToken. Token identity is an explicit Solana mint address; symbol and name are display metadata. The host supplies Configure search, price and 24-hour change, plus 24h/7d/30d charts when its provider is configured. Missing history stays unavailable rather than being invented from a spot price.
An optional displayField names a separate saved field containing label or card. Include it in configuration and provide an editor action to change it. Absent values use the price label. Permanent cards request quotes, not history. Quotes, chart ranges, favorites and provider credentials are never saved in shared world state or passed to reducers. Favorites stay on the current device. Market presentation cannot be combined with web, media, textEditor or worldEditor. This capability requires the matching host release.
Market definitions support Ethereum mainnet token identities (chain: 'ethereum') and kind: 'polymarket' selections containing an id and question. Prices, outcomes and trading remain host-owned. Token identities must match the declared provider; definitions do not receive wallet credentials or network access. See the market reference.
