Commit Graph
118 Commits
Author SHA1 Message Date
sudhir db765f1eb3 Enable pillar duplication in floating action menu 2026-05-04 22:54:52 +05:30
sudhir 848529acb0 Add column presets and procedural shaft controls 2026-05-04 16:38:52 +05:30
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
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 325f2e4603 Refactor viewer hover styles and remove preview state 2026-04-24 22:49:04 +05:30
sudhir 87dfdf1b38 Add paint hover previews to viewer 2026-04-22 10:52:35 +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
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
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
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
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
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 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
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
Developer 0be6d84c98 refactor: 完善材质系统相关代码
- 修复 node-actions.ts 中 forEach 返回值 lint 警告
- 更新材质 schema 定义和渲染器
- wall-cutout.tsx 材质颜色保留修复
2026-03-30 20:29:29 +08:00
Developer d0cdeb2ac4 fix(viewer): 修复墙体材质切换后缩放旋转时颜色恢复问题
问题描述:
选中墙体并切换材质颜色后,在界面上进行缩放、旋转或移动操作时,
墙体实际渲染的颜色会恢复为原来的白色,但颜色选项卡显示仍为选中的颜色。

根本原因:
WallCutout 系统在每次相机移动时,直接使用固定的白色材质覆盖墙体材质,
完全忽略了用户在节点上设置的自定义材质。

修复内容:
- 为每个墙体创建独立的材质对象,支持用户自定义颜色
- 支持预设颜色(brick, concrete, wood 等)和自定义颜色属性
- 添加材质哈希值跟踪,检测材质变化并重新创建材质
- 提取 getWallHideState() 辅助函数,优化代码结构
- 添加预设颜色映射的类型安全改进,使用 as const 和 keyof 类型操作
2026-03-30 20:21:48 +08:00
Developer 12b6292623 feat: add material system for all node types
- Add MaterialSchema with 10 presets (white, brick, concrete, wood, glass, metal, plaster, tile, marble, custom)
- Add material field to Wall, Slab, Door, Window, Ceiling, Roof, RoofSegment nodes
- Create MaterialPicker UI component with preset selection and custom properties
- Update all renderers to support material rendering with caching
- Add Material section to all node panels (WallPanel, SlabPanel, DoorPanel, WindowPanel, CeilingPanel, RoofPanel, RoofSegmentPanel)
- Update AGENTS.md with Material System documentation
2026-03-30 12:15:16 +08:00
f06f2fa1b1 feat: 2D editing — floorplan panel, measurements, command palette (v0.3.0)
* sync: port 2D editing features from monorepo (v0.3.0)

## New Features

### Floorplan Panel (7.5K LOC)
- Full 2D editing interface with wall drawing, measurement, and unit display
- Interactive floorplan view with pan/zoom, grid snapping
- Wall thickness visualization, door/window placement
- Zone and slab polygon editing
- Guide image overlay support
- Metric/imperial unit toggle

### Command Palette Overhaul
- Complete rewrite with new command registry system
- Keyboard shortcuts UI with ShortcutToken component
- Editor-specific commands (floorplan, measurements, camera focus)
- Improved search and action organization

### Wall Measurements
- Real-time wall length labels in 3D view
- Metric/imperial conversion
- Wall measurement UI component

### Enhanced Tools
- Wall drafting utilities (grid snapping, validation)
- Node action menu for quick operations
- Improved polygon editing for zones/slabs/sites
- Roof segment panel for granular roof control

## Package Changes

### @pascal-app/core@0.3.0
- New wall-footprint.ts: 2D wall footprint calculation
- Wall mitering exports for floorplan view
- camera-controls:focus event
- Space detection undo pause/resume
- Mark sibling nodes dirty on deletion (miter recalc)

### @pascal-app/viewer@0.3.0
- ErrorBoundary component for robust item rendering
- Broken item fallback UI
- Wall renderer: mark dirty on mount
- Ground occluder: only lowest level punches through
- Unit state (metric/imperial) in viewer store

### @pascal-app/editor@0.1.0
- 48 file changes (16 new, 32 modified)
- New stores: useCommandRegistry, usePaletteViewRegistry
- Tree node drag-and-drop system
- Level selection utilities
- Enhanced scene graph operations

## Apps/Editor
- GeistPixelSquare font for pixel-perfect UI
- Blueprint icon asset
- Updated layout and globals for font support

## Security
- Zero AI imports or internal package refs
- All monorepo-specific code excluded
- Clean audit: no API keys or secrets

## Testing
- Security audit passed 
- All AI/internal code excluded 
- Version bumps applied 

79 files modified, 16 files added
~2600 insertions, ~1400 deletions

* fix: lint cleanup — suppress intentional dep warnings, fix missing dep, remove stale ignores

- Add biome-ignore for 3 intentional useEffect reset patterns (levelId, selectedGuide, selectedId)
- Fix actual missing dependency: currentBuildingId in handleSiteEditShortcutSelect callback
- Remove 3 stale biome-ignore comments in r3f.d.ts (rule not active)

Build and lint pass clean.

* fix: type errors — polygon area guards, selection cast, readonly keywords, door guard

- ceiling-panel, slab-panel, ceiling-tree-node, slab-tree-node, zone-tree-node:
  guard polygon[i]/polygon[j] array access before arithmetic (TS2532)
- scene.ts: introduce toViewerSelection() helper to cast persisted string IDs
  to branded template literal types expected by useViewer.setSelection (TS2345)
- door-panel: guard early return when node is undefined in setSegmentHeightRatio (TS18048)
- editor-commands: remove 'as const' from inline command object, keywords is mutable string[] (TS2322)

All type checks pass. Build and lint clean.

---------

Co-authored-by: Anton Pascal <anton-pascal@users.noreply.github.com>
2026-03-24 19:48:11 +00:00
1d28e4208f sync: update core and viewer from monorepo (#143)
Major changes:
- Roof system rewrite with roof-segment support
- Scene store refactor
- Spatial grid improvements
- Item light system
- Post-processing and selection manager updates
- Perf monitor component

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:18:30 -04:00
wass08 f2501be2bf remove community 2026-03-13 09:07:46 +01:00
wass08 6719f34a89 clean zone handling code 2026-03-11 07:47:10 +01:00
wass08 918ec46a93 bring back ground occluder 2026-03-11 07:47:10 +01:00
wass08 30b9e3ccb2 move zones to separate layers todo: fix hardcoded 2 and zone floor 2026-03-11 07:47:10 +01:00
wass08 202fc41f42 fade timescale for smooth item anims 2026-03-06 13:08:24 +01:00
wass08 8f65daa853 handling lights 2026-03-06 13:08:23 +01:00
wass08 e2de931aa7 adjust fan anim 2026-03-06 13:08:23 +01:00
wass08 54051b11fa item system controls 2026-03-06 13:08:21 +01:00
wass08 927ecba054 schema and interactive store 2026-03-06 13:06:33 +01:00
Wassim SAMADandGitHub e0d97df8c8 Revert "Restore inline zone label editing on canvas (#134)"
This reverts commit 036344d705.
2026-03-06 13:04:52 +01:00
Aymeric RabotandGitHub 036344d705 Restore inline zone label editing on canvas (#134)
* fix: harden viewer/editor renderer init and error handling

* Bump @biomejs/biome and turbo versions

Update devDependencies: bump @biomejs/biome from ^2.4.4 to ^2.4.6 and turbo from ^2.8.12 to ^2.8.13. Regenerated bun.lock to reflect the updated resolved package versions.

* Restore inline zone label editing on canvas
2026-03-05 16:45:32 -05:00