Scene
A canvas scene of objects that springs between layouts.
Two clients talk to one API, which owns the database.
Installation
npm install @remold-ui/reactImport scenes from @remold-ui/react/canvas so canvas rendering stays opt-in.
Using plain JavaScript? Install @remold-ui/canvas instead.
Usage
import { Remold } from "@remold-ui/react/canvas";
<Remold.Scene label="Our architecture" objects={objects} layouts={layouts} layout={layout} />Describe the objects once and each layout as plain data: where every object sits, and the camera. Changing layout (or calling to with a layout's name) springs every object, link and the camera to the new arrangement. People can drag to turn the scene, tap an object to focus it, or tab through the objects with a screen reader.
API reference
Prop
Type
Data attributes
| Attribute | Meaning |
|---|---|
data-rm-layout | The layout on screen. |
data-rm-focused | The focused object, if any. |