324 Commits

Author SHA1 Message Date
sudhir
dfdeca4aae Refine roof edit selection behavior and panel actions 2026-04-20 13:08:45 +05:30
sudhir
bbc351d3a4 Add roof material targets and UV mapping 2026-04-20 12:57:06 +05:30
sudhir
05002a7865 Allow stair side clicks to target side materials 2026-04-20 12:04:43 +05:30
sudhir
4f9b822e54 Add click-targeted stair materials and UV mapping 2026-04-20 12:01:23 +05:30
sudhir
df9c4e499f Restrict ground occluder to recessed slabs 2026-04-20 11:25:36 +05:30
sudhir
71ddb7052b Add two-sided wall material targeting 2026-04-20 11:18:20 +05:30
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
sudhir
f29946f27b Add auto cutout toggle to stair panel 2026-04-17 22:29:44 +05:30
sudhir
7b6d295cd8 Harden stair reload and spiral post-processing 2026-04-17 13:58:54 +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
Pascal
00b8f42899
feat: move/rotate building + relative positioning for all tools (#220)
Sync monorepo PRs #243 and #248 to the open-source editor.

Move/Rotate Building:
- New move-building-tool with grid snapping, R/T rotation, and Esc cancel
- Floating building action menu with move button
- Building helper with keyboard shortcut hints
- BuildingRenderer now applies position and rotation from node data

Building-Relative Coordinate System:
- GridEvent gains localPosition (building-local coords)
- use-grid-events computes building-local intersection from building mesh
- ToolManager wraps building-relative tools in a building-local <group>
- All tools (wall, slab, ceiling, stair, roof, zone, polygon-editor,
  placement coordinator) updated to use event.localPosition
- Placement coordinator adds worldToBuildingLocal helper for cursor
  position conversion

2D Floorplan Fix:
- SVG layers wrapped in <g transform=rotate(...)> for building rotation
- Pointer-to-plan conversion un-rotates when building is rotated
- Grid events from 2D include localPosition

Store Changes:
- useEditor movingNode union includes BuildingNode
- NodeActionMenu onDelete is now optional (buildings can move but not delete)
2026-04-09 14:36:34 -04:00
Pascal
6c3ac3e030 fix(editor): auto-switch to structure phase when interacting with nodes in floorplan
Two fixes for stair selection in 2D floorplan not working:

1. floorplan-panel: remove level > 0 restriction on auto-switch to structure
   phase. When viewing ANY level in the floorplan while in site phase, auto-enter
   structure mode so structural nodes (stairs, walls, slabs) become selectable.

2. selection-manager: expand auto-switch to also cover site phase. Clicking a
   structural or furnish element now auto-switches from site → structure/furnish,
   just like it already did between structure ↔ furnish ↔ zones.

This fixes the issue where stairs couldn't be selected in 2D and the floating
action menu (move/duplicate/delete) wouldn't appear.
2026-04-08 01:18:37 +00:00