Commit Graph
37 Commits
Author SHA1 Message Date
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
Pascal f25806ee8f release: v0.5.1 2026-04-14 05:01:30 +00:00
PascalandGitHub cf7493985f fix: guard null selected item during item tool placement (#229) 2026-04-14 00:48:59 -04:00
PascalandGitHub 3afa1cea8b fix: recover post-processing after duplicate scene mutations (#228) 2026-04-13 23:49:45 -04:00
PascalandGitHub 682e2a1a12 sync: backport monorepo PRs #240 #251 #253 (#225) 2026-04-13 11:24:13 -04:00
PascalandGitHub 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
Pascal fab9077f65 fix: update lockfile for v0.5.0 release 2026-04-09 19:07:05 +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 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
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
PascalandGitHub e8ad92592d fix(viewer): suppress THREE.Clock deprecation warning from R3F 9.x (#215)
three.js r183 deprecated THREE.Clock, but @react-three/fiber 9.x still
uses it internally per <Canvas> mount. This floods the dev console with
noise on every page load and HMR reload.

Uses three's setConsoleFunction hook to surgically suppress only the
exact Clock deprecation message. All other three.js logs pass through
untouched, including TSL stack-trace warnings.

Safe to remove once R3F v10 stable ships (which replaces Clock with
Timer). Removal condition documented in file header.

Closes #213
2026-04-07 10:17:00 -04:00
PascalandGitHub d9965f487c fix: sync stair elevations with floor slabs (#216)
Mark stair nodes as dirty when slabs change so stairs properly stack on
top of floor slabs. StairSystem now computes slab-driven elevation by
sampling segment centers against the spatial grid.

Changes:
- spatial-grid-sync: mark stair nodes dirty on slab changes (same level)
- stair-system: syncStairGroupElevation + getStairSlabElevation compute
  Y offset from slab data; rotateXZ helper for world-space transforms
- stair-renderer: use position-x/position-z so the system controls Y
2026-04-06 12:02:57 -04:00
PascalandGitHub 0bd0cab533 feat: stair system, scene graph utilities, read-only mode, viewer state improvements (#210)
Stair system (full stack):
- New StairNode + StairSegmentNode schemas with flights, landings, L/U-shapes
- StairSystem: geometry generation with throttled per-frame updates
- Stair tool, edit system, panels, tree node, and renderers
- Event bus types, scene registry, and command palette entries

Scene graph utilities:
- cloneLevelSubtree: deep-clone a level with remapped IDs
- forkSceneGraph: clone + strip scan/guide nodes for project forking

Core improvements:
- Read-only mode on scene store (blocks create/update/delete when locked)
- readOnly guards on node-actions and collection actions
- Upload store for scan/guide file upload handling

Viewer state:
- previewSelectedIds for box-select live preview
- hoverHighlightMode (default/delete) for delete-mode hover outline
2026-04-05 01:20:43 -04:00
PascalandGitHub 50eca057ca feat: editor layout redesign v2 + 3D box select (#207)
Major layout redesign introducing v2 editor layout:

**New Features**
- V2 two-column layout (resizable sidebar + viewer panel with toolbar slots)
- 3D box select tool with marquee selection (561 lines pure Three.js geometry)
- View mode system (3D/2D/Split) replacing old floorplan toggle
- Floating level selector on viewer panel
- Viewer toolbar: level mode, wall mode, units, theme, camera, walkthrough, preview
- Horizontal tab bar for sidebar panels

**Layout Changes**
- Fixed 5-button control bar: Select, Box Select, Site Edit, Build, Delete
- Simplified view toggles (scans/guides only)
- Always-mounted viewers (display:none) to preserve WebGL context
- First-person walkthrough forces 3D view, restores on exit
- Site edit as permanent control (phase='site' is sole signal)

**Technical**
- layoutVersion prop: 'v1' (default) or 'v2'
- New exports: FloatingLevelSelector, SettingsPanel, SidebarTab, ViewMode, ViewerToolbarLeft/Right
- isCollapsed/setIsCollapsed added to sidebar store
- isFirstPersonMode restored for walkthrough support

19 files changed, +3230/-1898
Built and verified: bun run build passes (all tasks, 0 errors)
2026-04-02 11:24:19 -04:00
Pascal b4d9f3fbf6 fix: resolve type errors in export-system for tsc --build
- Cast scene.clone() to Scene for GLTFExporter compatibility
- Cast DataView.buffer to ArrayBuffer for STL Blob construction
- Add THREE import for Object3D type in traverse callback
2026-03-31 20:54:46 +00:00
Pascal f2f362eda9 release: @pascal-app/core@0.3.3 @pascal-app/viewer@0.3.3 2026-03-31 20:52:13 +00:00
PascalandGitHub 3e05e5aa43 Merge pull request #203 from thiago-lopes-dev/main
feat: implement export scene system (GLB, STL, OBJ)
2026-03-31 16:51:51 -04:00
PascalandGitHub c77a8070e1 Merge pull request #205 from pascalorg/fix/ceiling-transparent-fallback
fix: ceiling transparent by default when no material is set
2026-03-31 16:51:19 -04:00
Pascal b6636c179b fix: ceiling transparent by default when no material is set
The ceiling renderer was falling back to DEFAULT_CEILING_MATERIAL (an
opaque MeshStandardMaterial) when no material was set on the node.
This made ceilings fully opaque instead of using the intended
transparent grid pattern for scenes created before v0.3.2.

Now uses resolveMaterial() to extract the color from whatever material
config exists (preset, custom, or default white), then always creates
the proper transparent ceiling materials for both faces.
2026-03-31 19:31:46 +00:00
Pascal e84e870248 release: @pascal-app/core@0.3.2 @pascal-app/viewer@0.3.2 2026-03-30 21:10:55 +00:00
PascalandGitHub 08a9d66520 Merge pull request #201 from PMAT77/feature/material
Feature/material
2026-03-30 17:07:01 -04:00
Pascal f7a024d5f0 chore: remove AGENTS.md — not intended for the repository 2026-03-30 21:06:49 +00:00
PascalandGitHub 4a83bed6dd Merge pull request #173 from Yashism/feat/street-view
Add street view / walkthrough mode
2026-03-30 16:40:19 -04:00
PascalandGitHub 4b17241873 Merge pull request #202 from pascalorg/chore/update-templates
chore: encourage screen recordings in PR and bug report templates
2026-03-30 16:40:08 -04:00
Pascal 10d96b3b2b chore: encourage screen recordings in PR and bug report templates 2026-03-30 20:07:22 +00:00
Pascal 5fcdad79ce merge: resolve conflict with main — keep first-person mode bypass + tool cancel pattern + delete mode + counter-clockwise rotation 2026-03-30 20:06:47 +00: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
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
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
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
PascalandGitHub 49c045e861 chore: add community templates, simplify setup, fix lockfile (#177) 2026-03-25 21:20:25 -07:00