@drawtonomy/sdk overview
@drawtonomy/sdk is the package extension authors and headless
tooling build against. It exposes:
| Module | Purpose |
|---|---|
ExtensionClient | postMessage client for iframe-hosted extensions. |
| Shape factory functions | createLane(), createVehicle(), etc. |
createSnapshot() | Build a DrawtonomySnapshot from an array of shapes. |
exporter.* | Pure functions that turn a snapshot into OpenDRIVE / OpenSCENARIO / esmini zip / Lanelet2 OSM. Includes a Lanelet2 parser. |
| Types | BaseShape, LaneShape, VehicleShape, DrawtonomySnapshot, … |
Install
Section titled “Install”pnpm add @drawtonomy/sdkCompanion packages
Section titled “Companion packages”| Package | Purpose |
|---|---|
@drawtonomy/sdk | The SDK itself. |
@drawtonomy/dev-server | Local dev server that hosts the editor for extension development. |
Source
Section titled “Source”The SDK source, tests, and examples are in the drawtonomy GitHub repository.
See also
Section titled “See also”- Extension SDK API — building iframe extensions.
- Exporter SDK API — adding new target formats.