KloradDocs

@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";
ExportKindDescription
createThreeRenderer(options)functionDraws the scene into container. Returns a ThreeRenderer: canvas, select(id), frame(ids?), dispose().
ThreeView (/react)componentThe renderer as a React component; reads the scene from KloradProvider unless given one.
defaultPalette, defaultStylevalueThe default colours and style function.
Palette, ObjectStyle, StyleContext, StyleFntypeFor objectStyle.
localToThree, threeToLocal, geoToThree, orientationToEulerfunctionFrame 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.