Commit Graph
196 Commits
Author SHA1 Message Date
sudhir f5f80d0f3f Centralize door animation state and operation mapping 2026-05-05 17:23:48 +05:30
sudhir 6df4b4895c Add garage door types and animated door controls 2026-05-05 14:20:41 +05:30
sudhir 1490d280d4 Refine editor layer boundaries and selection handling 2026-05-05 13:26:39 +05:30
Pascal 1002a0a980 feat(editor): precise item dimensions — static bounding boxes, placement-math, remove item-mesh-metadata system
- Replace runtime mesh-based bounding-box computation with static dimension-based polygons for item footprints
- Add snapUpToGridStep() and getGridAlignedDimensions() to placement-math for grid-cell-aligned placement wireframes
- Add expandBoundsToGrid() to use-placement-coordinator for consistent wireframe snapping
- Add currentCursorRotationY to PlacementContext; preserve world orientation across item-surface transitions
- Fix item detach from surface: use worldToBuildingLocal() instead of event.localPosition to avoid coordinate-space jump
- Subscribe to useLiveTransforms in FloorplanPanel during placement so R/T keyboard rotation refreshes the 2D overlay immediately
- Fix FloorplanItemImage rotation (+180° to account for top-down camera capture orientation)
- Simplify spatial-grid-manager: single dimension-based getItemLocalBounds(), removes runtime mesh-metadata path
- Remove item-mesh-metadata system (compute-item-mesh-metadata, item-mesh-metadata-system, sync-request)
2026-05-04 19:35:41 +00:00
sudhir 23eec44714 Move render systems out of core 2026-05-01 15:07:47 +05:30
sudhir 09bfb0b484 Add frameless door openings and first-person collider support 2026-05-01 11:35:26 +05:30
sudhir 3df3d12f46 Refactor guide UI state and slab rendering 2026-05-01 00:33:57 +05:30
sudhir 1dc9ea0ba8 Replace spawn marker with box-based figure 2026-04-30 23:34:14 +05:30
sudhir f375861439 Merge branch 'main' of github.com:sudhir9297/editor into feat/improvement-and-fixes 2026-04-30 22:59:10 +05:30
sudhir 8631622e60 Refactor editor workflow and update UI state handling 2026-04-30 13:37:52 +05:30
sudhir a05573b602 Make spawn renderer editor-agnostic 2026-04-29 13:25:20 +05:30
Sudhir YadavandGitHub 9ff657419c Merge branch 'main' into feat/upgrade-and-bug-fix 2026-04-29 10:49:11 +05:30
2b588cd30f fix: WebGPU renderer race on Canvas remount & duplicate item scale loss (#284)
Backport from monorepo PR #310 (fix/april-pass):

1. WebGPU renderer race on Canvas remount
   Cache the in-flight WebGPURenderer promise per canvas element so
   concurrent configure() calls from R3F's useLayoutEffect await the
   same init() instead of creating duplicate renderers. Fixes
   intermittent 'resolve target size does not match' errors when
   navigating between projects and home.

2. Duplicate item loses its scale
   Add scale to the field set in useDraftNode.commit() so duplicated
   items preserve their original scale instead of falling back to
   [1,1,1].

Co-authored-by: Pascal <open@pascal.app>
2026-04-28 12:42:08 -04:00
aa43bb6a43 feat: backport monorepo PRs #297, #302, #306 — floorplan thumbnails + mobile editor UI
Port floorplan item thumbnails, full mobile editor UI, and
mobile polish from the private monorepo into the public editor.

Monorepo PR #297 (feat/item-admin-advanced):
- Add optional floorPlanUrl to item asset schema (core)
- Render 2D floor-plan images inside item footprints on floorplan
- Improve slider drag with modifier key re-anchoring

Monorepo PR #302 (feat/mobile-ui):
- Mobile editor layout with draggable bottom sheet
- Mobile tab bar, selection bar, and panel sheet
- Mobile-aware panel manager and panel wrapper
- useIsMobile rewrite (useSyncExternalStore, SSR-safe)
- Camera actions hideOrbit prop
- GridSnapControl and SecondaryToggles exports
- Action menu hides on mobile contextual tabs
- SidebarTab extended with mobileDefaultSnap/mobileIcon

Monorepo PR #306 (feat/mobile-ui-polish):
- Touch gesture mapping for camera controls (one/two/three finger)
- Snap ratio constants for bottom sheet
- Thumbnail generator WebGL2 fallback (bottom-up row flip)
- ErrorBoundary scope logging, viewer scene wrap
- GPUDeviceWatcher enhanced logging and uncaptured error handler
- WebGPURenderer init error handling and diagnostics
- Post-processing log improvements
- MergedOutlineNode WebGL2 FBO corruption fix

Excluded: apps/community/*, apps/editor/*, packages/community-*,
.cursor/*, .env.example (monorepo-only files)

Co-authored-by: Pascal <open@pascal.app>
2026-04-28 06:36:08 -07:00
wass08 758f06454c Rename mesh metadata polygon key to drop floorplan prefix 2026-04-28 07:31:52 -04:00
sudhir bead8796d2 Add spawn node support and refine stair and door cutouts 2026-04-28 14:26:24 +05:30
sudhir a64d6b86cc Fix floorplan preview update loop 2026-04-28 09:52:10 +05:30
Sudhir YadavandGitHub bc93f09304 Merge branch 'main' into feat/2d-editor 2026-04-27 18:07:28 +05:30
sudhir 3ae8d6d0fa Extract floorplan placement and hit-testing helpers 2026-04-27 12:18:27 +05:30
sudhir e4f42e0ee5 Use bbox anchors for item dimension measurements 2026-04-27 10:49:20 +05:30
sudhir 59779c5bf2 Use mesh bounds for item placement and floorplan 2026-04-27 09:57:05 +05:30
sudhir cb268509ea Invalidate viewer on hover style updates 2026-04-25 00:06:31 +05:30
sudhir 2b656bcf8b Remove editor hover styles from viewer defaults 2026-04-24 23:05:14 +05:30
sudhir 325f2e4603 Refactor viewer hover styles and remove preview state 2026-04-24 22:49:04 +05:30
Sudhir YadavandGitHub 8fde99e7c9 Merge branch 'main' into feat/color-picker-tool 2026-04-22 17:57:26 +05:30
sudhir 87dfdf1b38 Add paint hover previews to viewer 2026-04-22 10:52:35 +05:30
Pascal 4b5c3beadc release: v0.6.0
Bump @pascal-app/core, @pascal-app/viewer, and @pascal-app/editor to 0.6.0.
Update cross-package peer/dev dependency versions.
2026-04-21 20:52:02 +00:00
sudhir 5d75e29bc5 Add material paint mode with scrollable palette 2026-04-21 15:00:09 +05:30
sudhir 8cf2df1483 Unify material target selection across wall stair and roof 2026-04-20 22:45:56 +05:30
sudhir dd5b6e5e83 Fix slab material reload and wall curve step 2026-04-20 14:13:47 +05:30
sudhir bbc351d3a4 Add roof material targets and UV mapping 2026-04-20 12:57:06 +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
PascalandGitHub 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 7b6d295cd8 Harden stair reload and spiral post-processing 2026-04-17 13:58:54 +05:30
sudhir b1d8180f62 Fix opening remounts after merged wall reparenting 2026-04-16 13:22:33 +05:30
Huy HoangandGitHub 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
billyandGitHub 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
billyandGitHub 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
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 YadavandGitHub 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
Pascal f25806ee8f release: v0.5.1 2026-04-14 05:01:30 +00:00
PascalandGitHub 3afa1cea8b fix: recover post-processing after duplicate scene mutations (#228) 2026-04-13 23:49:45 -04:00
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
PascalandGitHub 682e2a1a12 sync: backport monorepo PRs #240 #251 #253 (#225) 2026-04-13 11:24:13 -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
PascalandGitHub 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 11104bc512 chore: bump version to 0.4.0 2026-04-07 23:22:46 +00:00
PascalandGitHub 0a46a9deb4 sync: comprehensive monorepo → editor parity (2D/3D decoupling, UX polish, crash fixes)
Squash merge of 3 commits:
1. useLiveTransforms store for 2D/3D decoupling + floorplan overhaul + Sentry crash fixes
2. Comprehensive 59-file sync bringing editor to full monorepo parity (selection highlights, delete tool, furnish/zone modes, keyboard shortcuts, all panels)
3. Missing files fix (materials.ts, merged-outline-node.ts, type fix)

75 files changed, ~6K additions.
2026-04-07 19:21:10 -04:00