Extension SDK
drawtonomy extensions are iframe-hosted web apps that talk to the
editor through postMessage. The SDK gives you a typed client;
the dev-server gives you a local editor to develop against.
This page is a quick orientation. The full guide — manifest schema, capabilities list, message protocol — is in the public repo:
➡ Extension Development Guide (日本語)
Quick start
Section titled “Quick start”# Editor on :3000pnpm add -g @drawtonomy/dev-serverdrawtonomy-dev-server
# Your extension on :3001cd my-extension && pnpm dev --port 3001
open "http://localhost:3000/?ext=http://localhost:3001/manifest.json"Minimum extension
Section titled “Minimum extension”my-extension/ manifest.json index.html src/{ "id": "my-extension", "name": "My Extension", "version": "1.0.0", "entry": "./index.html", "capabilities": ["shapes:read", "shapes:write", "ui:panel"]}import { ExtensionClient, createVehicle } from '@drawtonomy/sdk'
const client = new ExtensionClient()await client.ready()
document.getElementById('add')!.addEventListener('click', async () => { await client.addShapes([createVehicle(0, 0, { templateId: 'sedan' })])})Reference extensions
Section titled “Reference extensions”The in-tree extensions are full-fidelity examples:
ai-scene-generator— natural-language and OpenSCENARIO scene generation.template-preview— preview a shape template.exporter-playground— exercise the exporter against a live canvas.path-footprint-lab— Path Footprint experimentation.
See also
Section titled “See also”- Extension architecture — why iframes, why postMessage.
@drawtonomy/sdkoverview — the package and its modules.