0.23.0 • Published 1 year ago

@react-cad/core v0.23.0

Weekly downloads
87
License
LGPL-2.1-only
Repository
github
Last release
1 year ago

@react-cad/core

Core ReactCAD WebAssembly library, providing primitives for constructing the shape tree and a viewer to render shape trees into an HTML canvas.

The viewer code is derived from the Open CASCADE WebGL Sample application.

Usage

  import reactCadCore from "@react-cad/core";

  const core = await reactCadCore();
  const cube = core.createCADNode("box");
  cube.setSize([2, 2, 2]);

  core.renderSTEP(cube).then(contents => fs.writeFileSync("cube.step", contents));;

Use on the web requires more complex loading. See @react-cad/storybook-framework for a webpack example. One you have the core object:

  const cube = core.createCADNode("box");
  cube.setSize([2, 2, 2]);

  const canvas = document.getElementById("my-canvas");
  const view = core.createView(canvas);

  core.renderNodeAsync(cube, view);

See src/react-cad-core.d.ts for the TypeScript API.

0.21.0

1 year ago

0.20.0

1 year ago

0.23.0

1 year ago

0.22.0

1 year ago

0.19.0

2 years ago

0.19.1

2 years ago

0.19.2

2 years ago

0.16.0

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.9.0

2 years ago

0.12.0

2 years ago

0.8.0

2 years ago

0.13.0

2 years ago

0.14.0

2 years ago

0.15.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.0

3 years ago

0.3.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.4

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago