Lunar: Browser-based geometry processing. AI-controllable via MCP.

We shared trueform here a while ago — the WASM geometry engine. Since then we’ve been building Lunar on top of it: a full geometry workbench that runs entirely in the browser, using ThreeJS.

What’s new: AI agents operate the app directly.

Claude, Gemini, and Codex connect via MCP (Model Context Protocol) and get three tools: discover the operator catalog, read the scene graph, and execute operations. Same schemas that render the UI controls render the tool descriptions. Same executor validates and runs both paths.

On the Three.js side:

  • Geometry is refcount-cached per operand — multiple scene nodes sharing one mesh share one BufferGeometry
  • Scalar field visualization (curvature, distance fields) patches vertex color attributes in place
  • A dirty set per frame drives selective sync: only touched nodes get updated
  • Typed array views pass directly from WASM to Three.js buffer attributes, same zero-copy pattern from the trueform post

Links:

Happy to answer questions about the architecture, the MCP integration, or the Three.js rendering pipeline.