-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathindex.ts
More file actions
249 lines (248 loc) · 8.86 KB
/
Copy pathindex.ts
File metadata and controls
249 lines (248 loc) · 8.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
// `NodeRenderer` is the recursive dispatch component used by parent
// renderers (wall renders doors/windows, slab renders hosted items).
// Public so registry-driven kinds can compose children without reaching
// into viewer's internal paths.
export type { SurfaceRole } from '@pascal-app/core'
export { ErrorBoundary } from './components/error-boundary'
// Stage A wrap-exports for the rest of the kinds — `@pascal-app/nodes`
// registers each via `def.renderer` (and `def.system` when present)
// Generic dispatch component used by recursive renderers (e.g. level →
// children, building → children). The per-kind renderers live in
// `@pascal-app/nodes/<kind>/renderer.tsx` and are loaded by the registry
// — no per-kind re-exports needed.
export { NodeRenderer } from './components/renderers/node-renderer'
export { default as Viewer, type ViewerHandle } from './components/viewer'
export {
type BVHEcctrlApi,
default as BVHEcctrl,
type MovementInput,
} from './components/viewer/bvh-ecctrl'
export {
buildGlbInteractiveItems,
GlbInteractive,
type GlbInteractiveItem,
} from './components/viewer/glb-interactive'
export {
buildGlbReferenceNodes,
buildGlbReplaceNodes,
} from './components/viewer/glb-reference-nodes'
export {
type GlbHover,
type GlbIdentity,
type GlbLevel,
GlbScene,
type GlbWalkthrough,
} from './components/viewer/glb-scene'
export {
CROUCH_CAPSULE,
CROUCH_EYE_OFFSET,
CROUCH_FLOAT_HEIGHT,
CROUCH_RUN_SPEED,
CROUCH_WALK_SPEED,
EYE_LERP_SPEED,
GlbWalkthroughController,
STAND_CAPSULE,
STAND_CLEARANCE,
STAND_FLOAT_HEIGHT,
WALKTHROUGH_FOV,
} from './components/viewer/glb-walkthrough-controller'
export type { HoverStyle, HoverStyles } from './components/viewer/post-processing'
export {
DEFAULT_HOVER_STYLES,
SSGI_PARAMS,
} from './components/viewer/post-processing'
export { SceneEnvironment } from './components/viewer/scene-environment'
export { useAssetUrl } from './hooks/use-asset-url'
export { useGLTFKTX2 } from './hooks/use-gltf-ktx2'
export { useNodeEvents } from './hooks/use-node-events'
export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url'
export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop'
export { applyWorldScaleBoxUVs } from './lib/box-uv'
// CSG primitives — used by chimney's roof-trim and other kinds whose
// geometry subtracts pieces against their host. Lives in viewer
// because three-bvh-csg / three-mesh-bvh are viewer-only deps.
export {
ADDITION,
Brush,
computeGeometryBoundsTree,
csgEvaluator,
csgGeometry,
csgMaterials,
INTERSECTION,
prepareBrushForCSG,
SUBTRACTION,
} from './lib/csg-utils'
export type { EdgeMode } from './lib/edge-style'
export {
computeHeroFraming,
DEFAULT_FRAMING_EXCLUDED_TYPES,
type HeroFraming,
heroCameraPose,
temporarilyHideNodeTypes,
unionRegisteredNodeBounds,
} from './lib/hero-pose'
export {
applyIsolation,
clearIsolation,
collectIsolationSubtree,
isIsolationActive,
} from './lib/isolation'
export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader'
export { GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, ZONE_LAYER } from './lib/layers'
export {
applyMaterialPresetToMaterials,
BLUEPRINT_PALETTE,
baseMaterial,
CLAY_PALETTE,
type ColorPreset,
clearMaterialCache,
createDefaultMaterial,
createMaterial,
createMaterialFromPresetRef,
createSurfaceRoleMaterial,
DEFAULT_CEILING_MATERIAL,
DEFAULT_DOOR_MATERIAL,
DEFAULT_ROOF_MATERIAL,
DEFAULT_SHELF_MATERIAL,
DEFAULT_SLAB_MATERIAL,
DEFAULT_STAIR_MATERIAL,
DEFAULT_WALL_MATERIAL,
DEFAULT_WINDOW_MATERIAL,
disposeMaterial,
glassMaterial,
MONO_PALETTE,
PRESET_PALETTES,
type RenderShading,
resolveMaterialRef,
resolveSlotDefaultMaterial,
resolveSurfaceColor,
WHITE_PALETTE,
} from './lib/materials'
export { mergedOutline } from './lib/merged-outline-node'
export { unionPolygons } from './lib/polygon-union'
export {
detectRendererCapability,
initializeGpuRenderer,
type RendererBackendParameters,
type RendererCapability,
type RendererCapabilityCanvas,
type RendererInitializationResult,
type RendererPowerPreference,
} from './lib/renderer-capability'
export {
getSceneTheme,
SCENE_THEME_IDS,
SCENE_THEMES,
type SceneTheme,
} from './lib/scene-themes'
export {
createSnapshotPipeline,
type SnapshotCaptureMode,
type SnapshotCaptureResult,
type SnapshotCropRegion,
type SnapshotPipeline,
type SnapshotSize,
THUMBNAIL_HEIGHT,
THUMBNAIL_WIDTH,
} from './lib/snapshot-pipeline'
export {
buildTerrainPerimeterFillGeometry,
type TerrainPerimeterPoint,
} from './lib/terrain-perimeter-fill'
export {
getPascalTextureRef,
type PascalTextureColorSpace,
type PascalTextureMap,
type PascalTextureRef,
stampPascalTextureRef,
textureMapForSlot,
} from './lib/texture-reference'
export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat'
export { useItemLightPool } from './store/use-item-light-pool'
export {
applyCountryUnitDefault,
default as useViewer,
type MetricNotation,
type WallMode,
} from './store/use-viewer'
export { CeilingSystem } from './systems/ceiling/ceiling-system'
export {
createColumnBoxGeometry,
createColumnCylinderGeometry,
createColumnSphereGeometry,
createColumnTorusGeometry,
} from './systems/column/column-geometry'
export { DoorAnimationSystem } from './systems/door/door-animation-system'
export { buildDoorPreviewMesh, DoorSystem, poseDoorMovingParts } from './systems/door/door-system'
export { ElevatorInteractionSystem } from './systems/elevator/elevator-interaction-system'
// Fence system follows the wall re-export pattern — composed into the
// registry-driven fence definition's `def.system`. Removed in Phase 6
// alongside the legacy fence mount point.
export {
FenceSystem,
generateFenceGeometry,
generateFenceSlotGeometries,
} from './systems/fence/fence-system'
// Generic floor-elevation system. Lifts the rendered mesh of any kind
// whose definition declares `capabilities.floorPlaced` by the slab
// elevation under its footprint. Replaces the per-kind elevation block
// that used to live inside `ItemSystem`.
export { FloorElevationSystem } from './systems/floor-elevation/floor-elevation-system'
export { GuideSystem } from './systems/guide/guide-system'
export { InteractiveSystem } from './systems/interactive/interactive-system'
// Item systems for the registry-driven item definition. ItemSystem
// applies attachTo-driven transforms each frame; ItemLightSystem
// manages item-mounted light sources.
export { ItemSystem } from './systems/item/item-system'
export { ItemLightSystem } from './systems/item-light/item-light-system'
export { LevelSystem } from './systems/level/level-system'
export { snapLevelsToTruePositions } from './systems/level/level-utils'
export { getRoofMaterialArray } from './systems/roof/roof-materials'
// Generic roof-segment primitives. Kinds that compose CSG against
// the roof shell (chimney's self-trim, dormer's virtual-segment cut)
// read these through the public surface. No kind-specific helpers
// belong here — those live in `@pascal-app/nodes/<kind>/`.
export {
clipGeometryBySegmentTrim,
generateRoofSegmentGeometry,
getRoofOuterSurfaceFrameAtPoint,
getRoofSegmentBrushes,
mapRoofGroupMaterialIndex,
ROOF_MATERIAL_SLOT_COUNT,
RoofSystem,
remapRoofShellFaces,
roofCsgDummyMats,
type SurfaceFrame,
} from './systems/roof/roof-system'
export { ScanSystem } from './systems/scan/scan-system'
// Pure slab geometry generator — composed into the registry-driven slab
// definition's `def.geometry` in `@pascal-app/nodes`.
export { generateSlabGeometry } from './systems/slab/slab-system'
export {
getStairBodyMaterials,
getStairRailingMaterial,
getStraightStairSegmentBodyMaterials,
type StairBodyMaterials,
} from './systems/stair/stair-materials'
export { StairSystem } from './systems/stair/stair-system'
// Pure opening-cutout profile math shared by the wall CSG pipeline and
// roof-wall opening cuts in `@pascal-app/nodes` — keeps shaped holes
// (arch / rounded / frameless opening) identical across both hosts.
export {
buildOpeningCutoutGeometry,
getOpeningCutoutBottomPadding,
hasFlatOpeningCutoutBottom,
} from './systems/wall/opening-cutout-geometry'
export { getWallHideState, WallCutout } from './systems/wall/wall-cutout'
export { getVisibleWallMaterials } from './systems/wall/wall-materials'
// Wall internals re-exported so `@pascal-app/nodes`' registry-driven wall
// definition can compose them into `def.system` without duplicating the
// 800+ lines of CSG / mitering logic during Phase 3. These exports are
// removed in Phase 6 when the legacy mount points are deleted.
export { WallSystem } from './systems/wall/wall-system'
export {
poseWindowMovingParts,
WindowAnimationSystem,
} from './systems/window/window-animation-system'
export { buildWindowPreviewMesh, WindowSystem } from './systems/window/window-system'
export { ZoneSystem } from './systems/zone/zone-system'