Skip to content

armgit / forma

Public Imported from GitHub
0

A 1.2 MB pure-Rust rewrite of headless Blender built for AI agents — 3D B-rep modeling engine, CLI, and MCP server

Link forma-3d npm package in README before Benchmarks

wrong-nebula52c61404fe8c
diff --git a/README.md b/README.md
index f882ac8..c98b3ab 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,28 @@ forma draw --out blueprint.svg script.forma # dimensioned vector engineerin
---
+## npm Package (`forma-3d`)
+
+[![npm version](https://img.shields.io/npm/v/forma-3d?color=7ae08c&label=npm%20forma-3d)](https://www.npmjs.com/package/forma-3d)
+
+Install or run Forma's zero-dependency WebAssembly engine directly from npm ([**npmjs.com/package/forma-3d**](https://www.npmjs.com/package/forma-3d)) on macOS, Linux, Windows, or in JavaScript/TypeScript:
+
+```bash
+npm install forma-3d # JS/TS ESM + WASM library + CLI + MCP server
+npx -y forma-3d eval --strict --out part.glb script.forma
+npx -y forma-3d-mcp # stdio MCP server
+```
+
+```js
+import { evalPipe, exportMesh, renderPng } from "forma-3d";
+
+const obs = await evalPipe(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, { strict: true });
+const glb = await exportMesh(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, "glb");
+const png = await renderPng(`flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))`, 512);
+```
+
+---
+
## Benchmarks
All models were evaluated head-to-head on stock headless **Blender 5.3.0 (`bpy`)** vs **Forma (`Forma-Pipe`)** across 6 cross-category exact-dimension tasks (`flange_plate`, `pipe_tee`, `beveled_enclosure`, `hex_nut`, `subdiv_mug`, `pedestal_bowl`), verified independently with `trimesh` + `scipy` (Chamfer distance, Hausdorff-99, Generalized Winding Number Volumetric IoU, watertight/0-non-manifold checks, and 16-layer planar sliceability).