533 Commits

Author SHA1 Message Date
Adrian Perez
07ed429d58 feat(mcp): add headless scene bridge with RAF polyfill
SceneBridge class wraps @pascal-app/core's Zustand store for Node,
exposing a clean programmatic API for scene load/mutate/export plus
Zundo undo/redo. Requires a requestAnimationFrame polyfill loaded
before any core import to work around the store's RAF-batched dirty
marking.

- 51 tests, 99.68% line coverage on scene-bridge.ts
- All-or-nothing applyPatch with Zod dry-run validation
- Safeguards against prototype-polluting keys in loadJSON
- Resolves children through the flat nodes dict (handles the
  SiteNode.children-as-objects inconsistency)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:50:54 +02:00
Adrian Perez
eebbef502d feat(mcp): finalize scaffolding and factory entry
Adds packages/mcp/.gitignore, src/index.ts (public API barrel),
src/server.ts (createPascalMcpServer factory), and a smoke test
for the public API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:50:47 +02:00
Adrian Perez
2ae932f384 feat(mcp): scaffold package and confirm headless bridge viability
- Add packages/mcp/ with package.json, tsconfig, PLAN.md, CROSS_CUTTING.md
- Extend @pascal-app/core exports map with subpaths (./schema, ./store,
  ./material-library, ./spatial-grid, ./wall) so Node consumers can skip
  the graphics-bound systems re-export chain.
- Add scripts/spike.ts that proves useScene + temporal work in Node with
  a requestAnimationFrame polyfill. Spike passes end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:41:09 +02:00
Adrian Perez
097886b246 chore: ignore .worktrees directory
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:25:03 +02:00
Wassim SAMAD
783b2e0c33
Merge pull request #259 from pascalorg/fix/move-tools
Fix/move tools
2026-04-17 17:34:47 -04:00
wass08
3fcb9cfb6b fix stair building rotation 2026-04-17 17:32:25 -04:00
wass08
28bbf14836 fix perfs and broken undo stack by various move tools 2026-04-17 17:26:38 -04:00
Pascal
5c16aa4225
feat: improve thumbnails, placement, and editor responsiveness (#258)
* wip: backport monorepo PRs 278 280 281 283 284

* refactor(editor): align floorplan panel with monorepo split version
2026-04-17 15:14:40 -04:00
Wassim SAMAD
d948f09b2c
Merge pull request #257 from sudhir9297/feat/wall-room-creation
Add auto cutout toggle to stair panel
2026-04-17 13:05:59 -04:00
sudhir
f29946f27b Add auto cutout toggle to stair panel 2026-04-17 22:29:44 +05:30
Wassim SAMAD
e0162606d3
Merge pull request #255 from sudhir9297/feat/wall-room-creation
Feat: wall room creation and snap, stairs system
2026-04-17 12:44:06 -04:00
sudhir
7b6d295cd8 Harden stair reload and spiral post-processing 2026-04-17 13:58:54 +05:30
Sudhir Yadav
608b3fc744
Merge pull request #1 from sudhir9297/feat/stair-ceiling-slab-cutout
Feat/stair ceiling slab cutout
2026-04-17 13:39:10 +05:30
sudhir
4a97581b86 Fix stair placement to use local level height 2026-04-17 13:24:52 +05:30
sudhir
49836360ca Add stair openings to ceilings 2026-04-17 13:19:42 +05:30
sudhir
7ca94ce375 Refine stair slab opening placement 2026-04-17 13:18:04 +05:30
sudhir
b314a8fbf8 Implement stair-driven slab hole cutouts 2026-04-17 13:13:02 +05:30
sudhir
0effda29fe Support duplicating and moving new walls 2026-04-17 11:08:01 +05:30
sudhir
096f4c161a Respect active grid snap for wall dragging and angle 2026-04-17 10:56:34 +05:30
sudhir
4edf45f7c9 Add auto ceilings and simplify ceiling selection affordances 2026-04-16 17:56:54 +05:30
sudhir
cb2ceba566 Add grid snap dropdown to viewer toolbar 2026-04-16 17:05:34 +05:30
sudhir
0e5a4d9fea Improve ceiling selection and move preview visibility 2026-04-16 15:04:52 +05:30
sudhir
5010013701 Reorder toolbar toggles to group wall mode before grid snap 2026-04-16 14:08:32 +05:30
sudhir
162c5806a7 Add cycling grid snap control to the viewer toolbar 2026-04-16 13:34:42 +05:30
sudhir
b1d8180f62 Fix opening remounts after merged wall reparenting 2026-04-16 13:22:33 +05:30
sudhir
ecb97aba8c Merge split wall segments when deleting dividers 2026-04-16 13:03:31 +05:30
sudhir
ae68d69f77 Simplify auto slab polygons for curved wall rooms 2026-04-16 12:39:52 +05:30
sudhir
a7b97caeb0 Add Alt-detach hints to wall endpoint move controls 2026-04-16 12:27:58 +05:30
sudhir
1cd71630bc Add 3D wall endpoint move controls 2026-04-16 11:50:40 +05:30
sudhir
f563dd9763 Keep connected walls joined during endpoint drags 2026-04-16 11:43:24 +05:30
sudhir
dee086545d Fix sharp edges on auto slabs for curved walls 2026-04-16 11:30:43 +05:30
sudhir
5c92d071f7 Fix slab updates for curved wall changes 2026-04-16 11:21:28 +05:30
sudhir
b4bf196d31 Merge branch 'main' of github.com:sudhir9297/editor into feat/wall-room-creation 2026-04-16 09:49:29 +05:30
Huy Hoang
3d1005847b
fix: prevent crash when duplicating elements (#239)
- Guard _buildCache in merged-outline-node against stale/disposed
  Object3D refs that cause TypeError on .id access during render
- Reset children array when duplicating roofs to prevent inconsistent
  parent-child relationships (matching existing stair behavior)
- Use obj?.parent check in EditorOutlinerSync to ensure objects are
  still in the scene graph before adding to outliner arrays
- Resume temporal state on parse failure to prevent undo/redo freeze

Closes #232
2026-04-15 17:25:03 -04:00
Roshan Warrier
e3ba4ab921
fix editor furnish item initialization (#237)
Co-authored-by: txhno <198242577+txhno@users.noreply.github.com>
2026-04-15 17:25:01 -04:00
billy
341725b37a
fix(viewer): await renderer.init() in Canvas gl factory (#233)
The WebGPURenderer needs its backend initialized before any direct
`.render(scene, camera)` call. The commented-out `// renderer.init()`
said "Only use when using <DebugRenderer />", but the non-debug path
also calls direct render from the post-processing fallback
(post-processing.tsx:318), which throws "Renderer: .render() called
before the backend is initialized" on any browser that falls back to
the WebGL2 backend.

Switching the gl factory to an async function and awaiting init()
before returning is safe in both backends (init() is idempotent and
the async factory is a supported @react-three/fiber v9+ pattern), and
prevents the error in WebGL2 fallback.
2026-04-15 17:23:27 -04:00
billy
93d9d68e19
fix(viewer): skip post-processing pipeline when WebGPU is unavailable (#234)
`RenderPipeline`, SSGI, and the denoise TSL node imported from
`three/webgpu` and `three/tsl` are all WebGPU-only. On a browser
without `navigator.gpu`, the WebGPURenderer falls back to WebGL2, and
attempting to build the TSL post-processing pipeline either throws or
produces broken output — the scene renders for a few frames, then
goes black as the 3-attempt retry loop fights the direct-render
fallback path in `useFrame`.

This sets `hasPipelineErrorRef.current = true` at pipeline setup time
when `navigator.gpu` is undefined, so `useFrame` takes the existing
direct `renderer.render(scene, camera)` path exclusively and never
tries to build the broken TSL pipeline.

No behavioural change in WebGPU mode — the guard only fires when the
WebGPU API is literally not exposed by the browser. The rare edge
case of `navigator.gpu` being defined but device creation failing at
runtime still falls through the existing try/catch unchanged.
2026-04-15 17:23:25 -04:00
sudhir
95f4c4e610 Merge branch 'main' of github.com:sudhir9297/editor into feat/wall-room-creation 2026-04-15 22:59:36 +05:30
Sudhir Yadav
b1709de44a
feat: curved wall and fixes (#236)
* feat: add polygon movement support to editor and implement dedicated move tools for walls, slabs, and ceilings

* feat: add uv2 attribute to ceiling and slab geometries for lightmap support

* Fix curved wall miters and align roof position sliders

* Fix wall measurement label and extension anchors

* Fix WebGPU renderer initialization order

* fix(editor): scope wall movement to the selected level

---------

Co-authored-by: Pascal <open@pascal.app>
2026-04-15 12:41:16 -04:00
Sudhir Yadav
57df224948
feat: Add catalog-based material presets across structural nodes (#231)
* Add catalog-based material presets across structural nodes

* Fix material picker fallback and wall visible highlights

* Preserve wall materials in selection highlights
2026-04-15 12:16:35 -04:00
sudhir
d1bef22701 Handle wall split attachment migration and child ids 2026-04-15 14:49:58 +05:30
sudhir
6190ba4bdc feat: implement automatic wall-splitting and slab generation from closed wall loops 2026-04-15 14:18:09 +05:30
sudhir
3ac26bf635 Fix WebGPU renderer initialization order 2026-04-15 10:49:51 +05:30
Pascal
f25806ee8f release: v0.5.1 2026-04-14 05:01:30 +00:00
Pascal
cf7493985f
fix: guard null selected item during item tool placement (#229) 2026-04-14 00:48:59 -04:00
Pascal
3afa1cea8b
fix: recover post-processing after duplicate scene mutations (#228) 2026-04-13 23:49:45 -04:00
Sudhir Yadav
a205e4f778
Feat/stairs fence update (#226)
* feat: railing on the straight stairs and new fence

* feat: added spiral and curved stairs with bug fix for fence

* feat:fence are linked to each other ... so moving one move the other sharing the same coordinate

* fix: update stair railing logic to include front-side attachments for terminal landings

* Integrate fence rendering into the fence system

* fix: pass nodeId instead of undefined node to WallTreeNode and FenceTreeNode

TreeNode was passing `node` (undefined variable) instead of `nodeId` to
WallTreeNode and FenceTreeNode, causing a runtime ReferenceError.
Updated FenceTreeNode to accept nodeId and look up the node from the
scene store internally, consistent with all other tree node components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: update fence icon with new isometric design

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Aymeric Rabot <aymeric@pascal.app>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 23:31:57 -04:00
Pascal
682e2a1a12
sync: backport monorepo PRs #240 #251 #253 (#225) 2026-04-13 11:24:13 -04:00
Pascal
b25be8227a
feat(editor): add cut-out button to floating action menu for slabs and ceilings (#224)
When selecting a floor slab or ceiling node, the floating UI buttons now
include a cut-out icon (carbon:cut-out) that directly creates a hole and
enters edit mode. Much more intuitive than navigating to the side panel.

Changes:
- NodeActionMenu: add onAddHole prop with carbon:cut-out icon
- FloatingActionMenu: wire up handleAddHole for slab/ceiling types
- Add ceiling to ALLOWED_TYPES so the floating menu appears for ceilings too
- Separate HOLE_TYPES from DELETE_ONLY_TYPES for cleaner type gating
2026-04-13 11:12:24 -04:00
github-actions[bot]
384eab819c release: @pascal-app/core@0.5.0 @pascal-app/viewer@0.5.0 2026-04-09 19:07:59 +00:00