@pascal-app/viewer 1.0.4 → 1.0.6
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/dist/capture/capture-runtime.js +1 -1
- package/dist/components/error-boundary.d.ts.map +1 -1
- package/dist/components/renderers/node-renderer.d.ts +1 -1
- package/dist/components/renderers/node-renderer.d.ts.map +1 -1
- package/dist/components/renderers/node-renderer.js +4 -1
- package/dist/components/renderers/parametric-node-renderer.d.ts.map +1 -1
- package/dist/components/viewer/bvh-ecctrl.d.ts.map +1 -1
- package/dist/components/viewer/frame-limiter.d.ts.map +1 -1
- package/dist/components/viewer/glb-interactive.js +1 -1
- package/dist/components/viewer/glb-reference-nodes.js +1 -1
- package/dist/components/viewer/glb-replace-instances.js +1 -1
- package/dist/components/viewer/glb-scene.d.ts.map +1 -1
- package/dist/components/viewer/glb-scene.js +2 -3
- package/dist/components/viewer/glb-walkthrough-controller.js +1 -1
- package/dist/components/viewer/index.d.ts +10 -1
- package/dist/components/viewer/index.d.ts.map +1 -1
- package/dist/components/viewer/index.js +28 -12
- package/dist/components/viewer/lights.d.ts.map +1 -1
- package/dist/components/viewer/lights.js +107 -21
- package/dist/components/viewer/perf-panel.d.ts.map +1 -1
- package/dist/components/viewer/perf-panel.js +1 -1
- package/dist/components/viewer/post-processing.d.ts.map +1 -1
- package/dist/components/viewer/post-processing.js +96 -33
- package/dist/components/viewer/registered-systems.js +1 -1
- package/dist/components/viewer/scene-bvh.d.ts.map +1 -1
- package/dist/components/viewer/scene-bvh.js +1 -1
- package/dist/components/viewer/scene-environment.d.ts.map +1 -1
- package/dist/components/viewer/scene-environment.js +31 -11
- package/dist/components/viewer/selection-manager.js +15 -7
- package/dist/components/viewer/underground-ambiance.d.ts +9 -0
- package/dist/components/viewer/underground-ambiance.d.ts.map +1 -0
- package/dist/components/viewer/underground-ambiance.js +105 -0
- package/dist/components/viewer/viewer-camera.d.ts.map +1 -1
- package/dist/components/viewer/viewer-camera.js +1 -1
- package/dist/components/viewer/viewer-presentations.d.ts.map +1 -1
- package/dist/hooks/use-gltf-ktx2.d.ts.map +1 -1
- package/dist/hooks/use-gltf-ktx2.js +2 -0
- package/dist/hooks/use-node-events.d.ts.map +1 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -7
- package/dist/lib/backdrop.d.ts +17 -0
- package/dist/lib/backdrop.d.ts.map +1 -1
- package/dist/lib/backdrop.js +18 -1
- package/dist/lib/construction-dust.d.ts +57 -0
- package/dist/lib/construction-dust.d.ts.map +1 -0
- package/dist/lib/construction-dust.js +187 -0
- package/dist/lib/csg-utils.js +1 -1
- package/dist/lib/foundation-materials.d.ts +26 -0
- package/dist/lib/foundation-materials.d.ts.map +1 -0
- package/dist/lib/foundation-materials.js +65 -0
- package/dist/lib/gltf-unlit.d.ts +10 -0
- package/dist/lib/gltf-unlit.d.ts.map +1 -0
- package/dist/lib/gltf-unlit.js +23 -0
- package/dist/lib/ground-window.d.ts +33 -0
- package/dist/lib/ground-window.d.ts.map +1 -0
- package/dist/lib/ground-window.js +114 -0
- package/dist/lib/hero-pose.d.ts +1 -1
- package/dist/lib/hero-pose.d.ts.map +1 -1
- package/dist/lib/ink-edges.d.ts +2 -1
- package/dist/lib/ink-edges.d.ts.map +1 -1
- package/dist/lib/ktx2-loader.d.ts +7 -0
- package/dist/lib/ktx2-loader.d.ts.map +1 -1
- package/dist/lib/ktx2-loader.js +35 -0
- package/dist/lib/layer-pass.d.ts.map +1 -1
- package/dist/lib/layers.d.ts +11 -7
- package/dist/lib/layers.d.ts.map +1 -1
- package/dist/lib/layers.js +16 -6
- package/dist/lib/materials.d.ts +5 -0
- package/dist/lib/materials.d.ts.map +1 -1
- package/dist/lib/materials.js +34 -4
- package/dist/lib/merged-outline-node.d.ts +5 -0
- package/dist/lib/merged-outline-node.d.ts.map +1 -1
- package/dist/lib/merged-outline-node.js +80 -2
- package/dist/lib/pointer-events.d.ts +20 -4
- package/dist/lib/pointer-events.d.ts.map +1 -1
- package/dist/lib/pointer-events.js +78 -14
- package/dist/lib/post-processing-resources.d.ts.map +1 -1
- package/dist/lib/reveal-candidates.d.ts +80 -0
- package/dist/lib/reveal-candidates.d.ts.map +1 -0
- package/dist/lib/reveal-candidates.js +524 -0
- package/dist/lib/reveal-ghost.d.ts +9 -0
- package/dist/lib/reveal-ghost.d.ts.map +1 -0
- package/dist/lib/reveal-ghost.js +62 -0
- package/dist/lib/reveal-pending.d.ts +12 -0
- package/dist/lib/reveal-pending.d.ts.map +1 -0
- package/dist/lib/reveal-pending.js +12 -0
- package/dist/lib/reveal-pose.d.ts +70 -0
- package/dist/lib/reveal-pose.d.ts.map +1 -0
- package/dist/lib/reveal-pose.js +248 -0
- package/dist/lib/reveal-schedule.d.ts +208 -0
- package/dist/lib/reveal-schedule.d.ts.map +1 -0
- package/dist/lib/reveal-schedule.js +410 -0
- package/dist/lib/reveal-texture-scale.d.ts +5 -0
- package/dist/lib/reveal-texture-scale.d.ts.map +1 -0
- package/dist/lib/reveal-texture-scale.js +113 -0
- package/dist/lib/reveal-windows.d.ts +23 -0
- package/dist/lib/reveal-windows.d.ts.map +1 -0
- package/dist/lib/reveal-windows.js +31 -0
- package/dist/lib/reveal-wipe.d.ts +71 -0
- package/dist/lib/reveal-wipe.d.ts.map +1 -0
- package/dist/lib/reveal-wipe.js +105 -0
- package/dist/lib/scene-pass-mrt.d.ts +12 -0
- package/dist/lib/scene-pass-mrt.d.ts.map +1 -0
- package/dist/lib/scene-pass-mrt.js +23 -0
- package/dist/lib/scene-themes.d.ts +30 -8
- package/dist/lib/scene-themes.d.ts.map +1 -1
- package/dist/lib/scene-themes.js +36 -0
- package/dist/lib/scene-visibility.d.ts +11 -1
- package/dist/lib/scene-visibility.d.ts.map +1 -1
- package/dist/lib/scene-visibility.js +38 -0
- package/dist/lib/site-surfaces.d.ts +32 -0
- package/dist/lib/site-surfaces.d.ts.map +1 -0
- package/dist/lib/site-surfaces.js +70 -0
- package/dist/lib/snapshot-pipeline.d.ts +2 -1
- package/dist/lib/snapshot-pipeline.d.ts.map +1 -1
- package/dist/lib/snapshot-pipeline.js +35 -15
- package/dist/lib/tsl-compat.d.ts +2 -2
- package/dist/lib/tsl-compat.d.ts.map +1 -1
- package/dist/lib/underground-ambiance.d.ts +168 -0
- package/dist/lib/underground-ambiance.d.ts.map +1 -0
- package/dist/lib/underground-ambiance.js +334 -0
- package/dist/store/use-viewer.d.ts +184 -27
- package/dist/store/use-viewer.d.ts.map +1 -1
- package/dist/store/use-viewer.js +155 -19
- package/dist/systems/ceiling/ceiling-system.d.ts.map +1 -1
- package/dist/systems/ceiling/ceiling-system.js +2 -0
- package/dist/systems/construction-reveal/construction-dust.d.ts +16 -0
- package/dist/systems/construction-reveal/construction-dust.d.ts.map +1 -0
- package/dist/systems/construction-reveal/construction-dust.js +92 -0
- package/dist/systems/construction-reveal/construction-reveal.d.ts +276 -0
- package/dist/systems/construction-reveal/construction-reveal.d.ts.map +1 -0
- package/dist/systems/construction-reveal/construction-reveal.js +2383 -0
- package/dist/systems/construction-reveal/dust-material.d.ts +10 -0
- package/dist/systems/construction-reveal/dust-material.d.ts.map +1 -0
- package/dist/systems/construction-reveal/dust-material.js +17 -0
- package/dist/systems/construction-reveal/ghost-dress.d.ts +10 -0
- package/dist/systems/construction-reveal/ghost-dress.d.ts.map +1 -0
- package/dist/systems/construction-reveal/ghost-dress.js +24 -0
- package/dist/systems/elevator/elevator-interaction-system.d.ts +7 -0
- package/dist/systems/elevator/elevator-interaction-system.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-interaction-system.js +18 -1
- package/dist/systems/geometry/geometry-system.d.ts.map +1 -1
- package/dist/systems/interactive/control-widget.d.ts.map +1 -1
- package/dist/systems/interactive/interactive-system.d.ts.map +1 -1
- package/dist/systems/interactive/interactive-system.js +16 -6
- package/dist/systems/interactive/scripted-clips.js +1 -1
- package/dist/systems/item-light/item-light-system.js +1 -1
- package/dist/systems/level/level-hold.d.ts +4 -0
- package/dist/systems/level/level-hold.d.ts.map +1 -0
- package/dist/systems/level/level-hold.js +14 -0
- package/dist/systems/level/level-system.d.ts.map +1 -1
- package/dist/systems/level/level-system.js +16 -1
- package/dist/systems/level/level-utils.d.ts +13 -3
- package/dist/systems/level/level-utils.d.ts.map +1 -1
- package/dist/systems/level/level-utils.js +56 -8
- package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts +103 -0
- package/dist/systems/roof/__fixtures__/roof-plane-cases.d.ts.map +1 -0
- package/dist/systems/roof/__fixtures__/roof-plane-cases.js +317 -0
- package/dist/systems/roof/roof-materials.d.ts +4 -2
- package/dist/systems/roof/roof-materials.d.ts.map +1 -1
- package/dist/systems/roof/roof-materials.js +18 -24
- package/dist/systems/roof/roof-system.d.ts +8 -1
- package/dist/systems/roof/roof-system.d.ts.map +1 -1
- package/dist/systems/roof/roof-system.js +195 -45
- package/dist/systems/wall/wall-cutout-cache.d.ts +32 -3
- package/dist/systems/wall/wall-cutout-cache.d.ts.map +1 -1
- package/dist/systems/wall/wall-cutout-cache.js +95 -2
- package/dist/systems/wall/wall-cutout.d.ts.map +1 -1
- package/dist/systems/wall/wall-material-variant.d.ts.map +1 -1
- package/dist/systems/wall/wall-materials.d.ts.map +1 -1
- package/dist/systems/wall/wall-materials.js +39 -4
- package/dist/systems/wall/wall-placeholder-sweep.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.d.ts +5 -0
- package/dist/systems/wall/wall-system.d.ts.map +1 -1
- package/dist/systems/wall/wall-system.js +42 -19
- package/dist/systems/window/corner-frame.d.ts +10 -0
- package/dist/systems/window/corner-frame.d.ts.map +1 -0
- package/dist/systems/window/corner-frame.js +17 -0
- package/dist/systems/window/window-system.d.ts +1 -1
- package/dist/systems/window/window-system.d.ts.map +1 -1
- package/dist/systems/window/window-system.js +31 -6
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -19,43 +19,52 @@ export { useGLTFKTX2 } from './hooks/use-gltf-ktx2';
|
|
|
19
19
|
export { useLibraryMaterialsVersion } from './hooks/use-library-materials-version';
|
|
20
20
|
export { useNodeEvents } from './hooks/use-node-events';
|
|
21
21
|
export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url';
|
|
22
|
-
export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
|
|
22
|
+
export { backdropColors, backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
|
|
23
23
|
export { applyWorldScaleBoxUVs } from './lib/box-uv';
|
|
24
24
|
export { ADDITION, Brush, computeGeometryBoundsTree, csgEvaluator, csgGeometry, csgMaterials, Evaluator, ensureRenderableGeometryAttributes, INTERSECTION, prepareBrushForCSG, SUBTRACTION, } from './lib/csg-utils';
|
|
25
25
|
export type { DisplayState } from './lib/display-state';
|
|
26
26
|
export { disposeObject3DResources } from './lib/dispose-object3d';
|
|
27
27
|
export type { EdgeMode } from './lib/edge-style';
|
|
28
|
+
export { BLOCK_MASONRY, concreteMaterial, type Masonry, masonryMaterial, STRUCTURE_COLORS, } from './lib/foundation-materials';
|
|
29
|
+
export { preserveGltfUnlit } from './lib/gltf-unlit';
|
|
28
30
|
export { PERF_OVERLAY_ENABLED } from './lib/gpu-perf';
|
|
31
|
+
export { groundWindowBoxNow, groundWindowContains, groundWindowEnabledNode, groundWindowMaskNode, inGroundWindowNode, setGroundWindow, temporarilyGroundWindowForCapture, } from './lib/ground-window';
|
|
29
32
|
export { computeHeroFraming, DEFAULT_FRAMING_EXCLUDED_TYPES, type HeroFraming, heroCameraPose, temporarilyHideNodeTypes, unionRegisteredNodeBounds, } from './lib/hero-pose';
|
|
30
33
|
export { applyIsolation, clearIsolation, collectIsolationSubtree, isIsolationActive, refreshIsolation, } from './lib/isolation';
|
|
31
34
|
export { setKeyLightDirectionOverride } from './lib/key-light-override';
|
|
32
|
-
export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader';
|
|
35
|
+
export { configureKtx2Support, ensureKtx2Support, ktx2TextureLoadState } from './lib/ktx2-loader';
|
|
33
36
|
export { LayerPassIndex } from './lib/layer-pass';
|
|
34
37
|
export { BATCHED_LAYER, GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, SHADOW_ONLY_LAYER, setSurfaceRaycastLayers, ZONE_LAYER, } from './lib/layers';
|
|
35
38
|
export { holdLiveFrame } from './lib/live-frame-hold';
|
|
36
|
-
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, materialCastsShadow, PRESET_PALETTES, type RenderShading, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
|
|
39
|
+
export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, type ColorPreset, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPreset, 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, getMaterialTextureVersion, glassMaterial, MONO_PALETTE, materialCastsShadow, materialTextureLoadState, PRESET_PALETTES, type RenderShading, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
|
|
37
40
|
export { mergedOutline } from './lib/merged-outline-node';
|
|
38
41
|
export { createNodeTopSurfaceHeightSampler } from './lib/node-top-surface-height';
|
|
39
42
|
export * from './lib/perf-actions';
|
|
40
43
|
export { type PerfBatchStats, publishPerfBatchStats } from './lib/perf-panel-store';
|
|
41
44
|
export * from './lib/perf-tracks';
|
|
42
|
-
export { hasMaterialsForGroups, markPureRaycast } from './lib/pointer-events';
|
|
45
|
+
export { hasMaterialsForGroups, markPureRaycast, type ViewerBreadcrumb, type ViewerBreadcrumbHandler, } from './lib/pointer-events';
|
|
43
46
|
export { cloneWithProceduralEmission, decorateProceduralEmission, proceduralSlotMeshes, setProceduralEmission, } from './lib/procedural-emission';
|
|
44
47
|
export { detectRendererCapability, initializeGpuRenderer, type RendererBackendParameters, type RendererCapability, type RendererCapabilityCanvas, type RendererInitializationResult, type RendererPowerPreference, } from './lib/renderer-capability';
|
|
48
|
+
export { commitEditCandidates, commitRevealCandidates } from './lib/reveal-candidates';
|
|
49
|
+
export { ANIMATION_SPEEDS, type AnimationSpeed, DEFAULT_ANIMATION_SPEED, FRAMING_PACE, LAZY_REVEAL_BASE_TIMING, LAZY_REVEAL_TIMING, type LazyRevealTiming, lazyTimingAt, normalizeAnimationSpeed, type PlannedReveal, pacedLazyTiming, planLazyReveal, type RevealCandidate, retractTimingAt, revealTimingAt, } from './lib/reveal-schedule';
|
|
50
|
+
export { planRevealWindows, type RevealWindow } from './lib/reveal-windows';
|
|
45
51
|
export { createSceneSupportHeightSampler } from './lib/scene-support-height';
|
|
46
52
|
export { getSceneTheme, SCENE_THEME_IDS, SCENE_THEMES, type SceneTheme, } from './lib/scene-themes';
|
|
47
53
|
export { type HiddenReason, hideFromScene, showInScene, temporarilyShowPresentation, temporarilyShowShadowOnly, } from './lib/scene-visibility';
|
|
48
54
|
export { SCRIPTED_MODEL_FLAG } from './lib/scripted-opening';
|
|
55
|
+
export { SITE_FOUNDATION, SITE_GROUND, type SiteGroundRole, siteFoundation, siteGround, siteSurfaces, temporarilyVeilGround, } from './lib/site-surfaces';
|
|
49
56
|
export { createPlainSnapshotPipeline, createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, type SnapshotCaptureMode, type SnapshotCaptureResult, type SnapshotCropRegion, type SnapshotPipeline, type SnapshotSize, type StudioBackdrop, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
|
|
50
57
|
export { buildTerrainPerimeterFillGeometry, type TerrainPerimeterPoint, } from './lib/terrain-perimeter-fill';
|
|
51
58
|
export { getPascalTextureRef, type PascalTextureColorSpace, type PascalTextureMap, type PascalTextureRef, stampPascalTextureRef, textureMapForSlot, } from './lib/texture-reference';
|
|
52
59
|
export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat';
|
|
60
|
+
export { AMBIANCE_SECONDS, ambianceNow, ambianceTarget, easeAmbiance, eyeUnderTheGround, FADE_SECONDS, groundHoleOpenNode, groundHoleOpenNow, stepAmbianceProgress, temporarilyWithoutAmbiance, UNDERGROUND_RIM, UNDERGROUND_RING, undergroundAmbianceNode, } from './lib/underground-ambiance';
|
|
53
61
|
export { createZoneShape, createZoneWallGeometry } from './lib/zone-geometry';
|
|
54
62
|
export type { LightSource } from './store/use-item-light-pool';
|
|
55
63
|
export { catalogLightSource, useItemLightPool } from './store/use-item-light-pool';
|
|
56
|
-
export { applyCountryUnitDefault, default as useViewer, type MetricNotation, type WallMode, } from './store/use-viewer';
|
|
64
|
+
export { anyGroundVeiled, applyCountryUnitDefault, DEFAULT_UNDERGROUND_LOOK, default as useViewer, type GroundMode, groundVeiled, type MetricNotation, siteGroundShown, type UndergroundEdge, type UndergroundLook, type UndergroundTransition, type WallMode, } from './store/use-viewer';
|
|
57
65
|
export { CEILING_REGION_MESH, type CeilingRegionMaterial, CeilingSystem, } from './systems/ceiling/ceiling-system';
|
|
58
66
|
export { createColumnBoxGeometry, createColumnCylinderGeometry, createColumnSphereGeometry, createColumnTorusGeometry, } from './systems/column/column-geometry';
|
|
67
|
+
export { ConstructionReveal, type ConstructionRevealDriver, type ConstructionRevealLevel, type ConstructionRevealOptions, emitRevealPuff, getRetractTurn, getRevealPlanSpeed, getRevealPlanState, getRevealTurn, isNodeRevealing, isRevealAssembling, type RetractResult, type RevealCompleteEvent, type RevealEvent, type RevealFinaleEvent, type RevealGroupEvent, type RevealNodeStartEvent, type RevealPhaseEvent, type RevealPlanState, type RevealPreroll, type RevealRetractEvent, retractNodes, revealChangedNodeIds, revealClockMs, revealMotionOff, seatLiftedNow, setRevealPreroll, startConstructionReveal, subscribeRevealAssembling, subscribeRevealEvents, subscribeRevealPhases, subscribeRevealTicks, useRevealPending, useRevealPlanActive, useRevealWaiting, } from './systems/construction-reveal/construction-reveal';
|
|
59
68
|
export { DoorAnimationSystem } from './systems/door/door-animation-system';
|
|
60
69
|
export { buildDoorPreviewMesh, DoorSystem, poseDoorMovingParts } from './systems/door/door-system';
|
|
61
70
|
export { ElevatorInteractionSystem } from './systems/elevator/elevator-interaction-system';
|
|
@@ -66,9 +75,9 @@ export { type ScriptedClipActions, ScriptedClips, useClipActions, } from './syst
|
|
|
66
75
|
export { ItemSystem } from './systems/item/item-system';
|
|
67
76
|
export { ItemLightSystem } from './systems/item-light/item-light-system';
|
|
68
77
|
export { LevelSystem } from './systems/level/level-system';
|
|
69
|
-
export { EXPLODED_GAP, getLevelPresentationY, snapLevelsToTruePositions, } from './systems/level/level-utils';
|
|
78
|
+
export { EXPLODED_GAP, getLevelPresentationY, presentLevelsForCapture, snapLevelsToTruePositions, } from './systems/level/level-utils';
|
|
70
79
|
export { getRoofMaterialArray, levelWallCladdingRef } from './systems/roof/roof-materials';
|
|
71
|
-
export { clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, type SurfaceFrame, } from './systems/roof/roof-system';
|
|
80
|
+
export { clipDirectRoofGeometryAgainstSiblings, clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getPendingRoofMergeCount, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, type RoofGeometryAdapter, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, type SurfaceFrame, } from './systems/roof/roof-system';
|
|
72
81
|
export { ScanSystem } from './systems/scan/scan-system';
|
|
73
82
|
export { generateSlabGeometry } from './systems/slab/slab-system';
|
|
74
83
|
export { getStairBodyMaterials, getStairRailingMaterial, getStraightStairSegmentBodyMaterials, type StairBodyMaterials, } from './systems/stair/stair-materials';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAO3D,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACnE,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC5B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,KAAK,YAAY,EACjB,OAAO,IAAI,SAAS,EACpB,KAAK,aAAa,GACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,KAAK,kBAAkB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,KAAK,YAAY,EACjB,QAAQ,EACR,KAAK,cAAc,EACnB,cAAc,GACf,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAC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,EACL,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,UAAU,GACX,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -27,43 +27,52 @@ export { useGLTFKTX2 } from './hooks/use-gltf-ktx2';
|
|
|
27
27
|
export { useLibraryMaterialsVersion } from './hooks/use-library-materials-version';
|
|
28
28
|
export { useNodeEvents } from './hooks/use-node-events';
|
|
29
29
|
export { ASSETS_CDN_URL, resolveAssetUrl, resolveCdnUrl } from './lib/asset-url';
|
|
30
|
-
export { backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
|
|
30
|
+
export { backdropColors, backdropGradient, deepSkyColor, horizonHazeColor } from './lib/backdrop';
|
|
31
31
|
export { applyWorldScaleBoxUVs } from './lib/box-uv';
|
|
32
32
|
// CSG primitives — used by chimney's roof-trim and other kinds whose
|
|
33
33
|
// geometry subtracts pieces against their host. Lives in viewer
|
|
34
34
|
// because three-bvh-csg / three-mesh-bvh are viewer-only deps.
|
|
35
35
|
export { ADDITION, Brush, computeGeometryBoundsTree, csgEvaluator, csgGeometry, csgMaterials, Evaluator, ensureRenderableGeometryAttributes, INTERSECTION, prepareBrushForCSG, SUBTRACTION, } from './lib/csg-utils';
|
|
36
36
|
export { disposeObject3DResources } from './lib/dispose-object3d';
|
|
37
|
+
export { BLOCK_MASONRY, concreteMaterial, masonryMaterial, STRUCTURE_COLORS, } from './lib/foundation-materials';
|
|
38
|
+
export { preserveGltfUnlit } from './lib/gltf-unlit';
|
|
37
39
|
export { PERF_OVERLAY_ENABLED } from './lib/gpu-perf';
|
|
40
|
+
export { groundWindowBoxNow, groundWindowContains, groundWindowEnabledNode, groundWindowMaskNode, inGroundWindowNode, setGroundWindow, temporarilyGroundWindowForCapture, } from './lib/ground-window';
|
|
38
41
|
export { computeHeroFraming, DEFAULT_FRAMING_EXCLUDED_TYPES, heroCameraPose, temporarilyHideNodeTypes, unionRegisteredNodeBounds, } from './lib/hero-pose';
|
|
39
42
|
export { applyIsolation, clearIsolation, collectIsolationSubtree, isIsolationActive, refreshIsolation, } from './lib/isolation';
|
|
40
43
|
export { setKeyLightDirectionOverride } from './lib/key-light-override';
|
|
41
|
-
export { configureKtx2Support, ensureKtx2Support } from './lib/ktx2-loader';
|
|
44
|
+
export { configureKtx2Support, ensureKtx2Support, ktx2TextureLoadState } from './lib/ktx2-loader';
|
|
42
45
|
export { LayerPassIndex } from './lib/layer-pass';
|
|
43
46
|
export { BATCHED_LAYER, GRID_LAYER, OVERLAY_LAYER, SCENE_LAYER, SHADOW_ONLY_LAYER, setSurfaceRaycastLayers, ZONE_LAYER, } from './lib/layers';
|
|
44
47
|
export { holdLiveFrame } from './lib/live-frame-hold';
|
|
45
|
-
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, materialCastsShadow, PRESET_PALETTES, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
|
|
48
|
+
export { applyMaterialPresetToMaterials, BLUEPRINT_PALETTE, baseMaterial, CLAY_PALETTE, clearMaterialCache, createDefaultMaterial, createMaterial, createMaterialFromPreset, 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, getMaterialTextureVersion, glassMaterial, MONO_PALETTE, materialCastsShadow, materialTextureLoadState, PRESET_PALETTES, registerMaterialCacheCleanup, resolveMaterialRef, resolveSlotDefaultMaterial, resolveSurfaceColor, setSlotDefaultOverrides, WHITE_PALETTE, } from './lib/materials';
|
|
46
49
|
export { mergedOutline } from './lib/merged-outline-node';
|
|
47
50
|
export { createNodeTopSurfaceHeightSampler } from './lib/node-top-surface-height';
|
|
48
51
|
export * from './lib/perf-actions';
|
|
49
52
|
export { publishPerfBatchStats } from './lib/perf-panel-store';
|
|
50
53
|
export * from './lib/perf-tracks';
|
|
51
|
-
export { hasMaterialsForGroups, markPureRaycast } from './lib/pointer-events';
|
|
54
|
+
export { hasMaterialsForGroups, markPureRaycast, } from './lib/pointer-events';
|
|
52
55
|
export { cloneWithProceduralEmission, decorateProceduralEmission, proceduralSlotMeshes, setProceduralEmission, } from './lib/procedural-emission';
|
|
53
56
|
export { detectRendererCapability, initializeGpuRenderer, } from './lib/renderer-capability';
|
|
57
|
+
export { commitEditCandidates, commitRevealCandidates } from './lib/reveal-candidates';
|
|
58
|
+
export { ANIMATION_SPEEDS, DEFAULT_ANIMATION_SPEED, FRAMING_PACE, LAZY_REVEAL_BASE_TIMING, LAZY_REVEAL_TIMING, lazyTimingAt, normalizeAnimationSpeed, pacedLazyTiming, planLazyReveal, retractTimingAt, revealTimingAt, } from './lib/reveal-schedule';
|
|
59
|
+
export { planRevealWindows } from './lib/reveal-windows';
|
|
54
60
|
export { createSceneSupportHeightSampler } from './lib/scene-support-height';
|
|
55
61
|
export { getSceneTheme, SCENE_THEME_IDS, SCENE_THEMES, } from './lib/scene-themes';
|
|
56
62
|
export { hideFromScene, showInScene, temporarilyShowPresentation, temporarilyShowShadowOnly, } from './lib/scene-visibility';
|
|
57
63
|
export { SCRIPTED_MODEL_FLAG } from './lib/scripted-opening';
|
|
64
|
+
export { SITE_FOUNDATION, SITE_GROUND, siteFoundation, siteGround, siteSurfaces, temporarilyVeilGround, } from './lib/site-surfaces';
|
|
58
65
|
export { createPlainSnapshotPipeline, createSnapshotPipeline, SNAPSHOT_MAX_EDGE, SNAPSHOT_MIME, SNAPSHOT_QUALITY, THUMBNAIL_HEIGHT, THUMBNAIL_WIDTH, } from './lib/snapshot-pipeline';
|
|
59
66
|
export { buildTerrainPerimeterFillGeometry, } from './lib/terrain-perimeter-fill';
|
|
60
67
|
export { getPascalTextureRef, stampPascalTextureRef, textureMapForSlot, } from './lib/texture-reference';
|
|
61
68
|
export { packNormalToRGB, unpackRGBToNormal } from './lib/tsl-compat';
|
|
69
|
+
export { AMBIANCE_SECONDS, ambianceNow, ambianceTarget, easeAmbiance, eyeUnderTheGround, FADE_SECONDS, groundHoleOpenNode, groundHoleOpenNow, stepAmbianceProgress, temporarilyWithoutAmbiance, UNDERGROUND_RIM, UNDERGROUND_RING, undergroundAmbianceNode, } from './lib/underground-ambiance';
|
|
62
70
|
export { createZoneShape, createZoneWallGeometry } from './lib/zone-geometry';
|
|
63
71
|
export { catalogLightSource, useItemLightPool } from './store/use-item-light-pool';
|
|
64
|
-
export { applyCountryUnitDefault, default as useViewer, } from './store/use-viewer';
|
|
72
|
+
export { anyGroundVeiled, applyCountryUnitDefault, DEFAULT_UNDERGROUND_LOOK, default as useViewer, groundVeiled, siteGroundShown, } from './store/use-viewer';
|
|
65
73
|
export { CEILING_REGION_MESH, CeilingSystem, } from './systems/ceiling/ceiling-system';
|
|
66
74
|
export { createColumnBoxGeometry, createColumnCylinderGeometry, createColumnSphereGeometry, createColumnTorusGeometry, } from './systems/column/column-geometry';
|
|
75
|
+
export { ConstructionReveal, emitRevealPuff, getRetractTurn, getRevealPlanSpeed, getRevealPlanState, getRevealTurn, isNodeRevealing, isRevealAssembling, retractNodes, revealChangedNodeIds, revealClockMs, revealMotionOff, seatLiftedNow, setRevealPreroll, startConstructionReveal, subscribeRevealAssembling, subscribeRevealEvents, subscribeRevealPhases, subscribeRevealTicks, useRevealPending, useRevealPlanActive, useRevealWaiting, } from './systems/construction-reveal/construction-reveal';
|
|
67
76
|
export { DoorAnimationSystem } from './systems/door/door-animation-system';
|
|
68
77
|
export { buildDoorPreviewMesh, DoorSystem, poseDoorMovingParts } from './systems/door/door-system';
|
|
69
78
|
export { ElevatorInteractionSystem } from './systems/elevator/elevator-interaction-system';
|
|
@@ -81,13 +90,13 @@ export { ScriptedClips, useClipActions, } from './systems/interactive/scripted-c
|
|
|
81
90
|
export { ItemSystem } from './systems/item/item-system';
|
|
82
91
|
export { ItemLightSystem } from './systems/item-light/item-light-system';
|
|
83
92
|
export { LevelSystem } from './systems/level/level-system';
|
|
84
|
-
export { EXPLODED_GAP, getLevelPresentationY, snapLevelsToTruePositions, } from './systems/level/level-utils';
|
|
93
|
+
export { EXPLODED_GAP, getLevelPresentationY, presentLevelsForCapture, snapLevelsToTruePositions, } from './systems/level/level-utils';
|
|
85
94
|
export { getRoofMaterialArray, levelWallCladdingRef } from './systems/roof/roof-materials';
|
|
86
95
|
// Generic roof-segment primitives. Kinds that compose CSG against
|
|
87
96
|
// the roof shell (chimney's self-trim, dormer's virtual-segment cut)
|
|
88
97
|
// read these through the public surface. No kind-specific helpers
|
|
89
98
|
// belong here — those live in `@pascal-app/nodes/<kind>/`.
|
|
90
|
-
export { clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, } from './systems/roof/roof-system';
|
|
99
|
+
export { clipDirectRoofGeometryAgainstSiblings, clipGeometryBySegmentTrim, generateRoofSegmentGeometry, getPendingRoofMergeCount, getRoofOuterSurfaceFrameAtPoint, getRoofSegmentBrushes, mapRoofGroupMaterialIndex, ROOF_MATERIAL_SLOT_COUNT, RoofSystem, remapRoofShellFaces, roofCsgDummyMats, } from './systems/roof/roof-system';
|
|
91
100
|
export { ScanSystem } from './systems/scan/scan-system';
|
|
92
101
|
// Pure slab geometry generator — composed into the registry-driven slab
|
|
93
102
|
// definition's `def.geometry` in `@pascal-app/nodes`.
|
package/dist/lib/backdrop.d.ts
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
import { type ToneMapping } from 'three';
|
|
2
|
+
import type { SceneTheme } from './scene-themes';
|
|
3
|
+
/** Null explicitly removes the gradient; an omitted sky keeps the theme's derived atmosphere. */
|
|
4
|
+
export declare function backdropColors(theme: Pick<SceneTheme, 'background' | 'backgroundSky' | 'appearance'>): {
|
|
5
|
+
background: string;
|
|
6
|
+
sky: string;
|
|
7
|
+
haze: string;
|
|
8
|
+
skyDeep: string;
|
|
9
|
+
};
|
|
10
|
+
/** Flat authored colours are display colours; only the foreground is exposed and tone mapped. */
|
|
11
|
+
export declare function flatBackdropOutput({ background, foreground, alpha, toneMapping, outputColorSpace, }: {
|
|
12
|
+
background: any;
|
|
13
|
+
foreground: any;
|
|
14
|
+
alpha: any;
|
|
15
|
+
toneMapping: ToneMapping;
|
|
16
|
+
outputColorSpace: string;
|
|
17
|
+
}): any;
|
|
1
18
|
/**
|
|
2
19
|
* Shared backdrop gradient: flat background looking down, a warm haze band
|
|
3
20
|
* hugging the horizon, the theme sky arriving just above it and deepening
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../src/lib/backdrop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../src/lib/backdrop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,OAAO,CAAA;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,iGAAiG;AACjG,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,eAAe,GAAG,YAAY,CAAC;;;;;EASvE;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,UAAU,EACV,KAAK,EACL,WAAW,EACX,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,GAAG,CAAA;IACf,UAAU,EAAE,GAAG,CAAA;IACf,KAAK,EAAE,GAAG,CAAA;IACV,WAAW,EAAE,WAAW,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;CACzB,GAAG,GAAG,CAIN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,GAAG,EACH,OAAO,GACR,EAAE;IACD,IAAI,EAAE,GAAG,CAAA;IACT,UAAU,EAAE,GAAG,CAAA;IACf,IAAI,EAAE,GAAG,CAAA;IACT,GAAG,EAAE,GAAG,CAAA;IACR,OAAO,EAAE,GAAG,CAAA;CACb,GAAG,GAAG,CAUN;AAMD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAWlF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAyChD"}
|
package/dist/lib/backdrop.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NoToneMapping } from 'three';
|
|
2
|
+
import { abs, exp, mix, renderOutput, smoothstep, vec4 } from 'three/tsl';
|
|
3
|
+
/** Null explicitly removes the gradient; an omitted sky keeps the theme's derived atmosphere. */
|
|
4
|
+
export function backdropColors(theme) {
|
|
5
|
+
const sky = theme.backgroundSky ?? theme.background;
|
|
6
|
+
return {
|
|
7
|
+
background: theme.background,
|
|
8
|
+
sky,
|
|
9
|
+
haze: theme.backgroundSky === null ? theme.background : horizonHazeColor(sky, theme.appearance),
|
|
10
|
+
skyDeep: theme.backgroundSky === null ? theme.background : deepSkyColor(sky),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** Flat authored colours are display colours; only the foreground is exposed and tone mapped. */
|
|
14
|
+
export function flatBackdropOutput({ background, foreground, alpha, toneMapping, outputColorSpace, }) {
|
|
15
|
+
const backdrop = renderOutput(vec4(background, 1), NoToneMapping, outputColorSpace).rgb;
|
|
16
|
+
const scene = renderOutput(vec4(foreground, 1), toneMapping, outputColorSpace).rgb;
|
|
17
|
+
return vec4(mix(backdrop, scene, alpha), 1);
|
|
18
|
+
}
|
|
2
19
|
/**
|
|
3
20
|
* Shared backdrop gradient: flat background looking down, a warm haze band
|
|
4
21
|
* hugging the horizon, the theme sky arriving just above it and deepening
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Camera, Vector3 } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* One pool for every puff on screen; a full pool reuses the oldest sprite. A big agent build
|
|
4
|
+
* (Victor run 11: 1,545 walls in 6 s) puffs about 2,000 sprites a lifetime.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DUST_CAPACITY = 2048;
|
|
7
|
+
/** A sprite never draws smaller than this on screen, so a whole-building view still shows its dust. */
|
|
8
|
+
export declare const DUST_MIN_PX = 12;
|
|
9
|
+
/** How long a sprite lives, in milliseconds. */
|
|
10
|
+
export declare const DUST_LIFE_MS = 800;
|
|
11
|
+
/**
|
|
12
|
+
* Construction dust as plain numbers: a fixed ring of sprites, each with its
|
|
13
|
+
* birth time, start point, velocity and size. Nothing allocates after
|
|
14
|
+
* construction. The ring order is the birth order, so the slot after the
|
|
15
|
+
* newest is always the oldest — the one a full pool gives up first.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DustPool {
|
|
18
|
+
readonly capacity: number;
|
|
19
|
+
private readonly lifeMs;
|
|
20
|
+
private readonly born;
|
|
21
|
+
private readonly data;
|
|
22
|
+
private next;
|
|
23
|
+
private warmFrames;
|
|
24
|
+
private latestMs;
|
|
25
|
+
private lastEmitMs;
|
|
26
|
+
constructor(capacity?: number, lifeMs?: number);
|
|
27
|
+
/** Sprites alive at the latest time the pool has seen. */
|
|
28
|
+
get live(): number;
|
|
29
|
+
/** True when nothing emitted within a lifetime of `nowMs` can still be alive: a cheap idle check. */
|
|
30
|
+
quietAt(nowMs: number): boolean;
|
|
31
|
+
emit(x: number, y: number, z: number, vx: number, vy: number, vz: number, size: number, nowMs: number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Advances to `nowMs`: expired sprites are dropped, and `write` receives
|
|
34
|
+
* every live one with its current position, size and opacity. Returns how
|
|
35
|
+
* many are alive.
|
|
36
|
+
*/
|
|
37
|
+
step(nowMs: number, write: (slot: number, x: number, y: number, z: number, size: number, alpha: number) => void): number;
|
|
38
|
+
/**
|
|
39
|
+
* Asks the drawing side for a few frames of one invisible sprite: the first puff of a build would
|
|
40
|
+
* otherwise pay for the sprite material's first draw in the middle of the walls rising.
|
|
41
|
+
*/
|
|
42
|
+
requestWarm(frames?: number): void;
|
|
43
|
+
/** One warm frame, if any is asked for. */
|
|
44
|
+
takeWarm(): boolean;
|
|
45
|
+
clear(): void;
|
|
46
|
+
}
|
|
47
|
+
/** A sprite's size in metres at `point`: its own, or DUST_MIN_PX on a screen `heightPx` tall. */
|
|
48
|
+
export declare function dustSpriteSize(size: number, camera: Camera, heightPx: number, point: Vector3): number;
|
|
49
|
+
/** A rising wall's puff: sprites along its base line, pushed out to either side. */
|
|
50
|
+
export declare function emitAlongBase(pool: DustPool, from: Vector3, to: Vector3, nowMs: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* A landing's puff: sprites around the footprint `corners` (four points of
|
|
53
|
+
* its base, in order), pushed outwards. `strength` in [0, 1] scales the
|
|
54
|
+
* cloud, so a crate makes less dust than a column.
|
|
55
|
+
*/
|
|
56
|
+
export declare function emitAroundFoot(pool: DustPool, corners: readonly Vector3[], strength: number, nowMs: number): void;
|
|
57
|
+
//# sourceMappingURL=construction-dust.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-dust.d.ts","sourceRoot":"","sources":["../../src/lib/construction-dust.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAyC,OAAO,EAAE,MAAM,OAAO,CAAA;AAEnF;;;GAGG;AACH,eAAO,MAAM,aAAa,OAAO,CAAA;AACjC,uGAAuG;AACvG,eAAO,MAAM,WAAW,KAAK,CAAA;AAC7B,gDAAgD;AAChD,eAAO,MAAM,YAAY,MAAM,CAAA;AAQ/B;;;;;GAKG;AACH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,IAAI,CAAI;IAChB,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,UAAU,CAA2B;IAE7C,YAAY,QAAQ,SAAgB,EAAE,MAAM,SAAe,EAK1D;IAED,0DAA0D;IAC1D,IAAI,IAAI,IAAI,MAAM,CAOjB;IAED,qGAAqG;IACrG,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9B;IAED,IAAI,CACF,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,QAed;IAED;;;;OAIG;IACH,IAAI,CACF,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAC1F,MAAM,CAsBR;IAED;;;OAGG;IACH,WAAW,CAAC,MAAM,SAAI,QAErB;IAED,2CAA2C;IAC3C,QAAQ,IAAI,OAAO,CAIlB;IAED,KAAK,SAIJ;CACF;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,UAc5F;AAYD,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAsBtF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,SAAS,OAAO,EAAE,EAC3B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,QA+Cd"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One pool for every puff on screen; a full pool reuses the oldest sprite. A big agent build
|
|
3
|
+
* (Victor run 11: 1,545 walls in 6 s) puffs about 2,000 sprites a lifetime.
|
|
4
|
+
*/
|
|
5
|
+
export const DUST_CAPACITY = 2048;
|
|
6
|
+
/** A sprite never draws smaller than this on screen, so a whole-building view still shows its dust. */
|
|
7
|
+
export const DUST_MIN_PX = 12;
|
|
8
|
+
/** How long a sprite lives, in milliseconds. */
|
|
9
|
+
export const DUST_LIFE_MS = 800;
|
|
10
|
+
/** Sprites slow down as the cloud spreads, rise a little, and grow as they thin out. */
|
|
11
|
+
const DRAG_PER_S = 2.2;
|
|
12
|
+
const RISE_M_PER_S = 0.25;
|
|
13
|
+
const GROWTH = 1.8;
|
|
14
|
+
const ALPHA = 0.42;
|
|
15
|
+
/**
|
|
16
|
+
* Construction dust as plain numbers: a fixed ring of sprites, each with its
|
|
17
|
+
* birth time, start point, velocity and size. Nothing allocates after
|
|
18
|
+
* construction. The ring order is the birth order, so the slot after the
|
|
19
|
+
* newest is always the oldest — the one a full pool gives up first.
|
|
20
|
+
*/
|
|
21
|
+
export class DustPool {
|
|
22
|
+
capacity;
|
|
23
|
+
lifeMs;
|
|
24
|
+
born;
|
|
25
|
+
data;
|
|
26
|
+
next = 0;
|
|
27
|
+
warmFrames = 0;
|
|
28
|
+
latestMs = Number.NEGATIVE_INFINITY;
|
|
29
|
+
lastEmitMs = Number.NEGATIVE_INFINITY;
|
|
30
|
+
constructor(capacity = DUST_CAPACITY, lifeMs = DUST_LIFE_MS) {
|
|
31
|
+
this.capacity = capacity;
|
|
32
|
+
this.lifeMs = lifeMs;
|
|
33
|
+
this.born = new Float64Array(capacity).fill(Number.NEGATIVE_INFINITY);
|
|
34
|
+
this.data = new Float32Array(capacity * 7);
|
|
35
|
+
}
|
|
36
|
+
/** Sprites alive at the latest time the pool has seen. */
|
|
37
|
+
get live() {
|
|
38
|
+
let alive = 0;
|
|
39
|
+
for (let slot = 0; slot < this.capacity; slot += 1) {
|
|
40
|
+
const age = this.latestMs - this.born[slot];
|
|
41
|
+
if (age >= 0 && age < this.lifeMs)
|
|
42
|
+
alive += 1;
|
|
43
|
+
}
|
|
44
|
+
return alive;
|
|
45
|
+
}
|
|
46
|
+
/** True when nothing emitted within a lifetime of `nowMs` can still be alive: a cheap idle check. */
|
|
47
|
+
quietAt(nowMs) {
|
|
48
|
+
return nowMs - this.lastEmitMs >= this.lifeMs;
|
|
49
|
+
}
|
|
50
|
+
emit(x, y, z, vx, vy, vz, size, nowMs) {
|
|
51
|
+
const slot = this.next;
|
|
52
|
+
this.next = (slot + 1) % this.capacity;
|
|
53
|
+
this.latestMs = Math.max(this.latestMs, nowMs);
|
|
54
|
+
this.lastEmitMs = Math.max(this.lastEmitMs, nowMs);
|
|
55
|
+
this.born[slot] = nowMs;
|
|
56
|
+
const offset = slot * 7;
|
|
57
|
+
this.data[offset] = x;
|
|
58
|
+
this.data[offset + 1] = y;
|
|
59
|
+
this.data[offset + 2] = z;
|
|
60
|
+
this.data[offset + 3] = vx;
|
|
61
|
+
this.data[offset + 4] = vy;
|
|
62
|
+
this.data[offset + 5] = vz;
|
|
63
|
+
this.data[offset + 6] = size;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Advances to `nowMs`: expired sprites are dropped, and `write` receives
|
|
67
|
+
* every live one with its current position, size and opacity. Returns how
|
|
68
|
+
* many are alive.
|
|
69
|
+
*/
|
|
70
|
+
step(nowMs, write) {
|
|
71
|
+
this.latestMs = Math.max(this.latestMs, nowMs);
|
|
72
|
+
let alive = 0;
|
|
73
|
+
for (let slot = 0; slot < this.capacity; slot += 1) {
|
|
74
|
+
const age = nowMs - this.born[slot];
|
|
75
|
+
if (!(age >= 0 && age < this.lifeMs))
|
|
76
|
+
continue;
|
|
77
|
+
const life = age / this.lifeMs;
|
|
78
|
+
const seconds = age / 1000;
|
|
79
|
+
// Distance travelled under linear drag: v·(1 − e^(−k·t))/k.
|
|
80
|
+
const travel = (1 - Math.exp(-DRAG_PER_S * seconds)) / DRAG_PER_S;
|
|
81
|
+
const offset = slot * 7;
|
|
82
|
+
write(alive, this.data[offset] + this.data[offset + 3] * travel, this.data[offset + 1] + this.data[offset + 4] * travel + RISE_M_PER_S * seconds, this.data[offset + 2] + this.data[offset + 5] * travel, this.data[offset + 6] * (1 + GROWTH * Math.sqrt(life)), ALPHA * (1 - life) ** 2);
|
|
83
|
+
alive += 1;
|
|
84
|
+
}
|
|
85
|
+
return alive;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Asks the drawing side for a few frames of one invisible sprite: the first puff of a build would
|
|
89
|
+
* otherwise pay for the sprite material's first draw in the middle of the walls rising.
|
|
90
|
+
*/
|
|
91
|
+
requestWarm(frames = 3) {
|
|
92
|
+
this.warmFrames = Math.max(this.warmFrames, frames);
|
|
93
|
+
}
|
|
94
|
+
/** One warm frame, if any is asked for. */
|
|
95
|
+
takeWarm() {
|
|
96
|
+
if (this.warmFrames <= 0)
|
|
97
|
+
return false;
|
|
98
|
+
this.warmFrames -= 1;
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
clear() {
|
|
102
|
+
this.born.fill(Number.NEGATIVE_INFINITY);
|
|
103
|
+
this.next = 0;
|
|
104
|
+
this.lastEmitMs = Number.NEGATIVE_INFINITY;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** A sprite's size in metres at `point`: its own, or DUST_MIN_PX on a screen `heightPx` tall. */
|
|
108
|
+
export function dustSpriteSize(size, camera, heightPx, point) {
|
|
109
|
+
const metresPerPx = 'isOrthographicCamera' in camera
|
|
110
|
+
? (camera.top - camera.bottom) /
|
|
111
|
+
camera.zoom /
|
|
112
|
+
heightPx
|
|
113
|
+
: 'isPerspectiveCamera' in camera
|
|
114
|
+
? (2 *
|
|
115
|
+
camera.position.distanceTo(point) *
|
|
116
|
+
Math.tan((camera.fov * Math.PI) / 360)) /
|
|
117
|
+
camera.zoom /
|
|
118
|
+
heightPx
|
|
119
|
+
: 0;
|
|
120
|
+
return Math.max(size, DUST_MIN_PX * metresPerPx);
|
|
121
|
+
}
|
|
122
|
+
/** A fixed pseudo-random sequence: the same build puffs the same way, and tests stay stable. */
|
|
123
|
+
let seed = 0x2f6b9d1;
|
|
124
|
+
function random() {
|
|
125
|
+
seed = (Math.imul(seed ^ (seed >>> 15), 0x2c1b3c6d) + 0x6d2b79f5) | 0;
|
|
126
|
+
return ((seed >>> 0) % 100_000) / 100_000;
|
|
127
|
+
}
|
|
128
|
+
const PUFF_SPACING_M = 0.35;
|
|
129
|
+
const MAX_PUFFS = 16;
|
|
130
|
+
/** A rising wall's puff: sprites along its base line, pushed out to either side. */
|
|
131
|
+
export function emitAlongBase(pool, from, to, nowMs) {
|
|
132
|
+
const dx = to.x - from.x;
|
|
133
|
+
const dz = to.z - from.z;
|
|
134
|
+
const length = Math.hypot(dx, dz);
|
|
135
|
+
const count = Math.max(3, Math.min(MAX_PUFFS, Math.round(length / PUFF_SPACING_M) + 1));
|
|
136
|
+
const nx = length > 1e-6 ? -dz / length : 1;
|
|
137
|
+
const nz = length > 1e-6 ? dx / length : 0;
|
|
138
|
+
for (let index = 0; index < count; index += 1) {
|
|
139
|
+
const along = (index + 0.25 + random() * 0.5) / count;
|
|
140
|
+
const side = random() < 0.5 ? -1 : 1;
|
|
141
|
+
const speed = 0.35 + random() * 0.45;
|
|
142
|
+
pool.emit(from.x + dx * along, from.y + (to.y - from.y) * along + 0.05, from.z + dz * along, side * nx * speed + (random() - 0.5) * 0.2, 0.08 + random() * 0.12, side * nz * speed + (random() - 0.5) * 0.2, 0.22 + random() * 0.14, nowMs);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A landing's puff: sprites around the footprint `corners` (four points of
|
|
147
|
+
* its base, in order), pushed outwards. `strength` in [0, 1] scales the
|
|
148
|
+
* cloud, so a crate makes less dust than a column.
|
|
149
|
+
*/
|
|
150
|
+
export function emitAroundFoot(pool, corners, strength, nowMs) {
|
|
151
|
+
let cx = 0;
|
|
152
|
+
let cy = 0;
|
|
153
|
+
let cz = 0;
|
|
154
|
+
let perimeter = 0;
|
|
155
|
+
for (let index = 0; index < corners.length; index += 1) {
|
|
156
|
+
const a = corners[index];
|
|
157
|
+
const b = corners[(index + 1) % corners.length];
|
|
158
|
+
cx += a.x / corners.length;
|
|
159
|
+
cy += a.y / corners.length;
|
|
160
|
+
cz += a.z / corners.length;
|
|
161
|
+
perimeter += Math.hypot(b.x - a.x, b.z - a.z);
|
|
162
|
+
}
|
|
163
|
+
const count = Math.max(4, Math.min(MAX_PUFFS, Math.round((perimeter / 0.5) * strength) + 4));
|
|
164
|
+
for (let index = 0; index < count; index += 1) {
|
|
165
|
+
// A point on the perimeter, at an even share of its length.
|
|
166
|
+
let along = ((index + random() * 0.6) / count) * perimeter;
|
|
167
|
+
let x = cx;
|
|
168
|
+
let z = cz;
|
|
169
|
+
for (let edge = 0; edge < corners.length; edge += 1) {
|
|
170
|
+
const a = corners[edge];
|
|
171
|
+
const b = corners[(edge + 1) % corners.length];
|
|
172
|
+
const span = Math.hypot(b.x - a.x, b.z - a.z);
|
|
173
|
+
if (along <= span || edge === corners.length - 1) {
|
|
174
|
+
const f = span > 1e-6 ? Math.min(1, along / span) : 0;
|
|
175
|
+
x = a.x + (b.x - a.x) * f;
|
|
176
|
+
z = a.z + (b.z - a.z) * f;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
along -= span;
|
|
180
|
+
}
|
|
181
|
+
const ox = x - cx;
|
|
182
|
+
const oz = z - cz;
|
|
183
|
+
const reach = Math.hypot(ox, oz) || 1;
|
|
184
|
+
const speed = (0.3 + random() * 0.4) * (0.5 + strength / 2);
|
|
185
|
+
pool.emit(x, cy + 0.04, z, (ox / reach) * speed, 0.05 + random() * 0.1, (oz / reach) * speed, (0.14 + random() * 0.12) * (0.6 + strength * 0.4), nowMs);
|
|
186
|
+
}
|
|
187
|
+
}
|
package/dist/lib/csg-utils.js
CHANGED
|
@@ -81,7 +81,7 @@ export function computeGeometryBoundsTree(geometry) {
|
|
|
81
81
|
;
|
|
82
82
|
geometry.computeBoundsTree =
|
|
83
83
|
computeBoundsTree;
|
|
84
|
-
geometry.computeBoundsTree({
|
|
84
|
+
geometry.computeBoundsTree({ targetLeafSize: 10 });
|
|
85
85
|
}
|
|
86
86
|
export function prepareBrushForCSG(brush) {
|
|
87
87
|
ensureRenderableGeometryAttributes(brush.geometry);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MeshLambertNodeMaterial } from 'three/webgpu';
|
|
2
|
+
/** The flat colour each structure reads as where only a colour is wanted (the cutaway palette). */
|
|
3
|
+
export declare const STRUCTURE_COLORS: {
|
|
4
|
+
readonly cmu: "#97978f";
|
|
5
|
+
readonly concrete: "#8a8a86";
|
|
6
|
+
};
|
|
7
|
+
export type Masonry = {
|
|
8
|
+
course: number;
|
|
9
|
+
length: number;
|
|
10
|
+
joint: number;
|
|
11
|
+
colors: {
|
|
12
|
+
light: string;
|
|
13
|
+
dark: string;
|
|
14
|
+
};
|
|
15
|
+
mortar: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const BLOCK_MASONRY: Masonry;
|
|
18
|
+
/**
|
|
19
|
+
* Courses of running bond: each course half a unit over the one under it, mortar between. The
|
|
20
|
+
* courses are the world's (`positionWorld.y`), so a wall above a foundation bonds on its courses;
|
|
21
|
+
* `along` is the metres along the run, the foundation's own attribute by default, a wall's
|
|
22
|
+
* world-planar U where the geometry has none.
|
|
23
|
+
*/
|
|
24
|
+
export declare function masonryMaterial({ course: courseHeight, length, joint, colors, mortar }: Masonry, along?: any): MeshLambertNodeMaterial;
|
|
25
|
+
export declare function concreteMaterial(): MeshLambertNodeMaterial;
|
|
26
|
+
//# sourceMappingURL=foundation-materials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foundation-materials.d.ts","sourceRoot":"","sources":["../../src/lib/foundation-materials.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAkBtD,mGAAmG;AACnG,eAAO,MAAM,gBAAgB;aAC3B,GAAG;aACH,QAAQ;CACA,CAAA;AAUV,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACvC,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,OAM3B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAChE,KAAK,GAAE,GAA0C,2BAkBlD;AAED,wBAAgB,gBAAgB,4BAO/B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { FrontSide } from 'three';
|
|
2
|
+
import { attribute, color, float, floor, fract, mix, mod, mx_noise_float, normalLocal, positionWorld, smoothstep, step, vec3, } from 'three/tsl';
|
|
3
|
+
import { MeshLambertNodeMaterial } from 'three/webgpu';
|
|
4
|
+
/**
|
|
5
|
+
* How bare structure looks: courses of block, and cast concrete. The generic foundation under a
|
|
6
|
+
* building draws them (nodes `generic-foundation.tsx`), and a wall whose assembly has no cladding
|
|
7
|
+
* over a masonry or concrete core shows the same on its exterior face (`wall-materials.ts`), so a
|
|
8
|
+
* basement's walls above grade read as the foundation under them.
|
|
9
|
+
*/
|
|
10
|
+
const INCH = 0.0254;
|
|
11
|
+
/** A nominal 8 × 8 × 16 in block: the course is 8 in with its joint, a block 16 in long. */
|
|
12
|
+
const COURSE = 8 * INCH;
|
|
13
|
+
const BLOCK_LENGTH = 16 * INCH;
|
|
14
|
+
const JOINT = (3 / 8) * INCH;
|
|
15
|
+
const JOINT_SOFTNESS = 0.05;
|
|
16
|
+
const BLOCK_COLORS = { light: '#97978f', dark: '#827f78' };
|
|
17
|
+
const MORTAR_COLOR = '#b5b3aa';
|
|
18
|
+
const CONCRETE_COLORS = { light: '#8a8a86', dark: '#6f6e6a' };
|
|
19
|
+
/** The flat colour each structure reads as where only a colour is wanted (the cutaway palette). */
|
|
20
|
+
export const STRUCTURE_COLORS = {
|
|
21
|
+
cmu: BLOCK_COLORS.light,
|
|
22
|
+
concrete: CONCRETE_COLORS.light,
|
|
23
|
+
};
|
|
24
|
+
// TSL's own typings widen a float to a vec4 here, so the pieces are untyped.
|
|
25
|
+
function jointMask(inside, joint) {
|
|
26
|
+
const edge = joint / 2;
|
|
27
|
+
return smoothstep(float(edge), float(edge + JOINT_SOFTNESS), inside).mul(smoothstep(float(edge), float(edge + JOINT_SOFTNESS), float(1).sub(inside)));
|
|
28
|
+
}
|
|
29
|
+
export const BLOCK_MASONRY = {
|
|
30
|
+
course: COURSE,
|
|
31
|
+
length: BLOCK_LENGTH,
|
|
32
|
+
joint: JOINT,
|
|
33
|
+
colors: BLOCK_COLORS,
|
|
34
|
+
mortar: MORTAR_COLOR,
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Courses of running bond: each course half a unit over the one under it, mortar between. The
|
|
38
|
+
* courses are the world's (`positionWorld.y`), so a wall above a foundation bonds on its courses;
|
|
39
|
+
* `along` is the metres along the run, the foundation's own attribute by default, a wall's
|
|
40
|
+
* world-planar U where the geometry has none.
|
|
41
|
+
*/
|
|
42
|
+
export function masonryMaterial({ course: courseHeight, length, joint, colors, mortar }, along = attribute('along', 'float')) {
|
|
43
|
+
const material = new MeshLambertNodeMaterial({ side: FrontSide });
|
|
44
|
+
const rows = positionWorld.y.div(courseHeight);
|
|
45
|
+
const course = floor(rows);
|
|
46
|
+
const columns = along.div(length).add(mod(course, 2).mul(0.5));
|
|
47
|
+
const face = jointMask(fract(rows), joint / courseHeight).mul(jointMask(fract(columns), joint / length));
|
|
48
|
+
const shade = mx_noise_float(vec3(floor(columns), course, 0.5))
|
|
49
|
+
.mul(0.5)
|
|
50
|
+
.add(0.5);
|
|
51
|
+
const block = mix(color(colors.dark), color(colors.light), shade);
|
|
52
|
+
const patterned = mix(color(mortar), block, face);
|
|
53
|
+
// The top of a run is the plain block, whatever course the shader finds there.
|
|
54
|
+
const flat = step(float(0.5), normalLocal.y.abs());
|
|
55
|
+
material.colorNode = mix(patterned, block, flat);
|
|
56
|
+
return material;
|
|
57
|
+
}
|
|
58
|
+
export function concreteMaterial() {
|
|
59
|
+
const material = new MeshLambertNodeMaterial({ side: FrontSide });
|
|
60
|
+
const grain = mx_noise_float(positionWorld.mul(vec3(2.5, 2.5, 2.5)))
|
|
61
|
+
.mul(0.5)
|
|
62
|
+
.add(0.5);
|
|
63
|
+
material.colorNode = mix(color(CONCRETE_COLORS.dark), color(CONCRETE_COLORS.light), grain);
|
|
64
|
+
return material;
|
|
65
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Material, Object3D } from 'three';
|
|
2
|
+
export declare function importedUnlitMaterial(material: Material | null): boolean;
|
|
3
|
+
/** Native basic materials still use AO; imported unlit assets already own their lighting. */
|
|
4
|
+
export declare function preserveGltfUnlit(): {
|
|
5
|
+
name: string;
|
|
6
|
+
afterRoot({ scenes }: {
|
|
7
|
+
scenes: Object3D[];
|
|
8
|
+
}): null;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=gltf-unlit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gltf-unlit.d.ts","sourceRoot":"","sources":["../../src/lib/gltf-unlit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAQ,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,OAAO,CAExE;AAED,6FAA6F;AAC7F,wBAAgB,iBAAiB;IAE7B,IAAI;IACJ,SAAS,aAAa;QAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;KAAE;EAa/C"}
|