Install packages
1
Install Pascal Editor packages
Install both
@pascal-app/core and @pascal-app/viewer:2
Install peer dependencies
Pascal Editor requires React, Three.js, and React Three Fiber:
Pascal Editor works with React 18 or 19. Three.js version 0.183+ is required for WebGPU support.
3
Verify installation
Create a test file to verify the installation:Run the test:You should see output confirming the installation and a generated wall ID like
test.ts
wall_abc123.Package overview
@pascal-app/core
The core package provides:- Node schemas - Zod-validated types for all building elements (Wall, Slab, Level, etc.)
- State management -
useSceneZustand store with IndexedDB persistence and undo/redo - Geometry systems -
WallSystem,SlabSystem,ItemSystem, etc. - Scene registry - Fast ID-to-Object3D lookup via
useRegistryhook - Event bus - Typed event emitter for inter-component communication
- Spatial queries - Collision detection and placement validation
@pascal-app/viewer
The viewer package provides:- Viewer component - Canvas with WebGPU renderer, lights, camera, and post-processing
- Node renderers - React components that create Three.js objects for each node type
- Viewer systems -
LevelSystemfor level visibility,ScanSystem,GuideSystem - Selection manager - Default click/hover handling with hierarchical navigation
- Viewer state -
useViewerZustand store for camera mode, theme, level display mode
TypeScript configuration
Pascal Editor is written in TypeScript and includes complete type definitions. No additional setup is required.
tsconfig.json includes:
tsconfig.json
Framework integration
Next.js
Pascal Editor works with Next.js 13+ App Router. Mark client components with'use client':
app/editor/page.tsx
Vite
No special configuration required. Just import and use:src/App.tsx
Create React App
Pascal Editor works with CRA out of the box:src/App.tsx
Browser support
Pascal Editor uses WebGPU for rendering, which is supported in:- Chrome/Edge 113+
- Safari 17.4+ (macOS 14.4+)
- Firefox 127+ (behind flag)
For browsers without WebGPU support, consider using the WebGL fallback renderer (not included in current version).
Next steps
Quickstart
Build your first 3D scene
Core concepts
Learn the fundamentals