Models and mapsGenerated geometry
Select and move an object
Each object says whether it is only modelled, mirrors a sensor, or also commands a device: object, shadow or twin.
What this example defines: its scene and, where it has them, its simulated source and its styling. The page imports and runs this file; the page's own renderer, panels and controls are not in it. For a complete app to run on your machine, download the quickstart starter.
import { SceneObject } from "@klorad/react";
/**
* Three objects, declared: a pavilion nothing is wired to (a Digital Object), a sensor that
* reports (a Digital Shadow) and a barrier that can also be told what to do (a Digital Twin).
* Rendered inside a KloradProvider, each component adds its object and removes it on unmount.
*/
export function ObjectsWorld() {
return (
<>
<SceneObject id="pavilion" name="Pavilion" position={{ east: 0, north: 0 }} geometry={{ kind: "model", uri: "/models/kiosk.glb" }} />
<SceneObject
id="gate-sensor"
name="Gate sensor"
position={{ east: 14, north: -8, up: 0 }}
correspondence="shadow"
binding={{ source: "sandbox", entity: "gate" }}
geometry={{ kind: "marker" }}
/>
<SceneObject
id="barrier"
name="Barrier"
position={{ east: -14, north: 6 }}
correspondence="twin"
binding={{ source: "sandbox", entity: "barrier" }}
geometry={{ kind: "box", width: 6, depth: 0.5, height: 1.2 }}
/>
</>
);
}Click an object to select it, then drag it over the ground.
Anchor40.62637° N 22.94838° E
East, north+0.0 m +0.0 m
Digital ObjectDigital ShadowDigital TwinStale