Commit Graph
555 Commits
Author SHA1 Message Date
Developer 12b6292623 feat: add material system for all node types
- Add MaterialSchema with 10 presets (white, brick, concrete, wood, glass, metal, plaster, tile, marble, custom)
- Add material field to Wall, Slab, Door, Window, Ceiling, Roof, RoofSegment nodes
- Create MaterialPicker UI component with preset selection and custom properties
- Update all renderers to support material rendering with caching
- Add Material section to all node panels (WallPanel, SlabPanel, DoorPanel, WindowPanel, CeilingPanel, RoofPanel, RoofSegmentPanel)
- Update AGENTS.md with Material System documentation
2026-03-30 12:15:16 +08:00
Pascal 99bb5f3645 Merge pull request #178 from korvixhq/feat/duplicate-project
feat: duplicate project - cloneSceneGraph utility
2026-03-28 22:45:54 +00:00
Pascal 3474ee226d fix: use structuredClone to avoid shared references in cloneSceneGraph
The original implementation used spread ({ ...node }) which only shallow-copies.
Nested objects (asset, polygon, position tuples, metadata) would share references
between the original and cloned scene, meaning mutations to the clone could
corrupt the original.

Also removed resolveChildRefId helper — children arrays in the schema are always
string IDs, so the object-with-id handling was dead code.
2026-03-28 22:45:33 +00:00
Pascal 58676e5720 Merge remote-tracking branch 'origin/main' into feat/duplicate-project 2026-03-28 22:43:18 +00:00
Huy HoangandGitHub c05ae9d38e fix: allow deleting walls and slabs via floating action menu (#180)
* fix: allow deleting walls and slabs via floating action menu

Walls and slabs were excluded from ALLOWED_TYPES in FloatingActionMenu,
so no delete UI appeared when selecting them. Added wall/slab to the
allowed types and show only the delete button (no move/duplicate) since
they are structural elements.

Usage: switch to select mode (V), click a wall or slab, then use the
floating trash icon or press Delete/Backspace to remove it.

Closes #156

* fix: offset delete button higher on walls/slabs to avoid covering measurement labels

* feat: implement sledgehammer-style delete mode

Clicking the trash icon in the floating action menu now activates a
persistent delete mode (like The Sims sledgehammer tool) instead of
deleting immediately. Users can then click objects on the canvas to
delete them one by one. Press V or Escape to exit delete mode.

- Wire delete mode clicks/hover in SelectionManager
- Add D keyboard shortcut to activate delete mode
- Change floating menu delete button to activate delete mode
- Add crosshair cursor when delete mode is active
2026-03-28 18:27:44 -04:00
PascalandGitHub b024aaf91a Merge pull request #189 from korvixhq/chore/image-props
Add sizes and loading props to catalog item images
2026-03-28 18:27:07 -04:00
PascalandGitHub 479552394b Merge pull request #184 from nnhhoang/fix/counter-clockwise-rotation
fix: implement T key for counter-clockwise rotation on selected nodes
2026-03-28 18:26:28 -04:00
PascalandGitHub daf62ce6d2 feat: implement editable wall length slider (#195)
feat: implement editable wall length slider #191
2026-03-28 18:24:14 -04:00
Thiago LöpesandGitHub 16835c6f46 feat: implement editable wall length slider #191
Key Additions & Changes:

Interactive Length Control: Replaced the static "Length" text with an editable SliderControl component.

Vector Math Implementation: Added handleUpdateLength, a function that recalculates the wall's end position ($P_{end}$) based on the user's input while preserving the wall's original direction.

Real-time Geometry Updates: Integrated the change with useScene and dirtyNodes to ensure the 3D mesh updates instantly in the viewer as the slider moves.

UX Consistency: Used the existing SliderControl and PanelSection patterns to match the Pascal Editor's design system.

Fixes #191
2026-03-28 17:12:35 -03:00
BravadoBoss b47e8446bd Add sizes and loading props to catalog item images 2026-03-26 21:38:17 -04:00
github-actions[bot] f2a22bbc2b release: @pascal-app/core@0.3.1 @pascal-app/viewer@0.3.1 2026-03-26 19:52:23 +00:00
PascalandGitHub 9f62bd108f fix: slider rewrite, ESC key fix, antialias improvements (#187)
Slider control:
- Rewrite drag interaction to use label-based drag instead of track slider
- Remove hardcoded min/max bounds, default to unbounded
- Add ArrowLeft/ArrowRight key support alongside Up/Down
- Cleaner, more compact UI (238 lines vs 332)

ESC key cancel fix:
- Pressing ESC during mid-action (drawing wall, placing slab) now only
  cancels the current action, not also switching back to select mode
- Tools mark cancel as consumed via markToolCancelConsumed()
- Second ESC press switches to select mode as before

Window panel:
- Remove hardcoded min/max on position, dimension, and frame sliders
- Works with new unbounded slider defaults

Viewer:
- Re-enable default antialias on WebGPU renderer
- Remove GroundOccluder (no longer needed)
- Add resize debounce (100ms)
- Clean up post-processing pipeline code
2026-03-26 15:51:37 -04:00
PascalandGitHub d287428599 fix: README badge colors (#186)
- Remove hardcoded red from npm badges (use shields.io defaults)
- Switch Discord badge to static 'Join Server' (avoids widget dependency)
2026-03-26 15:39:40 -04:00
nnhhoang 5801ce0270 fix: implement T key for counter-clockwise rotation on selected nodes
The keyboard shortcuts dialog documents T as counter-clockwise rotation,
and it works during placement/move mode, but was missing for already
selected nodes. R (clockwise) worked in all contexts but T did not.
2026-03-26 15:24:54 +07:00
PascalandGitHub 81dff06d2a docs: add badges and contributors to README (#181)
- Add license, npm (core + viewer), and Discord badges at the top
- Add contributors section (Aymeric, Wassim) at the bottom
- Add Trendshift #1 trending badge at the bottom
2026-03-26 01:19:36 -04:00
a5378da020 feat: add STL and OBJ export formats (#175)
Extend the export manager to support STL and OBJ formats in addition to
the existing GLB export. Uses Three.js built-in STLExporter and
OBJExporter - no new dependencies.

STL is the standard format for 3D printing. OBJ is widely used in
rendering pipelines and supports basic materials. Both are requested
in the community discussion on #145.

Changes:
- export-manager.tsx: add STLExporter and OBJExporter, accept format param
- settings-panel: three format-specific export buttons (GLB, STL, OBJ)
- use-viewer store: update exportScene type to accept optional format

The format parameter defaults to 'glb', so existing callers (command
palette) continue to work without changes.

Relates to #145

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 00:30:34 -04:00
7d4c8b6bd4 fix: resolve state management issues and memory leaks (#152)
This commit fixes several issues in the core state management:

1. Fix deleteNodesAction recursive call issue
   - Previously, the function recursively called get().deleteNodes()
     inside the set() callback, which could cause state inconsistencies.
   - Now collects all descendant IDs first in a separate pass, then
     deletes them all in a single batch operation.

2. Fix memory leak in use-scene temporal tracking
   - Module-level variables (prevPastLength, prevFutureLength,
     prevNodesSnapshot) persisted across store re-creations.
   - Now cleared in unloadScene() to release stale node references.
   - Added clearTemporalTracking() helper function.

3. Remove unused variable in wall-system
   - Removed debug variable 'useFrameNb' that was declared but never used.

4. Fix requestAnimationFrame in updateNodesAction
   - Previously used RAF without cleanup, causing multiple queued
     callbacks when updates happened rapidly.
   - Now uses a single tracked RAF with cancellation support.

Co-authored-by: hobostay <hobostay@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 00:30:16 -04:00
Thiago LöpesandGitHub e4e64e22e3 fix: use WALL_MIN_LENGTH constant to prevent ghost walls (#168)
* Increase minimum wall length from 0.01 to 0.5

* fix: use WALL_MIN_LENGTH constant in wall-tool.tsx
2026-03-26 00:30:04 -04:00
04e9feb78e fix: remove unused @ts-expect-error directive (#150)
TypeScript now correctly types process.env, making the suppression
directive invalid and causing tsc --build to fail.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 00:29:57 -04:00
John Doe 9a0950dd90 style: reorder imports 2026-03-26 00:24:45 -04:00
PascalandGitHub 49c045e861 chore: add community templates, simplify setup, fix lockfile (#177) 2026-03-25 21:20:25 -07:00
John Doeandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> b47d4a6a15 revert: remove test clone scene button from settings panel
Reverts changes from commit a87fe56d53
to remove the Test Clone Scene functionality from the settings panel.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-03-25 23:57:40 -04:00
John Doe 8731da9afa fix: childern <> parent link 2026-03-25 23:43:25 -04:00
John Doeandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> a87fe56d53 fix: clear collections in setScene and apply cloned collections in test button
- setScene now clears collections to avoid stale references
- Test clone button applies cloned collections after setScene

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-03-25 22:33:07 -04:00
John Doe de9eb6fa78 feat: add scene graph cloning utility 2026-03-25 22:05:07 -04:00
yashinode 6d964e5e9f feat: add street view mode with FPS-style walkthrough
Adds a first-person walkthrough mode so you can explore your home
from the inside at eye level. WASD to move, mouse to look around,
Q/E to float up/down. Press ESC to exit.
2026-03-25 15:23:44 +00:00
Aymeric RabotandClaude Opus 4.6 e2cde339ae fix: add @types/node to viewer devDependencies for process.env typing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:29:12 -07:00
Aymeric RabotandClaude Opus 4.6 6bbb1db334 chore: update lockfile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:14:26 -07:00
Thiago LöpesandGitHub 7a16fad7a0 fix: use WALL_MIN_LENGTH constant in wall-tool.tsx 2026-03-24 18:18:07 -03:00
Thiago LöpesandGitHub eceefc09ad Increase minimum wall length from 0.01 to 0.5 2026-03-24 18:15:04 -03:00
f06f2fa1b1 feat: 2D editing — floorplan panel, measurements, command palette (v0.3.0)
* sync: port 2D editing features from monorepo (v0.3.0)

## New Features

### Floorplan Panel (7.5K LOC)
- Full 2D editing interface with wall drawing, measurement, and unit display
- Interactive floorplan view with pan/zoom, grid snapping
- Wall thickness visualization, door/window placement
- Zone and slab polygon editing
- Guide image overlay support
- Metric/imperial unit toggle

### Command Palette Overhaul
- Complete rewrite with new command registry system
- Keyboard shortcuts UI with ShortcutToken component
- Editor-specific commands (floorplan, measurements, camera focus)
- Improved search and action organization

### Wall Measurements
- Real-time wall length labels in 3D view
- Metric/imperial conversion
- Wall measurement UI component

### Enhanced Tools
- Wall drafting utilities (grid snapping, validation)
- Node action menu for quick operations
- Improved polygon editing for zones/slabs/sites
- Roof segment panel for granular roof control

## Package Changes

### @pascal-app/core@0.3.0
- New wall-footprint.ts: 2D wall footprint calculation
- Wall mitering exports for floorplan view
- camera-controls:focus event
- Space detection undo pause/resume
- Mark sibling nodes dirty on deletion (miter recalc)

### @pascal-app/viewer@0.3.0
- ErrorBoundary component for robust item rendering
- Broken item fallback UI
- Wall renderer: mark dirty on mount
- Ground occluder: only lowest level punches through
- Unit state (metric/imperial) in viewer store

### @pascal-app/editor@0.1.0
- 48 file changes (16 new, 32 modified)
- New stores: useCommandRegistry, usePaletteViewRegistry
- Tree node drag-and-drop system
- Level selection utilities
- Enhanced scene graph operations

## Apps/Editor
- GeistPixelSquare font for pixel-perfect UI
- Blueprint icon asset
- Updated layout and globals for font support

## Security
- Zero AI imports or internal package refs
- All monorepo-specific code excluded
- Clean audit: no API keys or secrets

## Testing
- Security audit passed 
- All AI/internal code excluded 
- Version bumps applied 

79 files modified, 16 files added
~2600 insertions, ~1400 deletions

* fix: lint cleanup — suppress intentional dep warnings, fix missing dep, remove stale ignores

- Add biome-ignore for 3 intentional useEffect reset patterns (levelId, selectedGuide, selectedId)
- Fix actual missing dependency: currentBuildingId in handleSiteEditShortcutSelect callback
- Remove 3 stale biome-ignore comments in r3f.d.ts (rule not active)

Build and lint pass clean.

* fix: type errors — polygon area guards, selection cast, readonly keywords, door guard

- ceiling-panel, slab-panel, ceiling-tree-node, slab-tree-node, zone-tree-node:
  guard polygon[i]/polygon[j] array access before arithmetic (TS2532)
- scene.ts: introduce toViewerSelection() helper to cast persisted string IDs
  to branded template literal types expected by useViewer.setSelection (TS2345)
- door-panel: guard early return when node is undefined in setSegmentHeightRatio (TS18048)
- editor-commands: remove 'as const' from inline command object, keywords is mutable string[] (TS2322)

All type checks pass. Build and lint clean.

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-03-24 19:48:11 +00:00
github-actions[bot] 3791614a9d release: @pascal-app/core@0.2.0 @pascal-app/viewer@0.2.0 2026-03-21 03:21:20 +00:00
Aymeric RabotandClaude Opus 4.6 10449c5cc5 fix: replace npm version with jq to avoid peer dep conflicts in CI
npm version triggers npm install which fails on peer dependency
resolution in workspace monorepos. Use jq for version bumping instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:20:37 -04:00
1d28e4208f sync: update core and viewer from monorepo (#143)
Major changes:
- Roof system rewrite with roof-segment support
- Scene store refactor
- Spatial grid improvements
- Item light system
- Post-processing and selection manager updates
- Perf monitor component

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:18:30 -04:00
Aymeric RabotandGitHub bafc5973a3 Update README with user attachments link
Added a link to user attachments in the README.
2026-03-16 12:35:55 -04:00
Wassim SAMADandGitHub 4824bcd031 Merge pull request #142 from pascalorg/chore/carving-out-community
Chore/carving out community
2026-03-13 09:08:25 +01:00
wass08 f2501be2bf remove community 2026-03-13 09:07:46 +01:00
wass08 3eeba322a8 rename before moving to monorepo 2026-03-11 15:12:41 +01:00
wass08 5bd9c21dbc split community from editor 2026-03-11 13:29:25 +01:00
wass08 3df8a006f2 clean impl 2026-03-11 13:08:33 +01:00
wass08 a97ed42578 presets community / non community 2026-03-11 13:02:17 +01:00
wass08 7359c1fcbf splitting editor and community 2026-03-11 12:16:26 +01:00
Wassim SAMADandGitHub 5108636d49 Merge pull request #140 from pascalorg/feat/zone-fix-layer
Feat/zone fix layer
2026-03-11 07:49:43 +01:00
wass08 8d02e5191b rule for layers 2026-03-11 07:47:10 +01:00
wass08 32406e5a20 enhance hover zone 2026-03-11 07:47:10 +01:00
wass08 6719f34a89 clean zone handling code 2026-03-11 07:47:10 +01:00
wass08 918ec46a93 bring back ground occluder 2026-03-11 07:47:10 +01:00
wass08 30b9e3ccb2 move zones to separate layers todo: fix hardcoded 2 and zone floor 2026-03-11 07:47:10 +01:00
Aymeric Rabot bc59752edb Bump devDependencies and update lockfile
Bump devDependencies in package.json: @biomejs/biome ^2.4.4→^2.4.6, turbo ^2.8.12→^2.8.15, ultracite ^7.2.4→^7.2.5. Regenerate bun.lock to reflect these updates and related transitive changes (e.g. @clack, glob, path-scurry/minipass, minimatch).
2026-03-10 15:02:55 -04:00
Wassim SAMADandGitHub 208e56d46a Merge pull request #139 from pascalorg/feat/project-switch-and-spotlight
Feat/project switch and spotlight
2026-03-10 18:26:22 +01:00