@pascal-app/viewer 1.0.0-beta.4 → 1.0.0
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/LICENSE +21 -0
- package/README.md +107 -0
- package/dist/capture/asset-url.d.ts +2 -0
- package/dist/capture/asset-url.d.ts.map +1 -0
- package/dist/capture/asset-url.js +13 -0
- package/dist/capture/capture-runtime.d.ts +43 -0
- package/dist/capture/capture-runtime.d.ts.map +1 -0
- package/dist/capture/capture-runtime.js +228 -0
- package/dist/capture/frame.d.ts +4 -0
- package/dist/capture/frame.d.ts.map +1 -0
- package/dist/capture/frame.js +21 -0
- package/dist/capture/index.d.ts +12 -0
- package/dist/capture/index.d.ts.map +1 -0
- package/dist/capture/index.js +11 -0
- package/dist/capture/layer-visibility.d.ts +5 -0
- package/dist/capture/layer-visibility.d.ts.map +1 -0
- package/dist/capture/layer-visibility.js +11 -0
- package/dist/capture/layers/clay-matcap.d.ts +3 -0
- package/dist/capture/layers/clay-matcap.d.ts.map +1 -0
- package/dist/capture/layers/clay-matcap.js +26 -0
- package/dist/capture/layers/device-motion-layer.d.ts +7 -0
- package/dist/capture/layers/device-motion-layer.d.ts.map +1 -0
- package/dist/capture/layers/device-motion-layer.js +78 -0
- package/dist/capture/layers/point-cloud-layer.d.ts +15 -0
- package/dist/capture/layers/point-cloud-layer.d.ts.map +1 -0
- package/dist/capture/layers/point-cloud-layer.js +106 -0
- package/dist/capture/layers/room-model-layer.d.ts +9 -0
- package/dist/capture/layers/room-model-layer.d.ts.map +1 -0
- package/dist/capture/layers/room-model-layer.js +71 -0
- package/dist/capture/layers/surface-mesh-data.d.ts +9 -0
- package/dist/capture/layers/surface-mesh-data.d.ts.map +1 -0
- package/dist/capture/layers/surface-mesh-data.js +74 -0
- package/dist/capture/layers/surface-mesh-layer.d.ts +7 -0
- package/dist/capture/layers/surface-mesh-layer.d.ts.map +1 -0
- package/dist/capture/layers/surface-mesh-layer.js +16 -0
- package/dist/capture/preview.d.ts +3 -0
- package/dist/capture/preview.d.ts.map +1 -0
- package/dist/capture/preview.js +2 -0
- package/dist/capture/source-state.d.ts +22 -0
- package/dist/capture/source-state.d.ts.map +1 -0
- package/dist/capture/source-state.js +182 -0
- package/dist/capture/stream-rendering.d.ts +14 -0
- package/dist/capture/stream-rendering.d.ts.map +1 -0
- package/dist/capture/stream-rendering.js +69 -0
- package/dist/capture/trajectory.d.ts +20 -0
- package/dist/capture/trajectory.d.ts.map +1 -0
- package/dist/capture/trajectory.js +77 -0
- package/dist/components/viewer/batched-mesh-spike.d.ts +14 -0
- package/dist/components/viewer/batched-mesh-spike.d.ts.map +1 -0
- package/dist/components/viewer/batched-mesh-spike.js +64 -0
- package/dist/components/viewer/frame-limiter.d.ts +11 -0
- package/dist/components/viewer/frame-limiter.d.ts.map +1 -1
- package/dist/components/viewer/frame-limiter.js +59 -18
- package/dist/components/viewer/index.d.ts +15 -0
- package/dist/components/viewer/index.d.ts.map +1 -1
- package/dist/components/viewer/index.js +74 -82
- package/dist/components/viewer/lights.d.ts.map +1 -1
- package/dist/components/viewer/lights.js +123 -89
- package/dist/components/viewer/perf-monitor.d.ts +6 -1
- package/dist/components/viewer/perf-monitor.d.ts.map +1 -1
- package/dist/components/viewer/perf-monitor.js +306 -115
- package/dist/components/viewer/perf-panel.d.ts +3 -0
- package/dist/components/viewer/perf-panel.d.ts.map +1 -0
- package/dist/components/viewer/perf-panel.js +178 -0
- package/dist/components/viewer/pointer-raycast-layers.d.ts +15 -0
- package/dist/components/viewer/pointer-raycast-layers.d.ts.map +1 -0
- package/dist/components/viewer/pointer-raycast-layers.js +28 -0
- package/dist/components/viewer/post-processing.d.ts.map +1 -1
- package/dist/components/viewer/post-processing.js +124 -83
- package/dist/components/viewer/registered-systems.d.ts +14 -5
- package/dist/components/viewer/registered-systems.d.ts.map +1 -1
- package/dist/components/viewer/registered-systems.js +22 -10
- package/dist/components/viewer/scene-atmosphere.d.ts +30 -0
- package/dist/components/viewer/scene-atmosphere.d.ts.map +1 -0
- package/dist/components/viewer/scene-atmosphere.js +89 -0
- package/dist/components/viewer/scene-environment.d.ts.map +1 -1
- package/dist/components/viewer/scene-environment.js +19 -5
- package/dist/components/viewer/scene-ground-replacement.d.ts +5 -0
- package/dist/components/viewer/scene-ground-replacement.d.ts.map +1 -0
- package/dist/components/viewer/scene-ground-replacement.js +35 -0
- package/dist/components/viewer/selection-manager.d.ts.map +1 -1
- package/dist/components/viewer/selection-manager.js +7 -2
- package/dist/components/viewer/unsupported-gpu-fallback.d.ts +2 -0
- package/dist/components/viewer/unsupported-gpu-fallback.d.ts.map +1 -0
- package/dist/components/viewer/unsupported-gpu-fallback.js +4 -0
- package/dist/components/viewer/viewer-camera.d.ts.map +1 -1
- package/dist/components/viewer/viewer-camera.js +4 -1
- package/dist/components/viewer/viewer-presentations.d.ts +67 -0
- package/dist/components/viewer/viewer-presentations.d.ts.map +1 -0
- package/dist/components/viewer/viewer-presentations.js +120 -0
- package/dist/hooks/use-library-materials-version.d.ts +7 -0
- package/dist/hooks/use-library-materials-version.d.ts.map +1 -0
- package/dist/hooks/use-library-materials-version.js +10 -0
- package/dist/hooks/use-node-events.d.ts.map +1 -1
- package/dist/hooks/use-node-events.js +1 -0
- package/dist/index.d.ts +20 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -7
- package/dist/lib/csg-utils.d.ts +1 -0
- package/dist/lib/csg-utils.d.ts.map +1 -1
- package/dist/lib/csg-utils.js +6 -1
- package/dist/lib/dispose-object3d.d.ts +4 -0
- package/dist/lib/dispose-object3d.d.ts.map +1 -0
- package/dist/lib/dispose-object3d.js +27 -0
- package/dist/lib/geometry-groups.d.ts +17 -0
- package/dist/lib/geometry-groups.d.ts.map +1 -0
- package/dist/lib/geometry-groups.js +53 -0
- package/dist/lib/gpu-perf.d.ts +0 -2
- package/dist/lib/gpu-perf.d.ts.map +1 -1
- package/dist/lib/gpu-perf.js +7 -21
- package/dist/lib/isolation.d.ts +8 -8
- package/dist/lib/isolation.d.ts.map +1 -1
- package/dist/lib/isolation.js +18 -30
- package/dist/lib/layer-pass.d.ts +28 -0
- package/dist/lib/layer-pass.d.ts.map +1 -0
- package/dist/lib/layer-pass.js +254 -0
- package/dist/lib/layers.d.ts +16 -0
- package/dist/lib/layers.d.ts.map +1 -1
- package/dist/lib/layers.js +18 -0
- package/dist/lib/materials.d.ts +12 -0
- package/dist/lib/materials.d.ts.map +1 -1
- package/dist/lib/materials.js +51 -17
- package/dist/lib/merged-outline-node.d.ts +17 -8
- package/dist/lib/merged-outline-node.d.ts.map +1 -1
- package/dist/lib/merged-outline-node.js +194 -52
- package/dist/lib/perf-actions.d.ts +55 -0
- package/dist/lib/perf-actions.d.ts.map +1 -0
- package/dist/lib/perf-actions.js +211 -0
- package/dist/lib/perf-observers.d.ts +2 -0
- package/dist/lib/perf-observers.d.ts.map +1 -0
- package/dist/lib/perf-observers.js +17 -0
- package/dist/lib/perf-panel-store.d.ts +71 -0
- package/dist/lib/perf-panel-store.d.ts.map +1 -0
- package/dist/lib/perf-panel-store.js +29 -0
- package/dist/lib/perf-tracks.d.ts +43 -0
- package/dist/lib/perf-tracks.d.ts.map +1 -0
- package/dist/lib/perf-tracks.js +113 -0
- package/dist/lib/pointer-events.d.ts +7 -0
- package/dist/lib/pointer-events.d.ts.map +1 -0
- package/dist/lib/pointer-events.js +680 -0
- package/dist/lib/post-processing-resources.d.ts +12 -0
- package/dist/lib/post-processing-resources.d.ts.map +1 -0
- package/dist/lib/post-processing-resources.js +19 -0
- package/dist/lib/renderer-capability.d.ts +56 -0
- package/dist/lib/renderer-capability.d.ts.map +1 -0
- package/dist/lib/renderer-capability.js +116 -0
- package/dist/lib/scene-visibility.d.ts +15 -0
- package/dist/lib/scene-visibility.d.ts.map +1 -0
- package/dist/lib/scene-visibility.js +69 -0
- package/dist/lib/shadow-only.d.ts +16 -0
- package/dist/lib/shadow-only.d.ts.map +1 -1
- package/dist/lib/shadow-only.js +8 -17
- package/dist/lib/snapshot-pipeline.d.ts +9 -0
- package/dist/lib/snapshot-pipeline.d.ts.map +1 -1
- package/dist/lib/snapshot-pipeline.js +33 -9
- package/dist/store/use-viewer.d.ts +7 -6
- package/dist/store/use-viewer.d.ts.map +1 -1
- package/dist/systems/ceiling/ceiling-system.js +1 -1
- package/dist/systems/door/door-animation-system.d.ts.map +1 -1
- package/dist/systems/door/door-animation-system.js +6 -9
- package/dist/systems/door/door-system.d.ts.map +1 -1
- package/dist/systems/door/door-system.js +13 -2
- package/dist/systems/floor-elevation/floor-elevation-system.d.ts.map +1 -1
- package/dist/systems/floor-elevation/floor-elevation-system.js +9 -0
- package/dist/systems/geometry/geometry-system.d.ts.map +1 -1
- package/dist/systems/geometry/geometry-system.js +5 -28
- package/dist/systems/level/level-system.d.ts.map +1 -1
- package/dist/systems/level/level-system.js +8 -2
- package/dist/systems/level/level-utils.d.ts +9 -0
- package/dist/systems/level/level-utils.d.ts.map +1 -1
- package/dist/systems/level/level-utils.js +14 -0
- package/dist/systems/perf-action-settle/perf-action-settle-system.d.ts +8 -0
- package/dist/systems/perf-action-settle/perf-action-settle-system.d.ts.map +1 -0
- package/dist/systems/perf-action-settle/perf-action-settle-system.js +32 -0
- package/dist/systems/roof/roof-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-system.js +1196 -58
- package/dist/systems/scan/scan-system.js +6 -5
- package/dist/systems/slab/slab-system.d.ts.map +1 -1
- package/dist/systems/slab/slab-system.js +1 -2
- package/dist/systems/stair/stair-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-system.js +9 -8
- package/dist/systems/surface-hole-geometry.d.ts +1 -1
- package/dist/systems/surface-hole-geometry.d.ts.map +1 -1
- package/dist/systems/surface-hole-geometry.js +1 -1
- package/dist/systems/wall/level-miter-cache.d.ts +10 -0
- package/dist/systems/wall/level-miter-cache.d.ts.map +1 -0
- package/dist/systems/wall/level-miter-cache.js +40 -0
- package/dist/systems/wall/wall-build-lifecycle.d.ts +9 -0
- package/dist/systems/wall/wall-build-lifecycle.d.ts.map +1 -0
- package/dist/systems/wall/wall-build-lifecycle.js +74 -0
- package/dist/systems/wall/wall-cutout-cache.d.ts +57 -0
- package/dist/systems/wall/wall-cutout-cache.d.ts.map +1 -0
- package/dist/systems/wall/wall-cutout-cache.js +304 -0
- package/dist/systems/wall/wall-cutout.d.ts +24 -1
- package/dist/systems/wall/wall-cutout.d.ts.map +1 -1
- package/dist/systems/wall/wall-cutout.js +33 -140
- package/dist/systems/wall/wall-material-variant.d.ts +31 -0
- package/dist/systems/wall/wall-material-variant.d.ts.map +1 -0
- package/dist/systems/wall/wall-material-variant.js +10 -0
- package/dist/systems/wall/wall-materials.d.ts +6 -0
- package/dist/systems/wall/wall-materials.d.ts.map +1 -1
- package/dist/systems/wall/wall-materials.js +29 -13
- package/dist/systems/wall/wall-placeholder-sweep.d.ts +50 -0
- package/dist/systems/wall/wall-placeholder-sweep.d.ts.map +1 -0
- package/dist/systems/wall/wall-placeholder-sweep.js +51 -0
- package/dist/systems/wall/wall-rebuild-notifications.d.ts +5 -0
- package/dist/systems/wall/wall-rebuild-notifications.d.ts.map +1 -0
- package/dist/systems/wall/wall-rebuild-notifications.js +23 -0
- package/dist/systems/wall/wall-system.d.ts +13 -2
- package/dist/systems/wall/wall-system.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.js +413 -148
- package/dist/systems/window/window-animation-system.d.ts.map +1 -1
- package/dist/systems/window/window-animation-system.js +9 -8
- package/dist/systems/window/window-system.d.ts +1 -0
- package/dist/systems/window/window-system.d.ts.map +1 -1
- package/dist/systems/window/window-system.js +16 -2
- package/package.json +18 -3
- package/dist/components/viewer/scene-bvh.test.d.ts +0 -2
- package/dist/components/viewer/scene-bvh.test.d.ts.map +0 -1
- package/dist/components/viewer/scene-bvh.test.js +0 -13
- package/dist/lib/csg-utils.test.d.ts +0 -2
- package/dist/lib/csg-utils.test.d.ts.map +0 -1
- package/dist/lib/csg-utils.test.js +0 -45
- package/dist/lib/materials.test.d.ts +0 -2
- package/dist/lib/materials.test.d.ts.map +0 -1
- package/dist/lib/materials.test.js +0 -25
- package/dist/lib/merged-outline-node.test.d.ts +0 -2
- package/dist/lib/merged-outline-node.test.d.ts.map +0 -1
- package/dist/lib/merged-outline-node.test.js +0 -22
- package/dist/lib/polygon-union.d.ts +0 -4
- package/dist/lib/polygon-union.d.ts.map +0 -1
- package/dist/lib/polygon-union.js +0 -289
- package/dist/lib/polygon-union.test.d.ts +0 -2
- package/dist/lib/polygon-union.test.d.ts.map +0 -1
- package/dist/lib/polygon-union.test.js +0 -105
- package/dist/lib/texture-reference.test.d.ts +0 -2
- package/dist/lib/texture-reference.test.d.ts.map +0 -1
- package/dist/lib/texture-reference.test.js +0 -86
- package/dist/store/use-viewer.test.d.ts +0 -2
- package/dist/store/use-viewer.test.d.ts.map +0 -1
- package/dist/store/use-viewer.test.js +0 -61
- package/dist/systems/door/door-animation.test.d.ts +0 -2
- package/dist/systems/door/door-animation.test.d.ts.map +0 -1
- package/dist/systems/door/door-animation.test.js +0 -51
- package/dist/systems/door/door-floor-alignment.test.d.ts +0 -2
- package/dist/systems/door/door-floor-alignment.test.d.ts.map +0 -1
- package/dist/systems/door/door-floor-alignment.test.js +0 -50
- package/dist/systems/geometry/geometry-system.test.d.ts +0 -2
- package/dist/systems/geometry/geometry-system.test.d.ts.map +0 -1
- package/dist/systems/geometry/geometry-system.test.js +0 -30
- package/dist/systems/slab/slab-system.test.d.ts +0 -2
- package/dist/systems/slab/slab-system.test.d.ts.map +0 -1
- package/dist/systems/slab/slab-system.test.js +0 -102
- package/dist/systems/wall/opening-cutout-geometry.test.d.ts +0 -2
- package/dist/systems/wall/opening-cutout-geometry.test.d.ts.map +0 -1
- package/dist/systems/wall/opening-cutout-geometry.test.js +0 -172
- package/dist/systems/wall/wall-opening-cutout.test.d.ts +0 -2
- package/dist/systems/wall/wall-opening-cutout.test.d.ts.map +0 -1
- package/dist/systems/wall/wall-opening-cutout.test.js +0 -59
- package/dist/systems/wall/wall-support-extension.test.d.ts +0 -2
- package/dist/systems/wall/wall-support-extension.test.d.ts.map +0 -1
- package/dist/systems/wall/wall-support-extension.test.js +0 -116
- package/dist/systems/wall/wall-terrain-bottom.test.d.ts +0 -2
- package/dist/systems/wall/wall-terrain-bottom.test.d.ts.map +0 -1
- package/dist/systems/wall/wall-terrain-bottom.test.js +0 -34
package/dist/index.js
CHANGED
|
@@ -17,9 +17,13 @@ export { buildGlbReferenceNodes, buildGlbReplaceNodes, } from './components/view
|
|
|
17
17
|
export { GlbScene, } from './components/viewer/glb-scene';
|
|
18
18
|
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';
|
|
19
19
|
export { DEFAULT_HOVER_STYLES, SSGI_PARAMS, } from './components/viewer/post-processing';
|
|
20
|
+
export { SceneAtmosphere, useSceneAtmosphere, } from './components/viewer/scene-atmosphere';
|
|
20
21
|
export { SceneEnvironment } from './components/viewer/scene-environment';
|
|
22
|
+
export { SceneGroundReplacement, useSceneGroundReplacement, } from './components/viewer/scene-ground-replacement';
|
|
23
|
+
export { isViewerPresentationTextureBorrowed, markViewerPresentationTextureBorrowed, registerViewerPresentation, ViewerPresentations, viewerPresentationRegistry, } from './components/viewer/viewer-presentations';
|
|
21
24
|
export { useAssetUrl } from './hooks/use-asset-url';
|
|
22
25
|
export { useGLTFKTX2 } from './hooks/use-gltf-ktx2';
|
|
26
|
+
export { useLibraryMaterialsVersion } from './hooks/use-library-materials-version';
|
|
23
27
|
export { useNodeEvents } from './hooks/use-node-events';
|
|
24
28
|
export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url';
|
|
25
29
|
export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
|
|
@@ -28,15 +32,23 @@ export { applyWorldScaleBoxUVs } from './lib/box-uv';
|
|
|
28
32
|
// geometry subtracts pieces against their host. Lives in viewer
|
|
29
33
|
// because three-bvh-csg / three-mesh-bvh are viewer-only deps.
|
|
30
34
|
export { ADDITION, Brush, computeGeometryBoundsTree, csgEvaluator, csgGeometry, csgMaterials, INTERSECTION, prepareBrushForCSG, SUBTRACTION, } from './lib/csg-utils';
|
|
35
|
+
export { disposeObject3DResources } from './lib/dispose-object3d';
|
|
36
|
+
export { PERF_OVERLAY_ENABLED } from './lib/gpu-perf';
|
|
31
37
|
export { computeHeroFraming, DEFAULT_FRAMING_EXCLUDED_TYPES, heroCameraPose, temporarilyHideNodeTypes, unionRegisteredNodeBounds, } from './lib/hero-pose';
|
|
32
38
|
export { applyIsolation, clearIsolation, collectIsolationSubtree, isIsolationActive, } from './lib/isolation';
|
|
33
39
|
export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader';
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
40
|
+
export { LayerPassIndex } from './lib/layer-pass';
|
|
41
|
+
export { BATCHED_LAYER, GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, SHADOW_ONLY_LAYER, setSurfaceRaycastLayers, ZONE_LAYER, } from './lib/layers';
|
|
42
|
+
export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, 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, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, WHITE_PALETTE, } from './lib/materials';
|
|
36
43
|
export { mergedOutline } from './lib/merged-outline-node';
|
|
37
|
-
export
|
|
44
|
+
export * from './lib/perf-actions';
|
|
45
|
+
export { publishPerfBatchStats } from './lib/perf-panel-store';
|
|
46
|
+
export * from './lib/perf-tracks';
|
|
47
|
+
export { markPureRaycast } from './lib/pointer-events';
|
|
48
|
+
export { detectRendererCapability, initializeGpuRenderer, } from './lib/renderer-capability';
|
|
38
49
|
export { getSceneTheme, SCENE_THEME_IDS, SCENE_THEMES, } from './lib/scene-themes';
|
|
39
|
-
export {
|
|
50
|
+
export { hideFromScene, showInScene, temporarilyShowShadowOnly, } from './lib/scene-visibility';
|
|
51
|
+
export { createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
|
|
40
52
|
export { buildTerrainPerimeterFillGeometry, } from './lib/terrain-perimeter-fill';
|
|
41
53
|
export { getPascalTextureRef, stampPascalTextureRef, textureMapForSlot, } from './lib/texture-reference';
|
|
42
54
|
export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat';
|
|
@@ -64,7 +76,7 @@ export { InteractiveSystem } from './systems/interactive/interactive-system';
|
|
|
64
76
|
export { ItemSystem } from './systems/item/item-system';
|
|
65
77
|
export { ItemLightSystem } from './systems/item-light/item-light-system';
|
|
66
78
|
export { LevelSystem } from './systems/level/level-system';
|
|
67
|
-
export { snapLevelsToTruePositions } from './systems/level/level-utils';
|
|
79
|
+
export { EXPLODED_GAP, getLevelPresentationY, snapLevelsToTruePositions, } from './systems/level/level-utils';
|
|
68
80
|
export { getRoofMaterialArray } from './systems/roof/roof-materials';
|
|
69
81
|
// Generic roof-segment primitives. Kinds that compose CSG against
|
|
70
82
|
// the roof shell (chimney's self-trim, dormer's virtual-segment cut)
|
|
@@ -81,13 +93,13 @@ export { StairSystem } from './systems/stair/stair-system';
|
|
|
81
93
|
// roof-wall opening cuts in `@pascal-app/nodes` — keeps shaped holes
|
|
82
94
|
// (arch / rounded / frameless opening) identical across both hosts.
|
|
83
95
|
export { buildOpeningCutoutGeometry, getOpeningCutoutBottomPadding, hasFlatOpeningCutoutBottom, } from './systems/wall/opening-cutout-geometry';
|
|
84
|
-
export { WallCutout } from './systems/wall/wall-cutout';
|
|
96
|
+
export { getWallHideState, WallCutout } from './systems/wall/wall-cutout';
|
|
85
97
|
export { getVisibleWallMaterials } from './systems/wall/wall-materials';
|
|
86
98
|
// Wall internals re-exported so `@pascal-app/nodes`' registry-driven wall
|
|
87
99
|
// definition can compose them into `def.system` without duplicating the
|
|
88
100
|
// 800+ lines of CSG / mitering logic during Phase 3. These exports are
|
|
89
101
|
// removed in Phase 6 when the legacy mount points are deleted.
|
|
90
|
-
export { WallSystem } from './systems/wall/wall-system';
|
|
102
|
+
export { drainRebuiltWalls, getPendingWallRebuildCount, isWallInitialBuildActive, WallSystem, } from './systems/wall/wall-system';
|
|
91
103
|
export { poseWindowMovingParts, WindowAnimationSystem, } from './systems/window/window-animation-system';
|
|
92
104
|
export { buildWindowPreviewMesh, WindowSystem } from './systems/window/window-system';
|
|
93
105
|
export { ZoneSystem } from './systems/zone/zone-system';
|
package/dist/lib/csg-utils.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export declare function csgMaterials(brush: Brush): THREE.Material[];
|
|
|
6
6
|
export declare const csgEvaluator: Evaluator;
|
|
7
7
|
export declare function computeGeometryBoundsTree(geometry: THREE.BufferGeometry): void;
|
|
8
8
|
export declare function prepareBrushForCSG(brush: Brush): void;
|
|
9
|
+
export declare function subtractCsgBrush(left: Brush, right: Brush, evaluator: Evaluator): Brush;
|
|
9
10
|
export { ADDITION, Brush, INTERSECTION, SUBTRACTION } from 'three-bvh-csg';
|
|
10
11
|
//# sourceMappingURL=csg-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csg-utils.d.ts","sourceRoot":"","sources":["../../src/lib/csg-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"csg-utils.d.ts","sourceRoot":"","sources":["../../src/lib/csg-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,KAAK,EAAE,SAAS,EAAe,MAAM,eAAe,CAAA;AA4ClE,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,KAAK,CAAC,cAAc,GAC7B,KAAK,CAAC,cAAc,CAoCtB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,cAAc,CAE9D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAG3D;AAED,eAAO,MAAM,YAAY,WAAkB,CAAA;AAK3C,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,QAMvE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,QAI9C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,KAAK,CAIvF;AAID,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/lib/csg-utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { Evaluator } from 'three-bvh-csg';
|
|
2
|
+
import { Evaluator, SUBTRACTION } from 'three-bvh-csg';
|
|
3
3
|
import { computeBoundsTree } from 'three-mesh-bvh';
|
|
4
4
|
/**
|
|
5
5
|
* Shared CSG primitives used by kinds whose geometry subtracts pieces
|
|
@@ -88,6 +88,11 @@ export function prepareBrushForCSG(brush) {
|
|
|
88
88
|
computeGeometryBoundsTree(brush.geometry);
|
|
89
89
|
brush.updateMatrixWorld();
|
|
90
90
|
}
|
|
91
|
+
export function subtractCsgBrush(left, right, evaluator) {
|
|
92
|
+
const result = evaluator.evaluate(left, right, SUBTRACTION);
|
|
93
|
+
prepareBrushForCSG(result);
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
91
96
|
// Re-export Brush + SUBTRACTION + ADDITION + INTERSECTION so kinds don't need a
|
|
92
97
|
// direct `three-bvh-csg` dependency.
|
|
93
98
|
export { ADDITION, Brush, INTERSECTION, SUBTRACTION } from 'three-bvh-csg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispose-object3d.d.ts","sourceRoot":"","sources":["../../src/lib/dispose-object3d.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,QAAQ,EAAE,MAAM,OAAO,CAAA;AAM/D,8EAA8E;AAC9E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,CAsB7D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function isCachedMaterial(material) {
|
|
2
|
+
return Boolean(material.userData?.__pascalCachedMaterial);
|
|
3
|
+
}
|
|
4
|
+
/** Dispose geometry and non-cached materials owned by an Object3D subtree. */
|
|
5
|
+
export function disposeObject3DResources(root) {
|
|
6
|
+
const geometries = new Set();
|
|
7
|
+
const materials = new Set();
|
|
8
|
+
root.traverse((object) => {
|
|
9
|
+
const renderable = object;
|
|
10
|
+
if (renderable.geometry)
|
|
11
|
+
geometries.add(renderable.geometry);
|
|
12
|
+
const objectMaterials = renderable.material;
|
|
13
|
+
if (Array.isArray(objectMaterials)) {
|
|
14
|
+
for (const material of objectMaterials)
|
|
15
|
+
materials.add(material);
|
|
16
|
+
}
|
|
17
|
+
else if (objectMaterials) {
|
|
18
|
+
materials.add(objectMaterials);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
for (const geometry of geometries)
|
|
22
|
+
geometry.dispose();
|
|
23
|
+
for (const material of materials) {
|
|
24
|
+
if (!isCachedMaterial(material))
|
|
25
|
+
material.dispose();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Rewrites a geometry's material groups so every material is drawn exactly once.
|
|
4
|
+
*
|
|
5
|
+
* A group is a contiguous slice of the index buffer, so a mesh whose triangles
|
|
6
|
+
* alternate between materials pays a draw call per *run*, not per material.
|
|
7
|
+
* Extruded walls hit this hard: `ExtrudeGeometry` emits the cap and side faces
|
|
8
|
+
* interleaved, so run-length grouping produces four groups for two materials —
|
|
9
|
+
* multiplied by a thousand walls, that is thousands of avoidable draw calls.
|
|
10
|
+
* Bucketing the triangles by material first makes each material one run.
|
|
11
|
+
*
|
|
12
|
+
* The geometry gains an index buffer if it had none. Triangle winding, vertex
|
|
13
|
+
* data and material assignment are untouched, so the rendered image is
|
|
14
|
+
* unchanged; only the order in which the GPU is asked to draw it differs.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setGroupsSortedByMaterial(geometry: THREE.BufferGeometry, triangleMaterials: ArrayLike<number>): void;
|
|
17
|
+
//# sourceMappingURL=geometry-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry-groups.d.ts","sourceRoot":"","sources":["../../src/lib/geometry-groups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,KAAK,CAAC,cAAc,EAC9B,iBAAiB,EAAE,SAAS,CAAC,MAAM,CAAC,GACnC,IAAI,CA2CN"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Rewrites a geometry's material groups so every material is drawn exactly once.
|
|
4
|
+
*
|
|
5
|
+
* A group is a contiguous slice of the index buffer, so a mesh whose triangles
|
|
6
|
+
* alternate between materials pays a draw call per *run*, not per material.
|
|
7
|
+
* Extruded walls hit this hard: `ExtrudeGeometry` emits the cap and side faces
|
|
8
|
+
* interleaved, so run-length grouping produces four groups for two materials —
|
|
9
|
+
* multiplied by a thousand walls, that is thousands of avoidable draw calls.
|
|
10
|
+
* Bucketing the triangles by material first makes each material one run.
|
|
11
|
+
*
|
|
12
|
+
* The geometry gains an index buffer if it had none. Triangle winding, vertex
|
|
13
|
+
* data and material assignment are untouched, so the rendered image is
|
|
14
|
+
* unchanged; only the order in which the GPU is asked to draw it differs.
|
|
15
|
+
*/
|
|
16
|
+
export function setGroupsSortedByMaterial(geometry, triangleMaterials) {
|
|
17
|
+
geometry.clearGroups();
|
|
18
|
+
const position = geometry.getAttribute('position');
|
|
19
|
+
if (!position)
|
|
20
|
+
return;
|
|
21
|
+
const sourceIndex = geometry.getIndex();
|
|
22
|
+
const triangleCount = Math.min(triangleMaterials.length, sourceIndex ? Math.floor(sourceIndex.count / 3) : Math.floor(position.count / 3));
|
|
23
|
+
if (triangleCount === 0)
|
|
24
|
+
return;
|
|
25
|
+
const buckets = new Map();
|
|
26
|
+
for (let triangle = 0; triangle < triangleCount; triangle += 1) {
|
|
27
|
+
const material = triangleMaterials[triangle] ?? 0;
|
|
28
|
+
const bucket = buckets.get(material);
|
|
29
|
+
if (bucket)
|
|
30
|
+
bucket.push(triangle);
|
|
31
|
+
else
|
|
32
|
+
buckets.set(material, [triangle]);
|
|
33
|
+
}
|
|
34
|
+
const singleMaterial = buckets.size === 1 ? [...buckets.keys()][0] : undefined;
|
|
35
|
+
if (singleMaterial !== undefined) {
|
|
36
|
+
geometry.addGroup(0, triangleCount * 3, singleMaterial);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const reordered = new Uint32Array(triangleCount * 3);
|
|
40
|
+
let cursor = 0;
|
|
41
|
+
for (const [material, triangles] of [...buckets].sort((left, right) => left[0] - right[0])) {
|
|
42
|
+
const groupStart = cursor;
|
|
43
|
+
for (const triangle of triangles) {
|
|
44
|
+
const base = triangle * 3;
|
|
45
|
+
reordered[cursor] = sourceIndex ? sourceIndex.getX(base) : base;
|
|
46
|
+
reordered[cursor + 1] = sourceIndex ? sourceIndex.getX(base + 1) : base + 1;
|
|
47
|
+
reordered[cursor + 2] = sourceIndex ? sourceIndex.getX(base + 2) : base + 2;
|
|
48
|
+
cursor += 3;
|
|
49
|
+
}
|
|
50
|
+
geometry.addGroup(groupStart, cursor - groupStart, material);
|
|
51
|
+
}
|
|
52
|
+
geometry.setIndex(new THREE.BufferAttribute(reordered, 1));
|
|
53
|
+
}
|
package/dist/lib/gpu-perf.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-perf.d.ts","sourceRoot":"","sources":["../../src/lib/gpu-perf.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB,SACyD,CAAA
|
|
1
|
+
{"version":3,"file":"gpu-perf.d.ts","sourceRoot":"","sources":["../../src/lib/gpu-perf.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB,SACyD,CAAA"}
|
package/dist/lib/gpu-perf.js
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
//
|
|
1
|
+
// `?perf` gate. Kept in its own module because both the overlay and
|
|
2
|
+
// `lib/perf-tracks.ts` (the instrumentation sink every system writes to) read
|
|
3
|
+
// it, and perf-tracks must not import a React component tree.
|
|
2
4
|
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// CPU→GPU-done delta gives a clean approximation of per-frame GPU duration
|
|
8
|
-
// regardless of which render path produced it.
|
|
5
|
+
// Timing itself lives in perf-tracks: `gpu-render` carries three's WebGPU
|
|
6
|
+
// timestamp-query total for the frame's render passes, `gpu-queue` the
|
|
7
|
+
// submit→onSubmittedWorkDone fence, `render-encode` the synchronous CPU cost of
|
|
8
|
+
// building and submitting the frame. See components/viewer/post-processing.tsx.
|
|
9
9
|
export const PERF_OVERLAY_ENABLED = typeof window !== 'undefined' && new URLSearchParams(window.location.search).has('perf');
|
|
10
|
-
const MAX_SAMPLES = 256;
|
|
11
|
-
const samples = [];
|
|
12
|
-
export function pushGpuSample(ms) {
|
|
13
|
-
samples.push(ms);
|
|
14
|
-
if (samples.length > MAX_SAMPLES)
|
|
15
|
-
samples.shift();
|
|
16
|
-
}
|
|
17
|
-
export function drainGpuSamples() {
|
|
18
|
-
if (samples.length === 0)
|
|
19
|
-
return [];
|
|
20
|
-
const out = samples.slice();
|
|
21
|
-
samples.length = 0;
|
|
22
|
-
return out;
|
|
23
|
-
}
|
package/dist/lib/isolation.d.ts
CHANGED
|
@@ -15,21 +15,21 @@ export declare function collectIsolationSubtree(ids: ReadonlyArray<string>): Set
|
|
|
15
15
|
/**
|
|
16
16
|
* Imperative visibility filter on the live `sceneRegistry`. Hides every
|
|
17
17
|
* registered group (and its synthesized child meshes) outside the
|
|
18
|
-
* isolated subtree by
|
|
19
|
-
* relevant `Object3D.layers` masks.
|
|
18
|
+
* isolated subtree by taking it off the scene layer.
|
|
20
19
|
*
|
|
21
20
|
* Why layers instead of `obj.visible = false`? Three.js's visibility
|
|
22
21
|
* flag *cascades* — hiding a parent hides every descendant — so we
|
|
23
22
|
* can't hide a host wall while keeping a door rendered inside it.
|
|
24
23
|
* Layer masks are per-object and don't cascade: `WebGLRenderer
|
|
25
24
|
* .projectObject` skips objects whose layer mask doesn't intersect the
|
|
26
|
-
* camera's, but always recurses into their children. So we can
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* camera's, but always recurses into their children. So we can hide
|
|
26
|
+
* the wall and the door (hosted under it in the scene graph) still
|
|
27
|
+
* renders, with its local position relative to the wall preserved
|
|
28
|
+
* automatically by the matrix walk.
|
|
30
29
|
*
|
|
31
|
-
* The
|
|
32
|
-
*
|
|
30
|
+
* The mask itself belongs to `lib/scene-visibility.ts`, which reconciles
|
|
31
|
+
* isolation with solo's shadow-caster pass, so {@link clearIsolation}
|
|
32
|
+
* gives an object back only what isolation took.
|
|
33
33
|
*
|
|
34
34
|
* Pass `null` to clear isolation (equivalent to calling
|
|
35
35
|
* {@link clearIsolation}).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isolation.d.ts","sourceRoot":"","sources":["../../src/lib/isolation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"isolation.d.ts","sourceRoot":"","sources":["../../src/lib/isolation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AASrC,8EAA8E;AAC9E,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,CAUjF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,IAAI,CAiBzE;AAUD,wBAAgB,cAAc,IAAI,IAAI,CAUrC"}
|
package/dist/lib/isolation.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { sceneRegistry } from '@pascal-app/core';
|
|
3
|
-
import {
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// can't collide with any kind's own userData fields.
|
|
7
|
-
const ORIGINAL_LAYERS = Symbol('isolation:original-layers');
|
|
8
|
-
// Whether a subtree is currently isolated (some objects have SCENE_LAYER
|
|
9
|
-
// disabled). Read by consumers that must not act on the partial view — e.g.
|
|
3
|
+
import { hideFromScene, showInScene } from './scene-visibility';
|
|
4
|
+
// Whether a subtree is currently isolated (some objects are held off the
|
|
5
|
+
// scene layer). Read by consumers that must not act on the partial view — e.g.
|
|
10
6
|
// the project-thumbnail autosave skips capturing while isolated so it never
|
|
11
7
|
// snapshots a single focused item as the whole project's thumbnail.
|
|
12
8
|
let isolationActive = false;
|
|
@@ -38,21 +34,21 @@ export function collectIsolationSubtree(ids) {
|
|
|
38
34
|
/**
|
|
39
35
|
* Imperative visibility filter on the live `sceneRegistry`. Hides every
|
|
40
36
|
* registered group (and its synthesized child meshes) outside the
|
|
41
|
-
* isolated subtree by
|
|
42
|
-
* relevant `Object3D.layers` masks.
|
|
37
|
+
* isolated subtree by taking it off the scene layer.
|
|
43
38
|
*
|
|
44
39
|
* Why layers instead of `obj.visible = false`? Three.js's visibility
|
|
45
40
|
* flag *cascades* — hiding a parent hides every descendant — so we
|
|
46
41
|
* can't hide a host wall while keeping a door rendered inside it.
|
|
47
42
|
* Layer masks are per-object and don't cascade: `WebGLRenderer
|
|
48
43
|
* .projectObject` skips objects whose layer mask doesn't intersect the
|
|
49
|
-
* camera's, but always recurses into their children. So we can
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
44
|
+
* camera's, but always recurses into their children. So we can hide
|
|
45
|
+
* the wall and the door (hosted under it in the scene graph) still
|
|
46
|
+
* renders, with its local position relative to the wall preserved
|
|
47
|
+
* automatically by the matrix walk.
|
|
53
48
|
*
|
|
54
|
-
* The
|
|
55
|
-
*
|
|
49
|
+
* The mask itself belongs to `lib/scene-visibility.ts`, which reconciles
|
|
50
|
+
* isolation with solo's shadow-caster pass, so {@link clearIsolation}
|
|
51
|
+
* gives an object back only what isolation took.
|
|
56
52
|
*
|
|
57
53
|
* Pass `null` to clear isolation (equivalent to calling
|
|
58
54
|
* {@link clearIsolation}).
|
|
@@ -64,9 +60,9 @@ export function applyIsolation(ids) {
|
|
|
64
60
|
}
|
|
65
61
|
const keep = collectIsolationSubtree(ids);
|
|
66
62
|
// Iterate registered roots. For each one outside the keep set,
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
63
|
+
// hide it and every descendant — *except* descendants that are
|
|
64
|
+
// themselves in `keep` (a kept node nested under a non-kept host:
|
|
65
|
+
// the isolated door under the hidden wall).
|
|
70
66
|
for (const [, obj] of sceneRegistry.nodes) {
|
|
71
67
|
if (keep.has(obj))
|
|
72
68
|
continue;
|
|
@@ -77,26 +73,18 @@ export function applyIsolation(ids) {
|
|
|
77
73
|
function hideRecursive(obj, keep) {
|
|
78
74
|
if (keep.has(obj))
|
|
79
75
|
return;
|
|
80
|
-
|
|
81
|
-
if (carrier[ORIGINAL_LAYERS] === undefined) {
|
|
82
|
-
carrier[ORIGINAL_LAYERS] = obj.layers.mask;
|
|
83
|
-
}
|
|
84
|
-
obj.layers.disable(SCENE_LAYER);
|
|
76
|
+
hideFromScene(obj, 'isolated');
|
|
85
77
|
for (const child of obj.children) {
|
|
86
78
|
hideRecursive(child, keep);
|
|
87
79
|
}
|
|
88
80
|
}
|
|
89
81
|
export function clearIsolation() {
|
|
90
82
|
// We don't know which objects were touched without re-walking, so
|
|
91
|
-
// walk every registered root + its descendants and
|
|
92
|
-
//
|
|
83
|
+
// walk every registered root + its descendants and drop the isolation
|
|
84
|
+
// reason wherever it was set. `traverse` is cheap and idempotent here.
|
|
93
85
|
for (const [, obj] of sceneRegistry.nodes) {
|
|
94
86
|
obj.traverse((child) => {
|
|
95
|
-
|
|
96
|
-
if (carrier[ORIGINAL_LAYERS] !== undefined) {
|
|
97
|
-
child.layers.mask = carrier[ORIGINAL_LAYERS];
|
|
98
|
-
delete carrier[ORIGINAL_LAYERS];
|
|
99
|
-
}
|
|
87
|
+
showInScene(child, 'isolated');
|
|
100
88
|
});
|
|
101
89
|
}
|
|
102
90
|
isolationActive = false;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Camera, Object3D, type Scene } from 'three';
|
|
2
|
+
import { type NodeFrame, PassNode } from 'three/webgpu';
|
|
3
|
+
export declare class LayerPassIndex {
|
|
4
|
+
readonly source: Scene;
|
|
5
|
+
private readonly members;
|
|
6
|
+
private readonly cleanups;
|
|
7
|
+
constructor(source: Scene, layers: number[]);
|
|
8
|
+
register(subtree: Object3D): void;
|
|
9
|
+
private attach;
|
|
10
|
+
private detach;
|
|
11
|
+
prepare(layer: number, roots: Object3D[]): {
|
|
12
|
+
drawable: boolean;
|
|
13
|
+
shadowLight: boolean;
|
|
14
|
+
};
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class LayerPassNode extends PassNode {
|
|
18
|
+
private readonly index;
|
|
19
|
+
private readonly layer;
|
|
20
|
+
private readonly mainPass;
|
|
21
|
+
private readonly roots;
|
|
22
|
+
private readonly size;
|
|
23
|
+
private needsClear;
|
|
24
|
+
constructor(index: LayerPassIndex, camera: Camera, layer: number, mainPass: PassNode);
|
|
25
|
+
dispose(): void;
|
|
26
|
+
updateBefore(frame: NodeFrame): undefined;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=layer-pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-pass.d.ts","sourceRoot":"","sources":["../../src/lib/layer-pass.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAiB,QAAQ,EAAE,KAAK,KAAK,EAAW,MAAM,OAAO,CAAA;AACjF,OAAO,EAAE,KAAK,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAoBvD,qBAAa,cAAc;IAKvB,QAAQ,CAAC,MAAM,EAAE,KAAK;IAJxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;gBAGhD,MAAM,EAAE,KAAK,EACtB,MAAM,EAAE,MAAM,EAAE;IAWlB,QAAQ,CAAC,OAAO,EAAE,QAAQ;IAU1B,OAAO,CAAC,MAAM,CA2Cb;IAED,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;;;;IAoCxC,OAAO;CAIR;AAiBD,qBAAa,aAAc,SAAQ,QAAQ;IAMvC,OAAO,CAAC,QAAQ,CAAC,KAAK;IAEtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAR3B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,UAAU,CAAO;gBAGN,KAAK,EAAE,cAAc,EACtC,MAAM,EAAE,MAAM,EACG,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,QAAQ;IAc5B,OAAO;IAKP,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS;CAgEnD"}
|