GitHub - pascalorg/editor: Create and share 3D architectural projects.
6 hours ago
- #3D Editor
- #React Three Fiber
- #WebGPU
- 3D building editor built with React Three Fiber and WebGPU.
- Turborepo monorepo containing three packages: core, viewer, and editor.
- Core package handles node schemas, state management, systems, and spatial queries.
- Viewer package manages 3D rendering using React Three Fiber with default settings and post-processing.
- Editor package extends viewer with UI components, tools, and editing capabilities.
- State management uses Zustand stores: useScene, useViewer, and useEditor.
- Nodes are stored in a flat dictionary with parent-child relationships defined via IDs.
- Scene state is persisted to IndexedDB with undo/redo via Zundo middleware.
- Registry maps node IDs to Three.js objects for fast lookup and system access.
- Renderers create 3D objects for each node type and register them in the scene registry.
- Systems update geometry and transforms in the render loop based on dirty nodes.
- Events are handled using a typed emitter for inter-component communication.
- Spatial grid manager provides collision detection and placement validation.
- Tools in the editor include SelectTool, WallTool, ZoneTool, ItemTool, and SlabTool.
- Technology stack includes React 19, Next.js 16, Three.js, Zustand, Zod, and Bun.
- Development is run using 'bun dev' from the root directory for hot reloading.