Refine elevator sync and viewer rebuild handling
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
export const SurfaceHoleMetadata = z.object({
|
||||
// Stair/elevator auto-openings use stairId/elevatorId so sync can replace only its own holes.
|
||||
source: z.enum(['manual', 'stair', 'elevator']).default('manual'),
|
||||
stairId: z.string().optional(),
|
||||
elevatorId: z.string().optional(),
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import { resolveLevelId } from '../../hooks/spatial-grid/spatial-grid-sync'
|
||||
import type { AnyNode, AnyNodeId, CeilingNode, ElevatorNode, SlabNode } from '../../schema'
|
||||
import type {
|
||||
AnyNode,
|
||||
AnyNodeId,
|
||||
CeilingNode,
|
||||
ElevatorNode,
|
||||
SlabNode,
|
||||
SurfaceHoleMetadata,
|
||||
} from '../../schema'
|
||||
import { resolveElevatorServiceLevels } from './elevator-service'
|
||||
|
||||
type Point2D = [number, number]
|
||||
|
||||
type SurfaceHoleMetadata = {
|
||||
source: 'manual' | 'stair' | 'elevator'
|
||||
elevatorId?: string
|
||||
stairId?: string
|
||||
}
|
||||
|
||||
const ELEVATOR_OPENING_PADDING = 0.08
|
||||
const DEFAULT_ELEVATOR_SHAFT_WALL_THICKNESS = 0.09
|
||||
|
||||
|
||||
@@ -6,17 +6,12 @@ import type {
|
||||
SlabNode,
|
||||
StairNode,
|
||||
StairSegmentNode,
|
||||
SurfaceHoleMetadata,
|
||||
} from '../../schema'
|
||||
import { DEFAULT_WALL_HEIGHT } from '../wall/wall-footprint'
|
||||
|
||||
type Point2D = [number, number]
|
||||
|
||||
type SurfaceHoleMetadata = {
|
||||
source: 'manual' | 'stair' | 'elevator'
|
||||
elevatorId?: string
|
||||
stairId?: string
|
||||
}
|
||||
|
||||
type SegmentTransform = {
|
||||
position: [number, number, number]
|
||||
rotation: number
|
||||
|
||||
Reference in New Issue
Block a user