Skip to content

feat(editor): preset placement polish — params, move tool, shadows, isolation#357

Merged
wass08 merged 2 commits into
mainfrom
community/preset-polish
Jun 2, 2026
Merged

feat(editor): preset placement polish — params, move tool, shadows, isolation#357
wass08 merged 2 commits into
mainfrom
community/preset-polish

Conversation

@wass08

@wass08 wass08 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Polish pass on the preset-system placement flow (consumed by apps/community in pascalorg/private-editor via a submodule bump). Six related changes:

  • Template-preset paramswall / slab / ceiling / roof create paths now merge toolDefaults[kind] so a placed template preset builds with its saved parametrics (thickness, height, materials, pitch, roofType, …) instead of the raw default. Each tool clears its entry on unmount, matching the existing fence behaviour.
  • Wall draw preview reflects the seeded preset's height/thickness (the cursor sphere, preview bar, and HUD measurement labels), so the draft looks like the wall that will be created.
  • Box-select picks up registry-selectable kinds (shelf, and future furnish/structure kinds) via their rendered bbox — they were missing from the hardcoded type list.
  • Move tools (MoveRegistryNodeTool + column's move tool): snap to the active grid step instead of a hardcoded 0.5; R/T rotate the dragged node in 90° steps (committed on drop); and ignore a commit click that fires before the cursor has moved, which stops a preset re-arm from auto-placing a second copy from the same physical click.
  • Shelf geometry now casts + receives shadows like the other geometry-driven kinds (fence, slab) — it was using the Three.js default (no shadow).
  • isIsolationActive() exported from @pascal-app/viewer: the isolation module tracks whether a subtree filter is applied, so hosts can avoid acting on the partial view (the community uses it to skip project-thumbnail autosave during preset capture).

How to test

  1. bun dev, open a scene.
  2. Template preset (via the consuming app, or manually seed toolDefaults.wall): activate the wall tool with non-default thickness/height — the draft preview and the built wall both use those values.
  3. Move tool: grab a shelf/column, change the grid-snap step in the toolbar — the move snaps to it; press R/T to rotate in 90° steps; click to drop — rotation persists.
  4. Box-select: in furnish, drag a marquee over shelves — they get selected.
  5. Shadows: place a shelf under a directional light — it casts a shadow.
  6. Isolation flag: with a subtree isolated via <Viewer isolate> / setIsolated, isIsolationActive() returns true; clearing isolation returns false.

Screenshots / screen recording

N/A — behavioural/rendering changes; verified via the consuming community app. A clip can be added if useful.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

wass08 and others added 2 commits June 2, 2026 09:16
- wall/slab/ceiling/roof create paths consume `toolDefaults` so template
  presets build with their saved params; cleared on tool unmount
- wall draw preview reflects the preset's height/thickness (+ HUD labels)
- box-select picks up registry-selectable kinds (shelf) via bbox
- registry + column move tools: snap to the active grid step, R/T rotation,
  and ignore the stray trailing click that armed the move (no double-place)
- shelf geometry casts + receives shadows like fence/slab

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tracks whether an isolation filter is currently applied and exposes it so
hosts can avoid acting on the partial view — e.g. skipping project-thumbnail
autosave while a single subtree is isolated (preset capture).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
pascal 🔴 Failed Jun 2, 2026, 2:15 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@wass08 wass08 merged commit f7ff605 into main Jun 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant