Skip to content

@drawtonomy/sdk overview

@drawtonomy/sdk is the package extension authors and headless tooling build against. It exposes:

ModulePurpose
ExtensionClientpostMessage client for iframe-hosted extensions.
Shape factory functionscreateLane(), 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.
TypesBaseShape, LaneShape, VehicleShape, DrawtonomySnapshot, …
Terminal window
pnpm add @drawtonomy/sdk
PackagePurpose
@drawtonomy/sdkThe SDK itself.
@drawtonomy/dev-serverLocal dev server that hosts the editor for extension development.

The SDK source, tests, and examples are in the drawtonomy GitHub repository.