98 Commits

Author SHA1 Message Date
sudhir
411ae2e905 Refine 2D door swing rendering 2026-04-29 17:51:58 +05:30
Aymeric Rabot
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
wass08
a017c112e7 items catalog + floorplan image update 2026-04-28 10:14:36 -04:00
Aymeric Rabot
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
Wassim SAMAD
010c874963
Merge pull request #277 from sudhir9297/feat/2d-editor
Feat/2d editor
2026-04-28 07:36:05 -04:00
sudhir
a64d6b86cc Fix floorplan preview update loop 2026-04-28 09:52:10 +05:30
Aymeric Rabot
0711cad660 Merge remote-tracking branch 'origin/main' into feat/mcp-server 2026-04-27 17:22:14 -04:00
Sudhir Yadav
bc93f09304
Merge branch 'main' into feat/2d-editor 2026-04-27 18:07:28 +05:30
sudhir
d00ba42b9f Enable drag after duplicating roofs and stairs 2026-04-27 13:32:31 +05:30
sudhir
3ae8d6d0fa Extract floorplan placement and hit-testing helpers 2026-04-27 12:18:27 +05:30
sudhir
a796c0fd0a Move item dimensions into local item overlays 2026-04-27 10:57:50 +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
45f0867a74 Extract floorplan render logic into editor 2D modules 2026-04-26 23:02:03 +05:30
sudhir
275a42cc7f Simplify paint material compatibility logic 2026-04-25 00:15:29 +05:30
sudhir
d36441fa47 Add hover highlights to paint interactions 2026-04-24 23:29:34 +05:30
sudhir
325f2e4603 Refactor viewer hover styles and remove preview state 2026-04-24 22:49:04 +05:30
sudhir
7297c76204 Use paint icon for material mode 2026-04-24 12:50:05 +05:30
sudhir
83e1c9d1fd Align floorplan drawing with local build coordinates 2026-04-24 12:39:36 +05:30
sudhir
a5448a0053 Make material categories horizontally scrollable 2026-04-24 10:43:38 +05:30
sudhir
2876f39876 Refactor paint materials to use category-based compatibility 2026-04-23 12:48:50 +05:30
sudhir
88b2f095f1 Merge branch 'feat/color-picker-tool' of github.com:sudhir9297/editor into feat/color-picker-tool 2026-04-23 10:26:54 +05:30
sudhir
4483957a0d Remove material pickers from side panels 2026-04-23 10:21:33 +05:30
sudhir
fb3de8debc Refactor material paint preview handling 2026-04-22 18:16:20 +05:30
Sudhir Yadav
8fde99e7c9
Merge branch 'main' into feat/color-picker-tool 2026-04-22 17:57:26 +05:30
sudhir
1492e5bd0c Add roof drag controls to the 2D floorplan 2026-04-22 17:24:58 +05:30
sudhir
a69591670d Refactor floorplan wall visuals and shared plan helpers 2026-04-22 15:34:22 +05:30
sudhir
87dfdf1b38 Add paint hover previews to viewer 2026-04-22 10:52:35 +05:30
sudhir
65399731f7 Enable material paint for fence slab and ceiling nodes 2026-04-21 15:19:46 +05:30
sudhir
b925cf1e7a Show paint cursor on incompatible clicks 2026-04-21 15:11:46 +05:30
sudhir
5d75e29bc5 Add material paint mode with scrollable palette 2026-04-21 15:00:09 +05:30
sudhir
ec393b0c91 Use live snap settings in polygon editor and slab actions 2026-04-21 11:46:57 +05:30
sudhir
53720d664f Align roof and slab dragging to snap targets 2026-04-21 11:41:31 +05:30
sudhir
8ae217502c Add curved fence support 2026-04-21 11:26:49 +05:30
sudhir
5b5b80be61 Support fence endpoint moves and drafting snap 2026-04-21 11:18:54 +05:30
sudhir
ffa78f1344 Fix realtime undo updates for wall and fence moves 2026-04-21 11:12:04 +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
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
71ddb7052b Add two-sided wall material targeting 2026-04-20 11:18:20 +05:30
Adrian Perez
e8d0b13ff5 feat(mcp,editor): Option A+B storage + 10 agent deliverables (Phase 7)
Ships the combined filesystem/Supabase storage adapter + MCP scene
lifecycle tools + Next.js API routes + editor /scene/[id] route, so
an MCP save is directly openable at /scene/<id> without any
injection hack. End-to-end verified: 10/10 e2e steps pass.

Storage (A1/A2/A3):
- SceneStore interface + error classes + slug helpers
- FilesystemSceneStore at $PASCAL_DATA_DIR (defaults XDG/~/.pascal)
  with atomic writes, .index sidecar, optimistic locking
- SupabaseSceneStore with scenes + scene_revisions tables, RLS
  migration SQL, mock-backed unit tests
- createSceneStore(env) auto-selects based on SUPABASE_URL +
  SUPABASE_SERVICE_ROLE_KEY

MCP tools (A4, A8, A9, A10):
- save_scene / load_scene / list_scenes / delete_scene / rename_scene
- list_templates / create_from_template (3 seed templates:
  empty-studio, two-bedroom, garden-house)
- generate_variants (7 mutation kinds, seeded RNG, save=true|false)
- photo_to_scene (vision sampling → scene graph → save)

Editor (A5, A6):
- /api/scenes + /api/scenes/[id] with RFC 7232 If-Match locking
- /scene/[id] and /scenes route pages with save button, SceneLoader
- Removed the window.__pascalScene dev injection hack

Security + UX edges (A7, A8):
- AssetUrl Zod validator: asset:// blob: data:image/ /path https:
  (http://localhost for dev) + PASCAL_ALLOWED_ASSET_ORIGINS env
  allowlist. Hardens scan.url, guide.url, item.asset.src,
  material.texture.url, MaterialMaps.*Map
- Auto-frame camera on empty→non-empty scene transition
  (camera-controls:fit-scene emitter event)

Shared utilities:
- rehydrateSiteChildren() extracted to packages/mcp/src/lib/ and
  used by both create-from-template and generate-variants to work
  around the SiteNode.children-as-objects vs. ids inconsistency
  (CROSS_CUTTING §2)
- Storage + MCP subpath exports added to packages/mcp/package.json
  (CROSS_CUTTING §4)

Tests: 293 pass / 0 fail across 40 files (was 142 pre-Phase-7).
Biome: clean.

Phase-7 e2e script at packages/mcp/test-reports/phase7-e2e.ts:
MCP HTTP + editor Next.js both point at $PASCAL_DATA_DIR =
/tmp/pascal-e2e, save_scene from MCP, GET /api/scenes/<id> from
editor server, /scenes list page renders all saved scenes, scene
page renders SceneLoader, delete_scene works.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 19:29:28 +02: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
sudhir
f29946f27b Add auto cutout toggle to stair panel 2026-04-17 22:29:44 +05:30
sudhir
4a97581b86 Fix stair placement to use local level height 2026-04-17 13:24:52 +05:30
sudhir
b314a8fbf8 Implement stair-driven slab hole cutouts 2026-04-17 13:13:02 +05:30