Favicon of Editor

Editor

Pascal Editor is an open-source TypeScript monorepo for building 3D architectural models with React Three Fiber and WebGPU.

Editor website screenshot
Editor GitHub repository preview

Pascal Editor is a 3D building editor for creating architectural projects like walls, slabs, roofs, and interior items, then viewing or sharing them. It's built with React Three Fiber and WebGPU, and ships as a Turborepo monorepo of composable packages (core, viewer, editor, nodes, CLI, MCP server). It's aimed at developers who want to embed a 3D scene editor into their own app, build plugins for new node types, or run a local architectural design tool with AI agent integration via MCP.

The project separates concerns cleanly: @pascal-app/core holds schemas and scene state, @pascal-app/viewer handles rendering, and @pascal-app/editor layers editing tools on top. Nodes (site, building, level, wall, item, zone, etc.) are stored in a flat dictionary keyed by ID, with parent-child links via parentId. Geometry generation happens in systems that run in the render loop and only recompute for nodes marked "dirty," which keeps updates efficient as scenes grow.

Key features

  • Modular package architecture: separate npm packages for core state, viewer runtime, editor UI, and built-in node definitions, so you can use just the viewer or the full editor.
  • Node-based scene model: a typed hierarchy (Site → Building → Level → Wall/Slab/Zone/Item) stored in a flat dictionary with Zustand, persisted to IndexedDB with 50-step undo/redo via Zundo.
  • Systems-driven geometry: dedicated systems (WallSystem, SlabSystem, RoofSystem, ItemSystem) regenerate 3D geometry only for dirty nodes, using CSG for cutouts like doors and windows.
  • Scene registry: maps node IDs to Three.js objects directly, avoiding scene graph traversal for lookups and updates.
  • Plugin system: new node kinds, renderers, placement tools, and sidebar panels ship as plugins through a documented Plugin manifest, with a working example (plugin-trees) to fork.
  • MCP integration: the CLI starts an authenticated Model Context Protocol service alongside the editor, exposing scene tools and resources to AI agents.
  • WebGPU rendering: built on Three.js's WebGPU renderer with React Three Fiber and Drei for camera controls and post-processing.
  • Local-first storage: the CLI keeps projects in a local SQLite-backed store (~/.pascal/data/pascal.db) without requiring a hosted backend.

Ideal use cases

Pascal Editor fits teams building custom 3D architectural or space-planning tools, developers who want an embeddable floor-plan/building editor inside a Next.js or React app, and anyone experimenting with AI agents that manipulate 3D scenes through MCP. It also works as a base for plugin authors who want to add procedural content (like the trees/flowers plugin example) or new furniture and fixture types.

It's not a good fit if you need a full BIM (Building Information Modeling) suite with structural engineering calculations, or a polished no-code product for non-technical end users out of the box. It's also not suited for 2D-only floor plan drawing where a lightweight CAD tool would be simpler, or for projects that can't run a Node.js/Bun-based JavaScript toolchain.

Installation

Run the editor locally without cloning the repo (requires Node.js 22.13+):

npx @pascal-app/cli editor

This starts the editor plus an authenticated MCP service, picks free loopback ports, and stores projects in ~/.pascal/data/pascal.db.

To use the published packages directly in your own app:

npm install @pascal-app/core @pascal-app/viewer @pascal-app/editor @pascal-app/nodes
npm install @pascal-app/capture-protocol @pascal-app/capture-viewer
import { loadPlugin } from '@pascal-app/core'
import { builtinPlugin } from '@pascal-app/nodes'

await loadPlugin(builtinPlugin)

To work on the repo itself, clone it and run everything from the root directory:

# Install dependencies
bun install

# Run development server (builds packages + starts editor with watch mode)
bun dev
# Open http://localhost:3002

For production builds:

turbo build
turbo build --filter=@pascal-app/core

Frequently asked questions

Share:

Stars
24.9K
Forks
3.1K
Last commit
20 hours ago
Repository age
1 year
License
MIT
Self-hosted
No
Activity score
83/100
View Repository
Ad
Favicon

 

  
 

Similar to Editor

Favicon

 

  
 
Favicon

 

  
 
Favicon