con un clic
tinyworld-integrations
// Use when changing Tiny World Builder API, webhook, SSE, MCP, plugin, or automation examples.
// Use when changing Tiny World Builder API, webhook, SSE, MCP, plugin, or automation examples.
Use when changing Tiny World Builder selection placement, freehand drawing, asset clipboard, cut/copy/paste/duplicate, saved templates, or Stamps panel navigation.
Use when changing Tiny World Builder renderer setup, shadows, smoke, voxel clouds, ghost board render cost, frame loop, or GPU performance.
Use when changing the home island layout, edge dressing, undersides, draped banners (autoincentive sponsor flag), plane/crop-duster flight paths, banner streamers, or which side of the island is "front".
Use when changing ghost boards, multiplayer preview boards, panning, ghost visibility, jigsaw reveal, or any visibility behavior around the active Tiny World board.
Use when adding or changing persisted user state — settings defaults, audio, camera/orbit, panel positions, feature flags, and the in-app "Save Defaults" pipeline that snapshots localStorage into tinyworld-defaults.json. Also covers the inline-script regex gotcha that has burned us twice.
Use when changing Tiny World Builder Settings modal tabs, panels, controls, rendering/world/material/crowd/AI settings, or settings accessibility.
| name | tinyworld-integrations |
| description | Use when changing Tiny World Builder API, webhook, SSE, MCP, plugin, or automation examples. |
The app has browser-local integration points, not a backend API:
tiny-world-builder.html under
// -------- API / webhooks / SSE bridge --------.?modelApi=1, ?modelStampApi=1,
window.__TWB_MODEL_STAMP_API_ENABLED__ = true, or
localStorage['tinyworld:features:model-stamp-api']='1'.fireWebhook(event, payload) batches editor mutations and POSTs
{ source: 'tiny-world-builder', events } to the configured Developer-panel
webhook URL.EventSource against the configured Developer-panel
SSE URL. Each SSE data: payload must be one JSON command accepted by
applyRemoteCommand.place / set_cell, clear, reset, plus runtime-only vehicle controls: vehicle_spawn, vehicle_set_goal, vehicle_controls, vehicle_remove, and vehicle_clear.isVehicleDrivableCell should allow path cells only when the main kind/extras do not occupy the tile, while bridge cells remain drivable. Call refreshVehiclesForWorldObstacleChange from world edit paths so active auto vehicles reroute immediately when the user drops or removes an obstacle.Examples live under plugins/examples/:
webhook-receiver.js captures outbound webhook batches.sse-command-relay.js exposes /sse for the browser and /command for
external clients.send-command.js is a small CLI for the relay.mcp-stdio-bridge.js is a dependency-free MCP stdio server that calls the
relay and reads the webhook log.vehicle-road-demo.js is a dependency-free MCP client/demo runner that talks
to mcp-stdio-bridge.js, paints a visible road/water/bridge network, spawns
runtime vehicles, and retargets them in a loop so the browser remains
watchably active.?demo=vehicles&seed=tide-ridge-428 creates the small/default visible road demo.?demo=vehicles-large&seed=metro-culdesac-20&stats=1 creates the default 20×20 scale test with arterial/ring roads, bridge crossings, cul-de-sac endpoints, and 36 autonomous vehicles on long routes.size= / mapSize= / grid= / gridSize= accept the nearest valid demo grid size from 12 through 20 (12, 16, 20); cars= / carCount= / vehicles= / vehicleCount= accept 1..120 and are capped by available unique endpoints.
Keep these demos visually self-identifying: show an active badge, hide overlays
that cover the road network, and make vehicles obvious with beacons/markers.
During local demo work, tools/dev-server.js should make bare
http://localhost:3000/ and no-query http://localhost:3000/tiny-world-builder
redirect to the small seed so the user can simply open the port or remembered
app URL and watch it. Use the large URL explicitly for scale/perf checks.When changing command shape, update the app bridge and these examples together.