remove community

This commit is contained in:
wass08
2026-03-13 09:07:46 +01:00
parent 3eeba322a8
commit f2501be2bf
693 changed files with 8264 additions and 35562 deletions
@@ -14,5 +14,5 @@ export const GuideSystem = () => {
}
})
}, [showGuides])
return null;
return null
}
@@ -62,7 +62,7 @@ const ItemControlsOverlay = ({ nodeId }: { nodeId: AnyNodeId }) => {
return z?.polygon ?? null
})
if (!itemObj || !controlValues || !node?.asset.interactive) return null
if (!(itemObj && controlValues && node?.asset.interactive)) return null
const { controls } = node.asset.interactive
const [, height] = node.asset.dimensions
@@ -77,7 +77,7 @@ const ItemControlsOverlay = ({ nodeId }: { nodeId: AnyNodeId }) => {
}
return createPortal(
<Html center position={[0, height + 0.3, 0]} zIndexRange={[20, 0]} occlude distanceFactor={8}>
<Html center distanceFactor={8} occlude position={[0, height + 0.3, 0]} zIndexRange={[20, 0]}>
<div
style={{
display: 'flex',
@@ -96,10 +96,10 @@ const ItemControlsOverlay = ({ nodeId }: { nodeId: AnyNodeId }) => {
>
{controls.map((control, i) => (
<ControlWidget
key={i}
control={control}
value={controlValues[i] ?? false}
key={i}
onChange={(v) => setControlValue(nodeId, i, v)}
value={controlValues[i] ?? false}
/>
))}
</div>
@@ -157,13 +157,13 @@ const ControlWidget = ({
{control.unit ? ` ${control.unit}` : ''}
</span>
<input
type="range"
min={control.min}
max={control.max}
step={control.step}
value={value as number}
min={control.min}
onChange={(e) => onChange(Number(e.target.value))}
onPointerDown={(e) => e.stopPropagation()}
step={control.step}
type="range"
value={value as number}
/>
</label>
)
@@ -176,13 +176,13 @@ const ControlWidget = ({
{control.label}: {value}°{control.unit}
</span>
<input
type="range"
min={control.min}
max={control.max}
step={1}
value={value as number}
min={control.min}
onChange={(e) => onChange(Number(e.target.value))}
onPointerDown={(e) => e.stopPropagation()}
step={1}
type="range"
value={value as number}
/>
</label>
)
+2 -2
View File
@@ -1,2 +1,2 @@
export declare const LevelSystem: () => null;
//# sourceMappingURL=level-system.d.ts.map
export declare const LevelSystem: () => null
//# sourceMappingURL=level-system.d.ts.map
@@ -14,7 +14,11 @@ export const LevelSystem = () => {
// Collect and sort levels by floor index so we can compute cumulative offsets.
// Level 0 → Y=0, Level 1 → Y=height(0), Level 2 → Y=height(0)+height(1), etc.
type LevelEntry = { levelId: string; index: number; obj: NonNullable<ReturnType<typeof sceneRegistry.nodes.get>> }
type LevelEntry = {
levelId: string
index: number
obj: NonNullable<ReturnType<typeof sceneRegistry.nodes.get>>
}
const entries: LevelEntry[] = []
sceneRegistry.byType.level.forEach((levelId) => {
const obj = sceneRegistry.nodes.get(levelId)
@@ -1,4 +1,10 @@
import { type CeilingNode, type LevelNode, sceneRegistry, useScene, type WallNode } from '@pascal-app/core'
import {
type CeilingNode,
type LevelNode,
sceneRegistry,
useScene,
type WallNode,
} from '@pascal-app/core'
export const DEFAULT_LEVEL_HEIGHT = 2.5
@@ -75,7 +81,9 @@ export function snapLevelsToTruePositions(): () => void {
entries.sort((a, b) => a.index - b.index)
// Snapshot current Y and visibility so we can restore them after the render
const snapshot = new Map(entries.map(({ levelId, obj }) => [levelId, { y: obj.position.y, visible: obj.visible }]))
const snapshot = new Map(
entries.map(({ levelId, obj }) => [levelId, { y: obj.position.y, visible: obj.visible }]),
)
// Snap to true stacked positions and make all levels visible
let cumulativeY = 0
@@ -14,5 +14,5 @@ export const ScanSystem = () => {
}
})
}, [showScans])
return null;
return null
}
@@ -92,7 +92,7 @@ export const WallCutout = () => {
} else if (wallMode === 'down') {
hideWall = true
} else {
wallMesh.getWorldDirection(v)
wallMesh.getWorldDirection(v)
if (v.dot(u) < 0) {
// Front side
if (wallNode.frontSide === 'exterior' && wallNode.backSide !== 'exterior') {
@@ -16,7 +16,7 @@ export const ZoneSystem = () => {
const pendingZoneRef = useRef<string | null>(null)
const pendingZoneSinceRef = useRef(0)
useFrame(({clock}, delta) => {
useFrame(({ clock }, delta) => {
const hoveredId = useViewer.getState().hoveredId
let rawZone: string | null = null
@@ -35,9 +35,8 @@ export const ZoneSystem = () => {
// Apply non-null immediately; debounce null to filter out brief exits
const age = clock.elapsedTime * 1000 - pendingZoneSinceRef.current
const highlightedZone = rawZone !== null
? rawZone
: age >= EXIT_DEBOUNCE_MS ? null : lastHighlightedZoneRef.current
const highlightedZone =
rawZone !== null ? rawZone : age >= EXIT_DEBOUNCE_MS ? null : lastHighlightedZoneRef.current
// Detect stable zone change
if (highlightedZone !== lastHighlightedZoneRef.current) {
@@ -45,7 +44,7 @@ export const ZoneSystem = () => {
if (lastHighlightedZoneRef.current) {
const prevLabel = document.getElementById(`${lastHighlightedZoneRef.current}-label`)
const pin = prevLabel?.querySelector('.label-pin') as HTMLElement | null
if (pin) pin.style.opacity = '0'
if (pin) pin.style.opacity = '0'
}
// Fade in new zone label-pin
if (highlightedZone) {
@@ -92,7 +91,6 @@ export const ZoneSystem = () => {
const currentOpacity = material.userData.uOpacity.value
material.userData.uOpacity.value = MathUtils.lerp(currentOpacity, targetOpacity, lerpSpeed)
}
})
})