chore: biome auto-format pass (resolve persistent dirty-tree noise)
These files had been showing as modified in every dev session — biome's canonical formatting (line-length collapses, import sort, type-modifier placement) didn't match the committed state. No semantic changes. Committing now so the working tree stays clean across sessions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
5e67ffd4e8
commit
36c48b7fc9
@@ -73,17 +73,11 @@ export function getElevatorShaftWallThickness(node: ElevatorNode) {
|
||||
return Math.max(node.shaftWallThickness ?? DEFAULT_ELEVATOR_SHAFT_WALL_THICKNESS, 0.04)
|
||||
}
|
||||
|
||||
export function getElevatorShaftWidth(
|
||||
node: ElevatorNode,
|
||||
cabWidth = getElevatorCabWidth(node),
|
||||
) {
|
||||
export function getElevatorShaftWidth(node: ElevatorNode, cabWidth = getElevatorCabWidth(node)) {
|
||||
return Math.max(node.shaftWidth ?? cabWidth, cabWidth, 0.8)
|
||||
}
|
||||
|
||||
export function getElevatorShaftDepth(
|
||||
node: ElevatorNode,
|
||||
cabDepth = getElevatorCabDepth(node),
|
||||
) {
|
||||
export function getElevatorShaftDepth(node: ElevatorNode, cabDepth = getElevatorCabDepth(node)) {
|
||||
return Math.max(node.shaftDepth ?? cabDepth, cabDepth, 0.8)
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,10 @@ describe('elevator runtime helpers', () => {
|
||||
})
|
||||
|
||||
test('moves to a queued level and clears the served request on arrival', () => {
|
||||
const queued = queueElevatorRequest(createElevatorInteractiveState(groundLevelId, 0), upperLevelId)
|
||||
const queued = queueElevatorRequest(
|
||||
createElevatorInteractiveState(groundLevelId, 0),
|
||||
upperLevelId,
|
||||
)
|
||||
const moving = stepElevatorRuntimeState({
|
||||
defaultEntry: entries[0]!,
|
||||
delta: 0.016,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AnyNode, AnyNodeId, ElevatorNode } from '../../schema'
|
||||
import { type ElevatorInteractiveState, useInteractive } from '../../store/use-interactive'
|
||||
import useScene from '../../store/use-scene'
|
||||
import { resolveElevatorLevels, type ElevatorLevelEntry } from './elevator-service'
|
||||
import { type ElevatorLevelEntry, resolveElevatorLevels } from './elevator-service'
|
||||
|
||||
const EPSILON = 0.001
|
||||
|
||||
@@ -67,9 +67,7 @@ export function queueElevatorRequest(
|
||||
}
|
||||
}
|
||||
|
||||
export function openElevatorDoorState(
|
||||
state: ElevatorInteractiveState,
|
||||
): ElevatorInteractiveState {
|
||||
export function openElevatorDoorState(state: ElevatorInteractiveState): ElevatorInteractiveState {
|
||||
if (!state.currentLevelId || state.phase === 'moving') return state
|
||||
|
||||
return {
|
||||
@@ -246,7 +244,9 @@ export function stepElevatorRuntimes(now: number, delta: number) {
|
||||
|
||||
const state = useInteractive.getState().elevators[elevatorId]
|
||||
if (!state) {
|
||||
useInteractive.getState().initElevator(elevatorId, defaultEntry.id as AnyNodeId, defaultEntry.baseY)
|
||||
useInteractive
|
||||
.getState()
|
||||
.initElevator(elevatorId, defaultEntry.id as AnyNodeId, defaultEntry.baseY)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import type { AnyNode, AnyNodeId, CeilingNode, ElevatorNode, LevelNode, WallNode } from '../../schema'
|
||||
import type {
|
||||
AnyNode,
|
||||
AnyNodeId,
|
||||
CeilingNode,
|
||||
ElevatorNode,
|
||||
LevelNode,
|
||||
WallNode,
|
||||
} from '../../schema'
|
||||
|
||||
export const DEFAULT_ELEVATOR_LEVEL_HEIGHT = 2.5
|
||||
|
||||
|
||||
@@ -12,9 +12,7 @@ export type WallMoveBridgePlan<TWall extends Pick<WallNode, 'id' | 'start' | 'en
|
||||
movedEndpoint: WallMoveEndpoint
|
||||
}
|
||||
|
||||
export type WallMoveLinkedWallTargetPlan<
|
||||
TWall extends Pick<WallNode, 'id' | 'start' | 'end'>,
|
||||
> = {
|
||||
export type WallMoveLinkedWallTargetPlan<TWall extends Pick<WallNode, 'id' | 'start' | 'end'>> = {
|
||||
wall: TWall
|
||||
originalPoint: WallPlanPoint
|
||||
targetPoint: WallPlanPoint
|
||||
@@ -174,7 +172,9 @@ export function planWallMoveJunctions<TWall extends Pick<WallNode, 'id' | 'start
|
||||
.sort((a, b) => a.distance - b.distance)[0]
|
||||
|
||||
if (consumedSameDirectionWall) {
|
||||
const pivotPoint = [...otherWallEndpoint(consumedSameDirectionWall.wall, point)] as WallPlanPoint
|
||||
const pivotPoint = [
|
||||
...otherWallEndpoint(consumedSameDirectionWall.wall, point),
|
||||
] as WallPlanPoint
|
||||
const bridgeSource = linkedAtEndpoint.find((entry) => entry.relation === 'opposite-direction')
|
||||
|
||||
wallsToDelete.set(consumedSameDirectionWall.wall.id, consumedSameDirectionWall.wall)
|
||||
@@ -201,14 +201,22 @@ export function planWallMoveJunctions<TWall extends Pick<WallNode, 'id' | 'start
|
||||
|
||||
const linkedAtPivot = linkedWalls
|
||||
.filter(
|
||||
(wall) => wall.id !== consumedSameDirectionWall.wall.id && wallTouchesPoint(wall, pivotPoint),
|
||||
(wall) =>
|
||||
wall.id !== consumedSameDirectionWall.wall.id && wallTouchesPoint(wall, pivotPoint),
|
||||
)
|
||||
.map((wall) => ({
|
||||
wall,
|
||||
relation: getMoveWallRelation(wall, pivotPoint, nextPoint),
|
||||
}))
|
||||
|
||||
addStandardEndpointPlan(endpoint, pivotPoint, nextPoint, linkedAtPivot, ':through-pivot', true)
|
||||
addStandardEndpointPlan(
|
||||
endpoint,
|
||||
pivotPoint,
|
||||
nextPoint,
|
||||
linkedAtPivot,
|
||||
':through-pivot',
|
||||
true,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user