editor: add WebXR immersive editing workflows - #898
Conversation
… github.com:pascalorg/editor
- Add VR entry point, feature gating, and wand bindings - Integrate immersive viewer presentation and build-panel controls - Add XR dependencies and Three.js compatibility patches
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 301330b2-443c-4552-8f72-2210e4a32bc3 |
# Conflicts: # packages/editor/src/components/ui/sidebar/panels/settings-panel/index.tsx # packages/editor/src/index.tsx # packages/nodes/src/window/tool.tsx
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c9ed41e. Configure here.
| [event.localPosition[0], event.localPosition[2]], | ||
| getActiveBuildingPose(), | ||
| (value, axis) => snapToGrid(value, dimensions[axis]), | ||
| ) |
There was a problem hiding this comment.
Item snap uses mismatched building frames
High Severity
Floor item snapping now feeds event.localPosition into snapLocalXZInWorld with getActiveBuildingPose(), which resolves the building from the active level first. grid:move localPosition is still produced from selection.buildingId in resolvePointerSupportSurface and useGridEvents, and the placement coordinator overwrites the event with that point. A missing or stale buildingId treats world or scaled XR coordinates as building-local, so items land off-grid or far from the cursor on rotated buildings and in God view.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit c9ed41e. Configure here.


What does this PR do?
How to test
bun install,bun run check-types, andbun run build; all should complete successfully.bun devand openhttp://localhost:3002; confirm the editor loads without a runtime error and the WebXR plugin appears in the sidebar.Screenshots / screen recording
Not attached — the interactive WebXR and desktop flows were verified locally on port 3002.
Checklist
bun devbun checkto verify)mainbranchNote
High Risk
Large surface area across 3D input, snapping, and scene editing with a new external WebXR stack; regressions could affect both desktop handles and immersive workflows.
Overview
Adds WebXR immersive editing to the open-source standalone editor by registering
@webxr/plugin, bundling@react-three/xr(withthree/iwerpatches), and gating runtime/UI on whether the plugin is installed.The home page wraps the canvas in a WebXR feature runtime that exposes
usePascalWebXRto children, passesimmersiveintoEditor/Viewer, and surfaces Enter VR viaPascalWebXRButtonon the viewer toolbar. Wand bindings reuse a refactored build palette (build-palette,build-panel-model, roof footprint helpers) shared with the slimmed Build tab.Spatial pointer paths are threaded through handles, group rotate, wall height resize, grid placement, and pointer-support resolution so controller rays drive drags, snapping, and floor/support picking like desktop. In XR, several desktop-only affordances are suppressed (box select, floating menus, default camera controls, measurement labels). Grid and item placement snap in building-local/world frames via new
snapLocalXZInWorld; rotation handles honorcontinuousdescriptors and Alt for unsnapped rotation when angle snap is on.UI models for catalog, material paint, and tool hints are extracted so XR panels can share desktop logic without duplicating editor state wiring.
Reviewed by Cursor Bugbot for commit c9ed41e. Bugbot is set up for automated code reviews on this repo. Configure here.