Quickstart
Build, run, and package your first driver in a few minutes.
Protocol reference
Every command, subscription, event, and data type.
The model
A driver never touches the Drawdy scene directly. It exchanges typed messages with the host over two channels:- Commands — a request/response call from the driver to Drawdy. You ask Drawdy to do something (add elements, move the camera, read the selection) and await the result.
- Subscriptions — a long-lived registration. You issue a subscription command once; Drawdy then pushes events to your driver whenever the thing you subscribed to happens.
subscriptionId.
Two guarantees
- Every request has a response. Unlike LSP notifications, every command you issue resolves — with a value or an error — so the driver always knows whether Drawdy processed it. See LSP could have been better for the reasoning.
- Requests are processed in order. Commands sent to Drawdy are handled in the order they are received.
What a driver looks like
A driver is a module that exports two functions:.drawdyx file — a zip containing a manifest.json and the entry bundle (main.js, a single CommonJS file). Drawdy loads the bundle, calls activate, and delivers subscription events to onEvent.
Head to the Quickstart to build one.