Reference
Every public package and export of the Klorad SDK, what it takes and what it returns.
| Package | Import | Layer | Page |
|---|---|---|---|
@klorad/api | @klorad/api/world | World | World |
@klorad/api | @klorad/api/integration | Integration | Integration |
@klorad/access | @klorad/access | Access | Access |
@klorad/notify | @klorad/notify | Platform service over Access | Notify |
@klorad/react | @klorad/react | Binding | React |
@klorad/engine-three | @klorad/engine-three, /react | Renderer | three.js renderer |
@klorad/api also exports everything from /world and /integration at its root; prefer the
subpaths, which say which layer your code depends on.
Stability
The packages are at 0.x. Under semantic versioning, a 0.x minor release may change the public API; every such change is listed in the package's changelog with a migration line. Exports not documented here are internal, even when a bundler lets you reach them.
Conventions
- Every value the SDK returns is immutable (frozen) unless its type says otherwise.
- Functions that can fail on bad input throw a
TypeErrororRangeErrorwith a message that names the fix. Operations that can fail on the outside world (a device, a vendor) return an outcome instead of throwing. - Instants are milliseconds since the Unix epoch (
Instant = number), always on the scene's clock.
Something wrong or unclear? Tell your contact at Prieston Technologies.