Modeler ↗ is a CSG ↗ modeling library for React, and a cli helper tool.
It is built from two packages: modeler-csg
- the main modeling library, and modeler-cli
.
modeler-csg
is a custom React reconciler ↗ designed to work with react-three-fiber
↗:
const React = require("react");
const ReactDOM = require("react-dom");
const { Canvas } = require("react-three-fiber");
const { Model } = require("modeler-csg");
ReactDOM.render(
<Canvas>
<ambientLight color={0x888888} />
<spotLight position={[0, 10, 10]} />
<Model>
<subtract>
<cube />
<sphere radius={1.3} />
</subtract>
</Model>
</Canvas>,
document.getElementById("root")
);
modeler-cli
provides a quick live-reloading preview, and offline STL export.
For more information and examples go to github: szymonkaliski/modeler ↗.
128 words published on 2019-04-19 — let me know what you think