Pascal Editor: The Browser CAD Built Like a Game Engine

A deep dive into the flat scene store, dirty-node update loop, and WebGPU-ready architecture that make real-time architectural editing work in the browser.

8 min read • View on GitHub • More from pascalorg

Generating illustration...

Pascal Editor’s core idea is not just browser CAD. It is browser CAD that updates like a simulation.
Key Takeaways

Pascal Editor is easy to misread at first glance. It looks like a web-based CAD tool, which is true, but incomplete. The more interesting story is that it borrows ideas from game engines to keep architectural editing responsive in the browser.

A 3D building editor built with React Three Fiber and WebGPU.

Pascal Editor GitHub README, Project Documentation · README.md at main · pascalorg/editor

Why Pascal Editor Feels Different

The project is aimed at architectural work, but it does not behave like classic desktop CAD. The goal is immediate feedback while you place walls, cut openings, and move objects around a scene. That matters because architectural modeling gets slow when every edit forces a full redraw or a deep tree walk.

Pascal’s wager is simple: keep the model flat, track what changed, and rebuild only the affected geometry. That is the kind of architecture you build when you expect a lot of local edits and a lot of 3D objects. It is also why the repo feels closer to an engine than a form-based app.

A close-up of a wall segment with a door opening punched through it. A thin dirty flag and registry thread connect the wall to a control console in the background. The image explains how a small state change triggers targeted geometry regeneration instead of a full scene rebuild.
A wall edit does not ripple through the whole scene. It marks a node dirty, then regenerates only the geometry that depends on it.

The Trick: Flat State, Not a Deep Scene Graph

The core model is a flat dictionary of nodes keyed by ID, with relationships carried separately through parent IDs and child arrays. That is a very different mental model from a traditional nested scene graph, where you traverse deeper and deeper object trees to find what changed.

type NodeId = string;

type SceneNode = {
  id: NodeId;
  parentId?: NodeId;
  children: NodeId[];
  type: 'wall' | 'slab' | 'item' | 'zone';
};

type SceneStore = Record<NodeId, SceneNode>;

const scene: SceneStore = {
  wall_01: { id: 'wall_01', children: ['door_02'], type: 'wall' },
  door_02: { id: 'door_02', parentId: 'wall_01', children: [], type: 'item' }
};

That choice buys two things. First, it makes access cheap and predictable. Second, it gives the editor room to manage geometry as a system of IDs and dependencies instead of a pile of nested objects that React has to reconcile every time the user drags a wall.

The editor’s update path is a relay: input changes state, state marks nodes dirty, systems rebuild only what is necessary, and the registry keeps data objects linked to live Three.js objects.

A key rule: **`packages/viewer` must never import from `apps/editor`**. The viewer is a standalone component; editor-specific behavior is injected via props/children.

Pascal Editor GitHub CONTRIBUTING.md, Project Documentation · CONTRIBUTING.md at main · pascalorg/editor

How Geometry Actually Updates

This is where Pascal Editor stops looking like a UI library and starts looking like an engine. A user action updates the scene store. The affected node gets marked dirty. Then the frame loop asks the relevant system, such as a wall or slab system, to regenerate only the geometry tied to that node.

That separation matters because renderers and geometry generation are not the same job. A renderer shell can keep the live object in place while the system recalculates the vertices, cutouts, or joins behind it. For architectural work, that is the difference between a usable tool and a sluggish one.

It also explains why features like wall mitering and CSG cutouts are not just bullet points. They are hard geometry problems that become practical only if the editor can localize work. The dirty-node pattern is what keeps the browser from feeling like it is fighting the model.

Three Packages, Three Jobs

PackageJobWhat it protectsWhy it matters
@pascal-app/coreState, schemas, geometry systems, spatial logicThe data modelKeeps architectural rules independent from UI and rendering
@pascal-app/viewerReact Three Fiber rendering and camera layerThe visual engineLets 3D rendering stay reusable outside the editor app
apps/editorNext.js editor UI, tools, sidebars, interactionThe product experienceLets the app customize workflows without breaking the core

The separation is not just tidy packaging. It is an architectural boundary. The editor can change tools, panels, or workflows without rewriting the geometry engine, and the viewer can stay isolated from product-specific behavior.

What Pascal Editor Is Replacing

Pascal Editor does not pretend to be a full BIM replacement. It is better understood as a browser-native alternative for conceptual and interactive architectural modeling. That puts it in conversation with tools like Revit and SketchUp, but it is solving a narrower, more web-native problem.

ToolCore modelStrengthLimitationWhat Pascal does differently
RevitDeep BIM document modelIndustry-grade building workflowsHeavy, complex, desktop-firstMoves the modeling experience into the browser with lighter interaction loops
SketchUpConceptual 3D modelingFast form explorationNot built around the same live engine patternUses dirty-node updates and a scene registry for targeted regeneration
Conventional React Three Fiber appNested component and scene logicQuick to prototypeCan become fragile at scaleSplits data, rendering, and systems into distinct packages

That is the niche. Pascal wants to be open, local-first, and fast enough for serious conceptual work without demanding desktop installation or a heavyweight environment. The technical choices follow from that ambition.

Why the Editor Feels Tactile

The repo shows a surprising amount of UX polish for a systems-heavy project. The sound effects, tool feedback, and scene interactions are there to make editing feel physical. That is not decoration. It is part of the product strategy.

A good browser tool cannot feel like a compromised desktop clone. It has to earn trust through responsiveness, clear feedback, and low friction. Pascal Editor seems to understand that the experience of moving a wall is as important as the correctness of the wall geometry itself.

The Open Question

The hard part is not rendering a building in WebGPU. The hard part is how far a browser-native architectural editor can go before it needs BIM-grade interoperability, collaboration, and downstream export workflows. That is where the project becomes most interesting, because it is not trying to solve every problem at once.

Pascal Editor is a strong answer to a specific question: what if architectural modeling in the browser felt alive, incremental, and precise? The repo’s architecture says yes, as long as you are willing to think less like a document editor and more like a simulation engine.