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
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
sceneRegistry,
|
||||
useScene,
|
||||
} from '@pascal-app/core'
|
||||
import { useViewer, WalkthroughControls, ZONE_LAYER } from '@pascal-app/viewer'
|
||||
import { useViewer, ZONE_LAYER } from '@pascal-app/viewer'
|
||||
import { CameraControls, CameraControlsImpl } from '@react-three/drei'
|
||||
import { useThree } from '@react-three/fiber'
|
||||
import { useCallback, useEffect, useMemo, useRef } from 'react'
|
||||
|
||||
@@ -4,8 +4,8 @@ import '../../three-types'
|
||||
import {
|
||||
type AnyNode,
|
||||
type AnyNodeId,
|
||||
type ElevatorNode,
|
||||
type ElevatorDoorSide,
|
||||
type ElevatorNode,
|
||||
emitter,
|
||||
getElevatorCabCenterZ,
|
||||
getElevatorCabDepth,
|
||||
@@ -18,10 +18,10 @@ import {
|
||||
getElevatorShaftWidth,
|
||||
getResolvedElevatorDoorStyle,
|
||||
openElevatorDoor,
|
||||
requestElevatorLevel,
|
||||
resolveElevatorBuildingLevels,
|
||||
resolveElevatorDispatchTarget,
|
||||
resolveElevatorServiceLevels,
|
||||
requestElevatorLevel,
|
||||
sceneRegistry,
|
||||
useInteractive,
|
||||
useScene,
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
import { ViewerOverlay } from '../../components/viewer-overlay'
|
||||
import { ViewerZoneSystem } from '../../components/viewer-zone-system'
|
||||
import { type PresetsAdapter, PresetsProvider } from '../../contexts/presets-context'
|
||||
import { useAutoFrame } from '../../hooks/use-auto-frame'
|
||||
import { type SaveStatus, useAutoSave } from '../../hooks/use-auto-save'
|
||||
import { useKeyboard } from '../../hooks/use-keyboard'
|
||||
import {
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
useScene,
|
||||
} from '@pascal-app/core'
|
||||
import { useViewer } from '@pascal-app/viewer'
|
||||
import { useFrame } from '@react-three/fiber'
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import * as THREE from 'three'
|
||||
import { markToolCancelConsumed } from '../../../hooks/use-keyboard'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
type AnyNode,
|
||||
emitter,
|
||||
type GridEvent,
|
||||
type LevelNode,
|
||||
|
||||
@@ -242,10 +242,7 @@ function getLevelSlabs(levelId: string, nodes: ReturnType<typeof useScene.getSta
|
||||
)
|
||||
}
|
||||
|
||||
function getLevelAutoSlabs(
|
||||
levelId: string,
|
||||
nodes: ReturnType<typeof useScene.getState>['nodes'],
|
||||
) {
|
||||
function getLevelAutoSlabs(levelId: string, nodes: ReturnType<typeof useScene.getState>['nodes']) {
|
||||
return getLevelSlabs(levelId, nodes).filter((slab) => slab.autoFromWalls)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {
|
||||
useInteractive,
|
||||
useRegistry,
|
||||
useScene,
|
||||
type AnimationEffect,
|
||||
type AnyNodeId,
|
||||
type Interactive,
|
||||
type ItemNode,
|
||||
type LightEffect,
|
||||
useInteractive,
|
||||
useRegistry,
|
||||
useScene,
|
||||
} from '@pascal-app/core'
|
||||
import { useAnimations } from '@react-three/drei'
|
||||
import { Clone } from '@react-three/drei/core/Clone'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useRegistry, useScene, type SiteNode, type SlabNode } from '@pascal-app/core'
|
||||
import { type SiteNode, type SlabNode, useRegistry, useScene } from '@pascal-app/core'
|
||||
import { useMemo, useRef } from 'react'
|
||||
import { BufferGeometry, Float32BufferAttribute, Path, Shape, type Group } from 'three'
|
||||
import { BufferGeometry, Float32BufferAttribute, type Group, Path, Shape } from 'three'
|
||||
import { useNodeEvents } from '../../../hooks/use-node-events'
|
||||
import { unionPolygons } from '../../../lib/polygon-union'
|
||||
import useViewer from '../../../store/use-viewer'
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
import { useThree } from '@react-three/fiber'
|
||||
import { forwardRef, type ReactNode, useEffect, useImperativeHandle, useRef } from 'react'
|
||||
import { type BufferGeometry, type Group, Mesh } from 'three'
|
||||
import {
|
||||
type ReactNode,
|
||||
forwardRef,
|
||||
useEffect,
|
||||
useImperativeHandle,
|
||||
useRef,
|
||||
} from 'react'
|
||||
import { Group, Mesh, type BufferGeometry } from 'three'
|
||||
import {
|
||||
SAH,
|
||||
acceleratedRaycast,
|
||||
computeBoundsTree,
|
||||
disposeBoundsTree,
|
||||
SAH,
|
||||
type SplitStrategy,
|
||||
} from 'three-mesh-bvh'
|
||||
|
||||
|
||||
@@ -36,4 +36,5 @@ const useGLTFKTX2 = (path: string): ReturnType<typeof useGLTF> => {
|
||||
loader.setMeshoptDecoder(MeshoptDecoder)
|
||||
})
|
||||
}
|
||||
|
||||
export { useGLTFKTX2 }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
getMaterialPresetByRef,
|
||||
resolveMaterial,
|
||||
type MaterialMapProperties,
|
||||
type MaterialPresetPayload,
|
||||
type MaterialProperties,
|
||||
type MaterialSchema,
|
||||
resolveMaterial,
|
||||
} from '@pascal-app/core'
|
||||
import * as THREE from 'three'
|
||||
import { MeshLambertNodeMaterial, MeshStandardNodeMaterial } from 'three/webgpu'
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
import type { AnyNode, BaseNode, BuildingNode, LevelNode, ZoneNode } from '@pascal-app/core'
|
||||
import type { Object3D } from 'three'
|
||||
|
||||
type SelectionPath = {
|
||||
buildingId: BuildingNode['id'] | null
|
||||
levelId: LevelNode['id'] | null
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
type AnyNodeId,
|
||||
openElevatorDoor,
|
||||
resolveElevatorDispatchTarget,
|
||||
requestElevatorLevel,
|
||||
resolveElevatorDispatchTarget,
|
||||
useInteractive,
|
||||
useScene,
|
||||
} from '@pascal-app/core'
|
||||
|
||||
Reference in New Issue
Block a user