Szymon Kaliski

  1. Main
  2. Projects
  3. Notes
  4. Music
  5. Bio

Modeler

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.

Backlinks

  1. 2023-10-02Building a DIY Pen Plotter1
  2. 2021-01-17DAG and Tree Representations of Code1

128 words published on 2019-04-19newsletter, rss