@klorad/engine-three
Draws a scene with three.js, follows its events, and never changes world state.
import { createThreeRenderer } from "@klorad/engine-three";
import { ThreeView } from "@klorad/engine-three/react";| Export | Kind | Description |
|---|---|---|
createThreeRenderer(options) | function | Draws the scene into container. Returns a ThreeRenderer: canvas, select(id), frame(ids?), dispose(). |
ThreeView (/react) | component | The renderer as a React component; reads the scene from KloradProvider unless given one. |
defaultPalette, defaultStyle | value | The default colours and style function. |
Palette, ObjectStyle, StyleContext, StyleFn | type | For objectStyle. |
localToThree, threeToLocal, geoToThree, orientationToEuler | function | Frame conversions: east is +x, up is +y, north is -z. |
Prop
Type
ThreeView adds selected, autoFrame (default true), className and style. It reads its
options when it mounts; change its key to apply new ones.
Something wrong or unclear? Tell your contact at Prieston Technologies.