diff --git a/apps/editor/components/tools/ceiling/ceiling-tool.tsx b/apps/editor/components/tools/ceiling/ceiling-tool.tsx index 244743c0..cbfaa4d0 100644 --- a/apps/editor/components/tools/ceiling/ceiling-tool.tsx +++ b/apps/editor/components/tools/ceiling/ceiling-tool.tsx @@ -3,6 +3,7 @@ import { useViewer } from '@pascal-app/viewer' import { useEffect, useMemo, useRef, useState } from 'react' import { BufferGeometry, DoubleSide, type Line, type Group, Shape, Vector3 } from 'three' import { mix, positionLocal } from 'three/tsl' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '@/lib/sfx-bus' import { CursorSphere } from '../shared/cursor-sphere' @@ -295,14 +296,14 @@ export const CeilingTool: React.FC = () => { {/* Grid-level cursor indicator */} - + {/* Vertical connector: local y=0 at grid, y=H at ceiling; position.y set to gridY on move */} {/* @ts-ignore */} - + @@ -310,6 +311,7 @@ export const CeilingTool: React.FC = () => { {previewShape && ( @@ -328,6 +330,7 @@ export const CeilingTool: React.FC = () => { {previewShape && ( @@ -344,14 +347,14 @@ export const CeilingTool: React.FC = () => { {/* Main line */} {/* @ts-ignore */} - + {/* Closing line */} {/* @ts-ignore */} - + { {/* Ground main line */} {/* @ts-ignore */} - + {/* Ground closing line */} {/* @ts-ignore */} - + { return ( - + ) } diff --git a/apps/editor/components/tools/door/move-door-tool.tsx b/apps/editor/components/tools/door/move-door-tool.tsx index dc1b8c7c..f06626fc 100644 --- a/apps/editor/components/tools/door/move-door-tool.tsx +++ b/apps/editor/components/tools/door/move-door-tool.tsx @@ -11,6 +11,7 @@ import { useViewer } from '@pascal-app/viewer' import { useEffect, useMemo, useRef } from 'react' import { BoxGeometry, EdgesGeometry, type Group } from 'three' import { LineBasicNodeMaterial } from 'three/webgpu' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '@/lib/sfx-bus' import useEditor from '@/store/use-editor' import { @@ -336,7 +337,7 @@ export const MoveDoorTool: React.FC<{ node: DoorNode }> = ({ node: movingDoorNod return ( - + ) } diff --git a/apps/editor/components/tools/item/use-placement-coordinator.tsx b/apps/editor/components/tools/item/use-placement-coordinator.tsx index dcd151e9..1ffefe5f 100644 --- a/apps/editor/components/tools/item/use-placement-coordinator.tsx +++ b/apps/editor/components/tools/item/use-placement-coordinator.tsx @@ -30,6 +30,7 @@ import { } from 'three' import { distance, smoothstep, uv, vec2 } from 'three/tsl' import { LineBasicNodeMaterial, MeshBasicNodeMaterial } from 'three/webgpu' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '@/lib/sfx-bus' import { ceilingStrategy, checkCanPlace, floorStrategy, itemSurfaceStrategy, wallStrategy } from './placement-strategies' import type { PlacementState, TransitionResult } from './placement-types' @@ -759,10 +760,10 @@ export function usePlacementCoordinator(config: PlacementCoordinatorConfig): Rea return ( - + - + ) } diff --git a/apps/editor/components/tools/roof/roof-tool.tsx b/apps/editor/components/tools/roof/roof-tool.tsx index 777303e3..6927fd5d 100644 --- a/apps/editor/components/tools/roof/roof-tool.tsx +++ b/apps/editor/components/tools/roof/roof-tool.tsx @@ -9,6 +9,7 @@ import { import { useViewer } from '@pascal-app/viewer' import { useEffect, useMemo, useRef, useState } from 'react' import { BufferGeometry, DoubleSide, type Line, type Group, Vector3 } from 'three' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '@/lib/sfx-bus' import useEditor from '@/store/use-editor' import { CursorSphere } from '../shared/cursor-sphere' @@ -210,7 +211,7 @@ export const RoofTool: React.FC = () => { {/* Outline showing rectangle being drawn (Ground) */} {/* @ts-ignore */} - + @@ -227,6 +228,7 @@ export const RoofTool: React.FC = () => { {/* Thin preview fill when drawing (Ground) */} {previewDimensions && previewDimensions.length > 0.1 && previewDimensions.width > 0.1 && ( diff --git a/apps/editor/components/tools/shared/cursor-sphere.tsx b/apps/editor/components/tools/shared/cursor-sphere.tsx index 87a58b9a..b0f81324 100644 --- a/apps/editor/components/tools/shared/cursor-sphere.tsx +++ b/apps/editor/components/tools/shared/cursor-sphere.tsx @@ -2,6 +2,7 @@ import type { ThreeElements } from '@react-three/fiber' import { forwardRef } from 'react' import type { Group } from 'three' import { Html } from '@react-three/drei' +import { EDITOR_LAYER } from '@/lib/constants' import useEditor from '@/store/use-editor' import { tools } from '@/components/ui/action-menu/structure-tools' import { furnishTools } from '@/components/ui/action-menu/furnish-tools' @@ -36,13 +37,13 @@ export const CursorSphere = forwardRef(function Cursor {/* Flat marker on the ground */} {/* Center dot */} - + {/* Outer ring / glow */} - + @@ -50,7 +51,7 @@ export const CursorSphere = forwardRef(function Cursor {/* Vertical line */} {height > 0 && ( - + diff --git a/apps/editor/components/tools/slab/slab-tool.tsx b/apps/editor/components/tools/slab/slab-tool.tsx index 54630e25..eb77d359 100644 --- a/apps/editor/components/tools/slab/slab-tool.tsx +++ b/apps/editor/components/tools/slab/slab-tool.tsx @@ -2,6 +2,7 @@ import { emitter, type GridEvent, type LevelNode, SlabNode, useScene } from '@pa import { useViewer } from '@pascal-app/viewer' import { useEffect, useMemo, useRef, useState } from 'react' import { BufferGeometry, DoubleSide, type Line, type Group, Shape, Vector3 } from 'three' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '@/lib/sfx-bus' import { CursorSphere } from '../shared/cursor-sphere' @@ -243,6 +244,7 @@ export const SlabTool: React.FC = () => { {previewShape && ( @@ -259,14 +261,14 @@ export const SlabTool: React.FC = () => { {/* Main line */} {/* @ts-ignore */} - + {/* Closing line */} {/* @ts-ignore */} - + { {/* Wall preview */} - + = ({ node: movingWin return ( - + ) } diff --git a/apps/editor/components/tools/window/window-tool.tsx b/apps/editor/components/tools/window/window-tool.tsx index 8676c2cd..da7a45c4 100644 --- a/apps/editor/components/tools/window/window-tool.tsx +++ b/apps/editor/components/tools/window/window-tool.tsx @@ -19,6 +19,7 @@ import { snapToHalf, } from '../item/placement-math' import { clampToWall, hasWallChildOverlap, wallLocalToWorld } from './window-math' +import { EDITOR_LAYER } from '@/lib/constants' import { sfxEmitter } from '../../../lib/sfx-bus' // Shared edge material — reuse across renders, just toggle color @@ -269,7 +270,7 @@ export const WindowTool: React.FC = () => { return ( - + ) } diff --git a/apps/editor/components/tools/zone/zone-tool.tsx b/apps/editor/components/tools/zone/zone-tool.tsx index da8d28bd..51344563 100644 --- a/apps/editor/components/tools/zone/zone-tool.tsx +++ b/apps/editor/components/tools/zone/zone-tool.tsx @@ -2,6 +2,7 @@ import { emitter, type GridEvent, useScene, ZoneNode, type LevelNode } from "@pa import { useViewer } from "@pascal-app/viewer"; import { useEffect, useMemo, useRef, useState } from "react"; import { BufferGeometry, DoubleSide, type Line, type Group, Shape, Vector3 } from "three"; +import { EDITOR_LAYER } from "@/lib/constants"; import useEditor from "@/store/use-editor"; import { CursorSphere } from "../shared/cursor-sphere"; @@ -318,6 +319,7 @@ export const ZoneTool: React.FC = () => { {previewShape && ( @@ -334,7 +336,7 @@ export const ZoneTool: React.FC = () => { {/* Main line - uses native line element with TSL-compatible material */} {/* @ts-ignore */} - + { {/* Closing line - uses native line element with TSL-compatible material */} {/* @ts-ignore */} - +