Overview
The ideas behind the Klorad API, one per page, for when you want to know why the API is shaped as it is.
Read these when you want to know why the API is shaped as it is. You do not need them before the quickstart or a guide: each guide explains the words it uses. Once you know the model, the API is predictable: you can guess where a capability lives and what it may and may not do.
@klorad/accessHow people and devices reach the world: Worlds (each team's own view), entitlement, audit.@klorad/api/integrationHow the world is coupled to reality: sources, devices, connectors.@klorad/api/worldOwns meaning. Pure TypeScript: no React, no renderer, no database.SpaceTimePhysical correspondenceInteraction and actuation@klorad/engine-three, engine-openlayersDraw what the World layer defines, in 3D or as a plan.@klorad/reactDeclare objects, read state with hooks.Each page explains one idea, shows the smallest code that uses it, and links to the example that runs it. Pick the one your task needs:
- placing things on Earth: Space;
- data that arrives late, twice or not at all: Time;
- connecting a system: Integration;
- who sees and does what: Worlds and access;
- choosing a renderer: Rendering.
The API follows the model of the doctoral thesis behind Klorad; the model gives that background.
Words that mean more than one thing
World. Three uses, kept apart in these docs: the World layer is the part of the API that
owns meaning (@klorad/api/world); a World in @klorad/access is one team's entitled view of a
twin; a published world is what visitors open, built from a public package. A scene is the
one place world state lives; Worlds and published worlds are views of a scene.
Live. In the examples, readings marked live come from a fixture source unless the example says otherwise. A moving value is not a connected device.
The model
Three layers and four pillars, and the rule about who may call whom.
Space
Every scene is anchored on Earth; positions are real places.
The scene and its events
The one place world state changes, and the ordered stream every change becomes.
Physical correspondence
Digital Object, Digital Shadow, Digital Twin: how each object relates to the physical world.
Time
Readings ordered by when they were observed, not when they arrived.
Integration
Sources of readings and devices that accept commands.
Interaction and actuation
Action, Entitlement, Behaviour, Animation: one way, always.
Worlds and access
Entitled views of one twin, and the audit log.
Rendering
Renderers draw what the World layer defines and never change it.
Something wrong or unclear? Tell us.