@pascal-app/viewer 1.0.7 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -19
- package/dist/components/viewer/drone-controller.d.ts.map +1 -1
- package/dist/components/viewer/drone-controller.js +1 -5
- package/dist/components/viewer/first-person/build-collider-world.d.ts +14 -0
- package/dist/components/viewer/first-person/build-collider-world.d.ts.map +1 -0
- package/dist/components/viewer/first-person/build-collider-world.js +426 -0
- package/dist/components/viewer/first-person/ground-holes.d.ts +22 -0
- package/dist/components/viewer/first-person/ground-holes.d.ts.map +1 -0
- package/dist/components/viewer/first-person/ground-holes.js +116 -0
- package/dist/components/viewer/first-person/mechanism-targets.d.ts +27 -0
- package/dist/components/viewer/first-person/mechanism-targets.d.ts.map +1 -0
- package/dist/components/viewer/first-person/mechanism-targets.js +79 -0
- package/dist/components/viewer/first-person/terrain-collider.d.ts +32 -0
- package/dist/components/viewer/first-person/terrain-collider.d.ts.map +1 -0
- package/dist/components/viewer/first-person/terrain-collider.js +175 -0
- package/dist/components/viewer/glb-replace-instances.d.ts +6 -3
- package/dist/components/viewer/glb-replace-instances.d.ts.map +1 -1
- package/dist/components/viewer/glb-replace-instances.js +5 -4
- package/dist/components/viewer/glb-scene.d.ts +3 -1
- package/dist/components/viewer/glb-scene.d.ts.map +1 -1
- package/dist/components/viewer/glb-scene.js +2 -1
- package/dist/components/viewer/glb-walkthrough-controller.d.ts +1 -1
- package/dist/components/viewer/glb-walkthrough-controller.d.ts.map +1 -1
- package/dist/components/viewer/glb-walkthrough-controller.js +3 -4
- package/dist/components/viewer/index.d.ts.map +1 -1
- package/dist/components/viewer/index.js +8 -4
- package/dist/components/viewer/live-walkthrough-controller.d.ts +17 -0
- package/dist/components/viewer/live-walkthrough-controller.d.ts.map +1 -0
- package/dist/components/viewer/live-walkthrough-controller.js +1449 -0
- package/dist/components/viewer/post-processing.d.ts.map +1 -1
- package/dist/components/viewer/post-processing.js +22 -1
- package/dist/components/viewer/registered-systems.d.ts.map +1 -1
- package/dist/components/viewer/registered-systems.js +2 -2
- package/dist/components/viewer/unsupported-gpu-fallback.d.ts.map +1 -1
- package/dist/components/viewer/unsupported-gpu-fallback.js +21 -1
- package/dist/components/viewer/use-daylight-rooms.d.ts.map +1 -1
- package/dist/components/viewer/use-daylight-rooms.js +75 -33
- package/dist/hooks/use-gltf-ktx2.d.ts.map +1 -1
- package/dist/hooks/use-gltf-ktx2.js +2 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/lib/asset-url.d.ts +0 -1
- package/dist/lib/asset-url.d.ts.map +1 -1
- package/dist/lib/asset-url.js +3 -3
- package/dist/lib/daylight/room-context.d.ts.map +1 -1
- package/dist/lib/daylight/room-context.js +3 -2
- package/dist/lib/daylight/room-map.d.ts +149 -0
- package/dist/lib/daylight/room-map.d.ts.map +1 -0
- package/dist/lib/daylight/room-map.js +813 -0
- package/dist/lib/daylight/room-scene.d.ts +4 -2
- package/dist/lib/daylight/room-scene.d.ts.map +1 -1
- package/dist/lib/daylight/room-scene.js +81 -40
- package/dist/lib/daylight/rooms.d.ts +71 -32
- package/dist/lib/daylight/rooms.d.ts.map +1 -1
- package/dist/lib/daylight/rooms.js +371 -286
- package/dist/lib/ktx2-loader.d.ts.map +1 -1
- package/dist/lib/ktx2-loader.js +2 -1
- package/dist/lib/measurement-label.d.ts +4 -0
- package/dist/lib/measurement-label.d.ts.map +1 -0
- package/dist/lib/measurement-label.js +54 -0
- package/dist/lib/measurement-presentation.d.ts +7 -0
- package/dist/lib/measurement-presentation.d.ts.map +1 -0
- package/dist/lib/measurement-presentation.js +14 -0
- package/dist/lib/pointer-events.d.ts.map +1 -1
- package/dist/lib/pointer-events.js +3 -3
- package/dist/lib/texture-reference.d.ts.map +1 -1
- package/dist/lib/texture-reference.js +4 -3
- package/dist/lib/typing-target.d.ts +2 -0
- package/dist/lib/typing-target.d.ts.map +1 -0
- package/dist/lib/typing-target.js +7 -0
- package/dist/lib/viewer-config.d.ts +27 -0
- package/dist/lib/viewer-config.d.ts.map +1 -0
- package/dist/lib/viewer-config.js +23 -0
- package/dist/lib/viewer-preference-storage.d.ts +7 -0
- package/dist/lib/viewer-preference-storage.d.ts.map +1 -0
- package/dist/lib/viewer-preference-storage.js +23 -0
- package/dist/sfx/audio-settings.d.ts +81 -0
- package/dist/sfx/audio-settings.d.ts.map +1 -0
- package/dist/sfx/audio-settings.js +166 -0
- package/dist/sfx/index.d.ts +6 -0
- package/dist/sfx/index.d.ts.map +1 -0
- package/dist/sfx/index.js +5 -0
- package/dist/sfx/interaction-sounds.d.ts +7 -0
- package/dist/sfx/interaction-sounds.d.ts.map +1 -0
- package/dist/sfx/interaction-sounds.js +39 -0
- package/dist/sfx/player.d.ts +31 -0
- package/dist/sfx/player.d.ts.map +1 -0
- package/dist/sfx/player.js +255 -0
- package/dist/sfx/sounds.d.ts +60 -0
- package/dist/sfx/sounds.d.ts.map +1 -0
- package/dist/sfx/sounds.js +25 -0
- package/dist/sfx/use-viewer-ui-sounds.d.ts +8 -0
- package/dist/sfx/use-viewer-ui-sounds.d.ts.map +1 -0
- package/dist/sfx/use-viewer-ui-sounds.js +42 -0
- package/dist/store/use-first-person-hud.d.ts +13 -0
- package/dist/store/use-first-person-hud.d.ts.map +1 -0
- package/dist/store/use-first-person-hud.js +21 -0
- package/dist/store/use-viewer.d.ts +2 -56
- package/dist/store/use-viewer.d.ts.map +1 -1
- package/dist/store/use-viewer.js +3 -1
- package/dist/systems/elevator/elevator-interaction-system.d.ts +16 -2
- package/dist/systems/elevator/elevator-interaction-system.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-interaction-system.js +41 -8
- package/dist/systems/geometry/geometry-status.d.ts +8 -0
- package/dist/systems/geometry/geometry-status.d.ts.map +1 -0
- package/dist/systems/geometry/geometry-status.js +24 -0
- package/dist/systems/roof/roof-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-system.js +134 -78
- package/dist/systems/wall/wall-system.d.ts +11 -0
- package/dist/systems/wall/wall-system.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.js +56 -10
- package/dist/ui/components/action-button.d.ts +14 -0
- package/dist/ui/components/action-button.d.ts.map +1 -0
- package/dist/ui/components/action-button.js +21 -0
- package/dist/ui/components/action-menu-placement.d.ts +7 -0
- package/dist/ui/components/action-menu-placement.d.ts.map +1 -0
- package/dist/ui/components/action-menu-placement.js +10 -0
- package/dist/ui/components/floorplan-compass-button.d.ts +10 -0
- package/dist/ui/components/floorplan-compass-button.d.ts.map +1 -0
- package/dist/ui/components/floorplan-compass-button.js +22 -0
- package/dist/ui/components/follow-pascal-toggle.d.ts +6 -0
- package/dist/ui/components/follow-pascal-toggle.d.ts.map +1 -0
- package/dist/ui/components/follow-pascal-toggle.js +21 -0
- package/dist/ui/components/localized-html.d.ts +9 -0
- package/dist/ui/components/localized-html.d.ts.map +1 -0
- package/dist/ui/components/localized-html.js +16 -0
- package/dist/ui/components/render-settings-menu.d.ts +9 -0
- package/dist/ui/components/render-settings-menu.d.ts.map +1 -0
- package/dist/ui/components/render-settings-menu.js +145 -0
- package/dist/ui/components/rooms/room-highlight.d.ts +10 -0
- package/dist/ui/components/rooms/room-highlight.d.ts.map +1 -0
- package/dist/ui/components/rooms/room-highlight.js +56 -0
- package/dist/ui/components/rooms/room-labels.d.ts +278 -0
- package/dist/ui/components/rooms/room-labels.d.ts.map +1 -0
- package/dist/ui/components/rooms/room-labels.js +1295 -0
- package/dist/ui/components/rooms/viewer-rooms.d.ts +14 -0
- package/dist/ui/components/rooms/viewer-rooms.d.ts.map +1 -0
- package/dist/ui/components/rooms/viewer-rooms.js +123 -0
- package/dist/ui/components/scene-loader.d.ts +18 -0
- package/dist/ui/components/scene-loader.d.ts.map +1 -0
- package/dist/ui/components/scene-loader.js +29 -0
- package/dist/ui/components/sky-control.d.ts +37 -0
- package/dist/ui/components/sky-control.d.ts.map +1 -0
- package/dist/ui/components/sky-control.js +382 -0
- package/dist/ui/components/use-viewer-camera-navigation-sync.d.ts +4 -0
- package/dist/ui/components/use-viewer-camera-navigation-sync.d.ts.map +1 -0
- package/dist/ui/components/use-viewer-camera-navigation-sync.js +117 -0
- package/dist/ui/components/viewer-controls-bar.d.ts +20 -0
- package/dist/ui/components/viewer-controls-bar.d.ts.map +1 -0
- package/dist/ui/components/viewer-controls-bar.js +130 -0
- package/dist/ui/components/viewer-hover-label.d.ts +14 -0
- package/dist/ui/components/viewer-hover-label.d.ts.map +1 -0
- package/dist/ui/components/viewer-hover-label.js +28 -0
- package/dist/ui/components/viewer-scene-header.d.ts +34 -0
- package/dist/ui/components/viewer-scene-header.d.ts.map +1 -0
- package/dist/ui/components/viewer-scene-header.js +92 -0
- package/dist/ui/components/viewer-selection-manager.d.ts +7 -0
- package/dist/ui/components/viewer-selection-manager.d.ts.map +1 -0
- package/dist/ui/components/viewer-selection-manager.js +116 -0
- package/dist/ui/components/viewer-stage-modes.d.ts +7 -0
- package/dist/ui/components/viewer-stage-modes.d.ts.map +1 -0
- package/dist/ui/components/viewer-stage-modes.js +42 -0
- package/dist/ui/components/viewer-stage-switcher.d.ts +10 -0
- package/dist/ui/components/viewer-stage-switcher.d.ts.map +1 -0
- package/dist/ui/components/viewer-stage-switcher.js +16 -0
- package/dist/ui/components/viewer-stage.d.ts +25 -0
- package/dist/ui/components/viewer-stage.d.ts.map +1 -0
- package/dist/ui/components/viewer-stage.js +107 -0
- package/dist/ui/components/walkthrough-hud.d.ts +29 -0
- package/dist/ui/components/walkthrough-hud.d.ts.map +1 -0
- package/dist/ui/components/walkthrough-hud.js +55 -0
- package/dist/ui/floorplan/floorplan-camera-sync.d.ts +22 -0
- package/dist/ui/floorplan/floorplan-camera-sync.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-camera-sync.js +157 -0
- package/dist/ui/floorplan/floorplan-dimension-renderer.d.ts +61 -0
- package/dist/ui/floorplan/floorplan-dimension-renderer.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-dimension-renderer.js +280 -0
- package/dist/ui/floorplan/floorplan-geometry-renderer.d.ts +54 -0
- package/dist/ui/floorplan/floorplan-geometry-renderer.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-geometry-renderer.js +317 -0
- package/dist/ui/floorplan/floorplan-label-angle.d.ts +24 -0
- package/dist/ui/floorplan/floorplan-label-angle.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-label-angle.js +60 -0
- package/dist/ui/floorplan/floorplan-navigation-sync.d.ts +18 -0
- package/dist/ui/floorplan/floorplan-navigation-sync.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-navigation-sync.js +41 -0
- package/dist/ui/floorplan/floorplan-preview-geometry.d.ts +26 -0
- package/dist/ui/floorplan/floorplan-preview-geometry.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-preview-geometry.js +173 -0
- package/dist/ui/floorplan/floorplan-preview-navigation.d.ts +22 -0
- package/dist/ui/floorplan/floorplan-preview-navigation.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-preview-navigation.js +41 -0
- package/dist/ui/floorplan/floorplan-preview-visibility.d.ts +8 -0
- package/dist/ui/floorplan/floorplan-preview-visibility.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-preview-visibility.js +21 -0
- package/dist/ui/floorplan/floorplan-preview.d.ts +19 -0
- package/dist/ui/floorplan/floorplan-preview.d.ts.map +1 -0
- package/dist/ui/floorplan/floorplan-preview.js +700 -0
- package/dist/ui/hooks/use-mobile.d.ts +2 -0
- package/dist/ui/hooks/use-mobile.d.ts.map +1 -0
- package/dist/ui/hooks/use-mobile.js +14 -0
- package/dist/ui/index.d.ts +49 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +48 -0
- package/dist/ui/lib/below-grade.d.ts +38 -0
- package/dist/ui/lib/below-grade.d.ts.map +1 -0
- package/dist/ui/lib/below-grade.js +102 -0
- package/dist/ui/lib/camera-pose.d.ts +19 -0
- package/dist/ui/lib/camera-pose.d.ts.map +1 -0
- package/dist/ui/lib/camera-pose.js +113 -0
- package/dist/ui/lib/cn.d.ts +3 -0
- package/dist/ui/lib/cn.d.ts.map +1 -0
- package/dist/ui/lib/cn.js +5 -0
- package/dist/ui/lib/level-name.d.ts +10 -0
- package/dist/ui/lib/level-name.d.ts.map +1 -0
- package/dist/ui/lib/level-name.js +33 -0
- package/dist/ui/lib/node-display-label.d.ts +8 -0
- package/dist/ui/lib/node-display-label.d.ts.map +1 -0
- package/dist/ui/lib/node-display-label.js +36 -0
- package/dist/ui/lib/room-area.d.ts +3 -0
- package/dist/ui/lib/room-area.d.ts.map +1 -0
- package/dist/ui/lib/room-area.js +8 -0
- package/dist/ui/lib/room-assembly-overlay.d.ts +46 -0
- package/dist/ui/lib/room-assembly-overlay.d.ts.map +1 -0
- package/dist/ui/lib/room-assembly-overlay.js +222 -0
- package/dist/ui/lib/room-name-messages.d.ts +28 -0
- package/dist/ui/lib/room-name-messages.d.ts.map +1 -0
- package/dist/ui/lib/room-name-messages.js +112 -0
- package/dist/ui/lib/room-selection.d.ts +58 -0
- package/dist/ui/lib/room-selection.d.ts.map +1 -0
- package/dist/ui/lib/room-selection.js +297 -0
- package/dist/ui/lib/scene-theme-name.d.ts +4 -0
- package/dist/ui/lib/scene-theme-name.d.ts.map +1 -0
- package/dist/ui/lib/scene-theme-name.js +22 -0
- package/dist/ui/lib/selection-modifiers.d.ts +20 -0
- package/dist/ui/lib/selection-modifiers.d.ts.map +1 -0
- package/dist/ui/lib/selection-modifiers.js +15 -0
- package/dist/ui/lib/viewer-selection.d.ts +132 -0
- package/dist/ui/lib/viewer-selection.d.ts.map +1 -0
- package/dist/ui/lib/viewer-selection.js +462 -0
- package/dist/ui/lib/zone-content.d.ts +6 -0
- package/dist/ui/lib/zone-content.d.ts.map +1 -0
- package/dist/ui/lib/zone-content.js +96 -0
- package/dist/ui/primitives/button.d.ts +11 -0
- package/dist/ui/primitives/button.d.ts.map +1 -0
- package/dist/ui/primitives/button.js +35 -0
- package/dist/ui/primitives/dropdown-menu.d.ts +26 -0
- package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/primitives/dropdown-menu.js +53 -0
- package/dist/ui/primitives/popover.d.ts +8 -0
- package/dist/ui/primitives/popover.d.ts.map +1 -0
- package/dist/ui/primitives/popover.js +17 -0
- package/dist/ui/primitives/switch.d.ts +5 -0
- package/dist/ui/primitives/switch.d.ts.map +1 -0
- package/dist/ui/primitives/switch.js +8 -0
- package/dist/ui/primitives/tooltip.d.ts +8 -0
- package/dist/ui/primitives/tooltip.d.ts.map +1 -0
- package/dist/ui/primitives/tooltip.js +17 -0
- package/dist/ui/store/camera-pose-store.d.ts +17 -0
- package/dist/ui/store/camera-pose-store.d.ts.map +1 -0
- package/dist/ui/store/camera-pose-store.js +15 -0
- package/dist/ui/store/navigation-sync-pose-store.d.ts +26 -0
- package/dist/ui/store/navigation-sync-pose-store.d.ts.map +1 -0
- package/dist/ui/store/navigation-sync-pose-store.js +16 -0
- package/dist/ui/store/use-follow-pascal.d.ts +30 -0
- package/dist/ui/store/use-follow-pascal.d.ts.map +1 -0
- package/dist/ui/store/use-follow-pascal.js +28 -0
- package/dist/ui/theme.css +339 -0
- package/package.json +34 -7
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which room a point is in, at any scale: a sparse, tiled room-id map.
|
|
3
|
+
*
|
|
4
|
+
* Every level keeps its own map of 10 cm cells, cut into square tiles. A tile entirely inside one
|
|
5
|
+
* room (or outside every room) is a single value; only tiles a room edge crosses keep their cells,
|
|
6
|
+
* packed into one shared atlas. A level's rooms are grouped into clusters, each with its own tile
|
|
7
|
+
* rect, so open ground between distant rooms costs nothing. Memory then follows the length of the
|
|
8
|
+
* walls, not the site's area, and no texture grows with the number of floors. Tiles are built one
|
|
9
|
+
* at a time, so neither does the build.
|
|
10
|
+
*
|
|
11
|
+
* A point finds its level by height within its own building (a coarse directory lists the
|
|
12
|
+
* buildings near it), so neighbouring buildings with different floor heights, or a 40-storey
|
|
13
|
+
* tower, each keep their floors. Within a building, levels sorted by height stay sorted when they
|
|
14
|
+
* explode apart, so the search runs on live heights.
|
|
15
|
+
*
|
|
16
|
+
* Each building's map is turned to its own walls: its cells run along the direction most of its
|
|
17
|
+
* room edges take, so a house drawn at 40° to the world reads exactly like the same house drawn
|
|
18
|
+
* square. Walls at other angles within a building still cross the cells in steps.
|
|
19
|
+
*/
|
|
20
|
+
type N = any;
|
|
21
|
+
export declare const CELL = 0.1;
|
|
22
|
+
/** Cells per tile side. */
|
|
23
|
+
export declare const TILE = 16;
|
|
24
|
+
/** Room ids are stored as two bytes (id + 1). */
|
|
25
|
+
export declare const MAX_ROOMS = 65535;
|
|
26
|
+
/** WebGPU guarantees 8192 texels a side; the renderer asks for no more. */
|
|
27
|
+
export declare const DEFAULT_TEXTURE_LIMIT = 8192;
|
|
28
|
+
export type MapLevel = {
|
|
29
|
+
/** World Y of the level's floor, assembled (not exploded). */
|
|
30
|
+
y: number;
|
|
31
|
+
/** Index of the level's building; levels of one building stack. */
|
|
32
|
+
building: number;
|
|
33
|
+
};
|
|
34
|
+
export type MapRoom = {
|
|
35
|
+
level: number;
|
|
36
|
+
/** World XZ. */
|
|
37
|
+
polygon: [number, number][];
|
|
38
|
+
holes?: [number, number][][];
|
|
39
|
+
};
|
|
40
|
+
/** A level's walls in plan: triangles of their footprints, six numbers each (world XZ × 3). */
|
|
41
|
+
export type MapWalls = {
|
|
42
|
+
level: number;
|
|
43
|
+
triangles: ArrayLike<number>;
|
|
44
|
+
};
|
|
45
|
+
/** One tile while it is being built, inside its row's dilated cells (with a margin all round). */
|
|
46
|
+
export type TileCells = {
|
|
47
|
+
level: number;
|
|
48
|
+
/** Site cell index of `cells[0]`. */
|
|
49
|
+
ci0: number;
|
|
50
|
+
cj0: number;
|
|
51
|
+
/** XZ of `cells[0]`'s lower corner, in the building's turned frame. */
|
|
52
|
+
x0: number;
|
|
53
|
+
z0: number;
|
|
54
|
+
/** The frame's turn [cos, sin]: world x = x·cos − z·sin, world z = x·sin + z·cos. */
|
|
55
|
+
turn: [number, number];
|
|
56
|
+
/** Cells per buffer row. */
|
|
57
|
+
stride: number;
|
|
58
|
+
/** The tile's first cell in the buffer. */
|
|
59
|
+
i0: number;
|
|
60
|
+
j0: number;
|
|
61
|
+
/** Room index + 1 per cell, 0 outside. */
|
|
62
|
+
cells: Uint16Array;
|
|
63
|
+
/** Every cell of the tile itself holds the same value (no edge inside). */
|
|
64
|
+
uniform: boolean;
|
|
65
|
+
};
|
|
66
|
+
export declare class RoomMap {
|
|
67
|
+
/** The device's largest 2D texture side; set before `build`. */
|
|
68
|
+
textureLimit: number;
|
|
69
|
+
private levels;
|
|
70
|
+
/** Level indices sorted by building, then height: the order the GPU searches in. */
|
|
71
|
+
private order;
|
|
72
|
+
private position;
|
|
73
|
+
/** Per building: its range in `order`. */
|
|
74
|
+
private buildingRange;
|
|
75
|
+
/** Per building: the turn [cos, sin] that lays its walls along the cells. */
|
|
76
|
+
private turns;
|
|
77
|
+
private originX;
|
|
78
|
+
private originZ;
|
|
79
|
+
/** The directory's corner: it stays on the world axes, whatever the buildings' turns. */
|
|
80
|
+
private dirX;
|
|
81
|
+
private dirZ;
|
|
82
|
+
private dirTiles;
|
|
83
|
+
private dirW;
|
|
84
|
+
private dirH;
|
|
85
|
+
/** Per directory cell: the buildings whose rooms reach it. */
|
|
86
|
+
private dirLists;
|
|
87
|
+
private atlas;
|
|
88
|
+
private atlasTilesW;
|
|
89
|
+
private atlasTiles;
|
|
90
|
+
private indexBytes;
|
|
91
|
+
private warnedOverflow;
|
|
92
|
+
readonly u: {
|
|
93
|
+
origin: N;
|
|
94
|
+
dirOrigin: N;
|
|
95
|
+
/** The only building's turn (with `single`). */
|
|
96
|
+
turn: N;
|
|
97
|
+
dirTiles: import("three/webgpu").UniformNode<"int", number>;
|
|
98
|
+
dirW: import("three/webgpu").UniformNode<"int", number>;
|
|
99
|
+
dirH: import("three/webgpu").UniformNode<"int", number>;
|
|
100
|
+
/** One building: its level range is the only candidate (no directory reads). */
|
|
101
|
+
single: import("three/webgpu").UniformNode<"int", number>;
|
|
102
|
+
singleCount: import("three/webgpu").UniformNode<"int", number>;
|
|
103
|
+
/** Binary-search steps for the tallest building. */
|
|
104
|
+
searchSteps: import("three/webgpu").UniformNode<"int", number>;
|
|
105
|
+
atlasTilesW: import("three/webgpu").UniformNode<"int", number>;
|
|
106
|
+
indexW: import("three/webgpu").UniformNode<"int", number>;
|
|
107
|
+
index: N;
|
|
108
|
+
levels: N;
|
|
109
|
+
atlas: N;
|
|
110
|
+
};
|
|
111
|
+
private levelData;
|
|
112
|
+
/**
|
|
113
|
+
* Rebuild from rooms. `onTile` sees every built tile (the doorway search walks room edges).
|
|
114
|
+
* `walls` keep a room from growing out through them: a wall's far side stays outside.
|
|
115
|
+
*/
|
|
116
|
+
build(levels: MapLevel[], rooms: MapRoom[], onTile?: (tile: TileCells) => void, walls?: MapWalls[]): void;
|
|
117
|
+
/** CPU lookup in assembled space (same rule as the shader). */
|
|
118
|
+
roomAt(x: number, y: number, z: number): number;
|
|
119
|
+
/**
|
|
120
|
+
* A level's room at a point of its building's frame; clusters' rects can overlap (a wing around
|
|
121
|
+
* a courtyard pavilion).
|
|
122
|
+
*/
|
|
123
|
+
private levelRoomAt;
|
|
124
|
+
/** The level stacked right above `level` in its building, or −1. */
|
|
125
|
+
levelAbove(level: number): number;
|
|
126
|
+
/** Index the GPU uses for `level` (rooms store it). */
|
|
127
|
+
gpuLevel(level: number): number;
|
|
128
|
+
/**
|
|
129
|
+
* Live presentation per level (input order): explode offset, whether it is shown, and whether
|
|
130
|
+
* the levels over it are hidden (its rooms open to the sky from above).
|
|
131
|
+
*/
|
|
132
|
+
setPresentation(offsets: number[], shown: boolean[], focused: boolean[]): void;
|
|
133
|
+
memoryBytes(): number;
|
|
134
|
+
get stats(): {
|
|
135
|
+
atlasTiles: number;
|
|
136
|
+
dirW: number;
|
|
137
|
+
dirH: number;
|
|
138
|
+
};
|
|
139
|
+
private upload;
|
|
140
|
+
private indexTexel;
|
|
141
|
+
/** [liveY, clusterStart, clusterCount, 0] of the level at GPU position `pos`. */
|
|
142
|
+
levelTexel0(pos: N): N;
|
|
143
|
+
/** [0, 0, offset, flags] of the level at GPU position `pos`. */
|
|
144
|
+
levelTexel1(pos: N): N;
|
|
145
|
+
/** Room index (−1 outside) at a world-space position (live heights). */
|
|
146
|
+
roomAtNode: import("three/tsl").FnNode<[any], import("three/webgpu").VarNode<"int", import("three/webgpu").ConstNode<"int", number>>>;
|
|
147
|
+
}
|
|
148
|
+
export {};
|
|
149
|
+
//# sourceMappingURL=room-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-map.d.ts","sourceRoot":"","sources":["../../../src/lib/daylight/room-map.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,KAAK,CAAC,GAAG,GAAG,CAAA;AAEZ,eAAO,MAAM,IAAI,MAAM,CAAA;AACvB,2BAA2B;AAC3B,eAAO,MAAM,IAAI,KAAK,CAAA;AAgBtB,iDAAiD;AACjD,eAAO,MAAM,SAAS,QAAQ,CAAA;AAC9B,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,OAAO,CAAA;AAEzC,MAAM,MAAM,QAAQ,GAAG;IACrB,8DAA8D;IAC9D,CAAC,EAAE,MAAM,CAAA;IACT,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB;IAChB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IAC3B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAA;CAC7B,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,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