@woosh/meep-engine 2.168.0 → 2.169.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/README.md +2 -2
- package/build/bundle-worker-image-decoder.js +1 -1
- package/package.json +1 -1
- package/src/REVIEW_2026_08_06/adv-core.md +511 -0
- package/src/REVIEW_2026_08_06/adv-gfx.md +480 -0
- package/src/REVIEW_2026_08_06/adv-view.md +446 -0
- package/src/REVIEW_2026_08_06/api-core.md +296 -0
- package/src/REVIEW_2026_08_06/api-engine.md +195 -0
- package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +507 -0
- package/src/REVIEW_2026_08_06/core-binary.md +348 -0
- package/src/REVIEW_2026_08_06/core-collection.md +376 -0
- package/src/REVIEW_2026_08_06/core-math.md +221 -0
- package/src/REVIEW_2026_08_06/core-process.md +266 -0
- package/src/REVIEW_2026_08_06/core-science.md +223 -0
- package/src/REVIEW_2026_08_06/engine-ai-nav.md +279 -0
- package/src/REVIEW_2026_08_06/engine-animation.md +167 -0
- package/src/REVIEW_2026_08_06/engine-asset.md +166 -0
- package/src/REVIEW_2026_08_06/engine-ecs.md +920 -0
- package/src/REVIEW_2026_08_06/engine-input.md +197 -0
- package/src/REVIEW_2026_08_06/engine-misc.md +248 -0
- package/src/REVIEW_2026_08_06/engine-terrain.md +52 -0
- package/src/REVIEW_2026_08_06/generation.md +176 -0
- package/src/REVIEW_2026_08_06/geom-2d.md +434 -0
- package/src/REVIEW_2026_08_06/geom-3d.md +117 -0
- package/src/REVIEW_2026_08_06/gfx-gi.md +143 -0
- package/src/REVIEW_2026_08_06/gfx-render.md +740 -0
- package/src/REVIEW_2026_08_06/gfx-texture.md +690 -0
- package/src/REVIEW_2026_08_06/prior-criticals.md +49 -0
- package/src/REVIEW_2026_08_06/prior-highs.md +138 -0
- package/src/REVIEW_2026_08_06/test-gaps.md +364 -0
- package/src/REVIEW_2026_08_06/view.md +667 -0
- package/src/REVIEW_2026_08_06.md +571 -0
- package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
- package/src/core/binary/BinaryBuffer.js +12 -1
- package/src/core/binary/BitImage2.d.ts +5 -1
- package/src/core/binary/BitImage2.d.ts.map +1 -1
- package/src/core/binary/BitImage2.js +5 -1
- package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -1
- package/src/core/bvh8/build/NodeProxy.js +314 -308
- package/src/core/collection/list/List.d.ts +15 -0
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +34 -0
- package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
- package/src/core/collection/list/SortedListProjection.js +4 -1
- package/src/core/collection/map/BiMap.d.ts +25 -2
- package/src/core/collection/map/BiMap.d.ts.map +1 -1
- package/src/core/collection/map/BiMap.js +57 -3
- package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
- package/src/core/debug/matchers/IsAnything.js +5 -1
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +3 -1
- package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +433 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts +31 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.js +84 -0
- package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts +24 -2
- package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts.map +1 -1
- package/src/core/geom/2d/polygon/polygon2_signed_area.js +52 -34
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +28 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +86 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts +40 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.js +1280 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts +28 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.js +77 -0
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +6 -3
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -1
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +26 -13
- package/src/core/geom/2d/triangle/tri2_signed_area.d.ts +17 -1
- package/src/core/geom/2d/triangle/tri2_signed_area.d.ts.map +1 -1
- package/src/core/geom/2d/triangle/tri2_signed_area.js +35 -23
- package/src/core/geom/2d/v2_morton_encode.d.ts +20 -0
- package/src/core/geom/2d/v2_morton_encode.d.ts.map +1 -0
- package/src/core/geom/2d/v2_morton_encode.js +23 -0
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +4 -1
- package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts +27 -0
- package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts.map +1 -0
- package/src/core/geom/3d/polygon/polygon3_compute_normal.js +60 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts +34 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts.map +1 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.js +94 -0
- package/src/core/geom/3d/quaternion/quat3_multiply.d.ts +8 -2
- package/src/core/geom/3d/quaternion/quat3_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/quaternion/quat3_multiply.js +8 -2
- package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.js +32 -2
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts +23 -6
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.js +268 -124
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts +17 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.js +44 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts +20 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.js +40 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts +19 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.js +34 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts +22 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.js +37 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts +87 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js +599 -0
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts +32 -0
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.js +66 -7
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts +22 -1
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.js +83 -38
- package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +554 -0
- package/src/core/geom/vec3/v3_cotangent.d.ts +6 -2
- package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_cotangent.js +6 -2
- package/src/core/geom/vec3/v3_cross.d.ts +6 -2
- package/src/core/geom/vec3/v3_cross.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_cross.js +6 -2
- package/src/core/geom/vec3/v3_multiply.d.ts +6 -2
- package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_multiply.js +6 -2
- package/src/core/geom/vec3/v3_subtract.d.ts +6 -2
- package/src/core/geom/vec3/v3_subtract.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_subtract.js +6 -2
- package/src/core/localization/Localization.js +1 -1
- package/src/core/math/random/randomSeed.d.ts +13 -0
- package/src/core/math/random/randomSeed.d.ts.map +1 -0
- package/src/core/math/random/randomSeed.js +16 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.d.ts +50 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.d.ts.map +1 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.js +107 -0
- package/src/core/math/spline/spline3_hermite_reverse.d.ts +34 -0
- package/src/core/math/spline/spline3_hermite_reverse.d.ts.map +1 -0
- package/src/core/math/spline/spline3_hermite_reverse.js +49 -0
- package/src/core/math/statistics/hammersley_sequence.d.ts +17 -4
- package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
- package/src/core/math/statistics/hammersley_sequence.js +25 -16
- package/src/core/process/Future.d.ts.map +1 -1
- package/src/core/process/Future.js +12 -0
- package/src/core/process/PromiseWatcher.d.ts.map +1 -1
- package/src/core/process/PromiseWatcher.js +9 -2
- package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
- package/src/core/process/executor/ConcurrentExecutor.js +12 -2
- package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
- package/src/core/process/worker/WorkerProxy.js +5 -2
- package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
- package/src/core/process/worker/extractTransferables.js +4 -1
- package/src/engine/Engine.d.ts +12 -12
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +149 -10
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +4 -1
- package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
- package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
- package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.js +4 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +29 -0
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +84 -23
- package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
- package/src/engine/graphics/GraphicsEngine.d.ts +56 -7
- package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +196 -24
- package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
- package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
- package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
- package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
- package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
- package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextState.js +24 -0
- package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
- package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
- package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +5 -0
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts +5 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.js +15 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +4 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +488 -476
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +280 -253
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
- package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
- package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
- package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
- package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
- package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
- package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
- package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
- package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
- package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
- package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +11 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +158 -171
- package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
- package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
- package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +38 -13
- package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
- package/src/engine/physics/contact/ManifoldStore.js +15 -3
- package/src/engine/physics/ecs/Joint.d.ts +7 -4
- package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
- package/src/engine/physics/ecs/Joint.js +7 -4
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
- package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
- package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
- package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
- package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
- package/src/engine/physics/queries/raycast.d.ts.map +1 -1
- package/src/engine/physics/queries/raycast.js +11 -4
- package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
- package/src/engine/save/storage/IndexedDBStorage.js +21 -3
- package/src/engine/simulation/Ticker.d.ts +12 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +18 -0
- package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
- package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
- package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
- package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/VolumeField.js +6 -2
- package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
- package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
- package/src/engine/ui/GUIEngine.d.ts.map +1 -1
- package/src/engine/ui/GUIEngine.js +8 -1
- package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
- package/src/generation/theme/TerrainTheme.js +2 -1
- package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
- package/src/generation/theme/ThemeEngine.js +6 -5
- package/src/view/ViewGroup.d.ts.map +1 -1
- package/src/view/ViewGroup.js +9 -7
- package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
- package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
- package/src/view/graphics/WebGLContextFailureView.js +76 -0
- package/src/view/minimap/Minimap.d.ts +8 -0
- package/src/view/minimap/Minimap.d.ts.map +1 -1
- package/src/view/minimap/Minimap.js +16 -3
- package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
- package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { EnvironmentTextureProjection } from "./texture/EnvironmentTextureProjection.js";
|
|
2
|
+
import { buildCubeURLs } from "./texture/cubemap/buildCubeURLs.js";
|
|
3
|
+
import { load_environment_map } from "./texture/cubemap/load_environment_map.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loads a piece-wise cubemap and installs it as the scene's image-based-lighting source.
|
|
7
|
+
*
|
|
8
|
+
* The prefiltering (PMREM) is performed by the graphics engine rather than the loader, so that the
|
|
9
|
+
* engine keeps hold of the source texture and can repeat the bake - the prefiltered result lives in a
|
|
10
|
+
* render target and does not survive a WebGL context loss.
|
|
11
|
+
*
|
|
12
|
+
* @param {GraphicsEngine} graphics
|
|
13
|
+
* @param {string} folder_path
|
|
14
|
+
* @param {string} file_extension
|
|
15
|
+
*/
|
|
16
|
+
export async function load_and_set_cubemap_v0(graphics, folder_path, file_extension) {
|
|
17
|
+
const paths = buildCubeURLs(folder_path, file_extension);
|
|
18
|
+
|
|
19
|
+
const { original } = await load_environment_map({
|
|
20
|
+
path: paths,
|
|
21
|
+
original: true,
|
|
22
|
+
filtered: false
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
graphics.set_environment_map(original, EnvironmentTextureProjection.Cube);
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleGroup.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/group/ParticleGroup.js"],"names":[],"mappings":"AAoBA;IACI;;;;;OAKG;IACH,qDAHW,OAAO,EA8CjB;IA1CG,mBAA0B;IAC1B;;;OAGG;IACH,4BAAgB;IAEhB,kBAAoB;IAEpB;;;OAGG;IACH,cAAuC;IAEvC;;;OAGG;IACH,UAAa;IAEb;;;OAGG;IACH,cAAmB;IAEnB,mBAAqB;IACrB,qBAAuB;IAEvB,oCAAqC;IACrC,4BAA8B;IAE9B;;;OAGG;IACH,cAFU,MAAO,SAAS,CAAC,CAEL;IAEtB,sBAAiC;IAKrC;;;;;OAKG;IACH,+BAJW,YAAY,GAAC,YAAY,GAAC,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,UAAU,GAAC,UAAU,GAAC,SAAS,kBAE1F,wBAAwB,GAAC,eAAe,CAQpD;IAED;;;OAGG;IACH,oBAFa,uBAAuB,GAAC,cAAc,CAUlD;IAED,cAmCC;IAED;;OAEG;IACH,gCAcC;IAED,cASC;IAED;;;OAGG;IACH,UAFa,OAAO,CAanB;IAED,6BAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,UAFa,MAAM,CASlB;IAED;;OAEG;IACH,6BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,uCAIC;IAED;;;;;OAKG;IACH,2DAFW,MAAO,MAAM,CAAC,QAIxB;IAED;;;;;OAKG;IACH,4BAJW,MAAM,kBACN,MAAM,UACN,QAAM,YAAY,GAAC,YAAY,GAAC,UAAU,QAapD;IAED,sEAKC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAIlB;IAED,0BAKC;IAED,2CAaC;IAED,8CAkBC;IAED;;;;;OAKG;IACH,2EAFW,MAAM,EAAE,QAclB;IAED;;;;;OAKG;IACH,kFAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,0GAiBC;IAED;;;;;;;;OAQG;IACH,kHAkBC;IAED;;;OAGG;IACH,4BAFW,SAAS,QA+BnB;IAED;;;OAGG;IACH,uBAFW,UAAW,
|
|
1
|
+
{"version":3,"file":"ParticleGroup.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/particles/particular/group/ParticleGroup.js"],"names":[],"mappings":"AAoBA;IACI;;;;;OAKG;IACH,qDAHW,OAAO,EA8CjB;IA1CG,mBAA0B;IAC1B;;;OAGG;IACH,4BAAgB;IAEhB,kBAAoB;IAEpB;;;OAGG;IACH,cAAuC;IAEvC;;;OAGG;IACH,UAAa;IAEb;;;OAGG;IACH,cAAmB;IAEnB,mBAAqB;IACrB,qBAAuB;IAEvB,oCAAqC;IACrC,4BAA8B;IAE9B;;;OAGG;IACH,cAFU,MAAO,SAAS,CAAC,CAEL;IAEtB,sBAAiC;IAKrC;;;;;OAKG;IACH,+BAJW,YAAY,GAAC,YAAY,GAAC,WAAW,GAAC,WAAW,GAAC,UAAU,GAAC,UAAU,GAAC,UAAU,GAAC,SAAS,kBAE1F,wBAAwB,GAAC,eAAe,CAQpD;IAED;;;OAGG;IACH,oBAFa,uBAAuB,GAAC,cAAc,CAUlD;IAED,cAmCC;IAED;;OAEG;IACH,gCAcC;IAED,cASC;IAED;;;OAGG;IACH,UAFa,OAAO,CAanB;IAED,6BAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,UAFa,MAAM,CASlB;IAED;;OAEG;IACH,6BAEC;IAED;;;OAGG;IACH,kCAEC;IAED,uCAIC;IAED;;;;;OAKG;IACH,2DAFW,MAAO,MAAM,CAAC,QAIxB;IAED;;;;;OAKG;IACH,4BAJW,MAAM,kBACN,MAAM,UACN,QAAM,YAAY,GAAC,YAAY,GAAC,UAAU,QAapD;IAED,sEAKC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAIlB;IAED,0BAKC;IAED,2CAaC;IAED,8CAkBC;IAED;;;;;OAKG;IACH,2EAFW,MAAM,EAAE,QAclB;IAED;;;;;OAKG;IACH,kFAFW,MAAM,QAahB;IAED;;;;;;;OAOG;IACH,0GAiBC;IAED;;;;;;;;OAQG;IACH,kHAkBC;IAED;;;OAGG;IACH,4BAFW,SAAS,QA+BnB;IAED;;;OAGG;IACH,uBAFW,UAAW,QA2FrB;IAED;;;;OAIG;IACH,4BAHW,MAAM,UACN,MAAM,QAiChB;IAED;;;;OAIG;IACH,aAHW,MAAM,UACN,MAAM,QAahB;IAED;;;OAGG;IACH,0BAKC;IAED,kCAMC;IAED,mCAaC;IAED;;;OAGG;IACH,4BAIC;CACJ;0BArnByB,gBAAgB;mBAHvB,+BAA+B;yCAD3C,OAAO;gCAAP,OAAO;wCAAP,OAAO;+BAAP,OAAO"}
|
|
@@ -471,24 +471,35 @@ export class ParticleGroup {
|
|
|
471
471
|
|
|
472
472
|
let numSwapElements = 0;
|
|
473
473
|
const swaps = [];
|
|
474
|
-
let swapDestination = this.size - 1;
|
|
475
474
|
|
|
476
475
|
let i, j;
|
|
477
476
|
|
|
478
|
-
|
|
477
|
+
//Compaction: every hole below the new size is backfilled with a live
|
|
478
|
+
//element taken from the tail block that is about to be discarded. Each
|
|
479
|
+
//backfill must consume a *different* source -- reusing one duplicates
|
|
480
|
+
//that particle into several slots and silently drops the others.
|
|
481
|
+
let source = oldSize - 1;
|
|
482
|
+
let tailVictim = deleteCount - 1;
|
|
483
|
+
|
|
484
|
+
for (i = 0; i < deleteCount; i++) {
|
|
479
485
|
const victim = indices[i];
|
|
480
486
|
|
|
481
|
-
if (
|
|
482
|
-
|
|
487
|
+
if (victim >= newSize) {
|
|
488
|
+
//indices ascend, so this and everything after it already sits
|
|
489
|
+
//inside the discarded tail and needs no backfill
|
|
490
|
+
break;
|
|
483
491
|
}
|
|
484
492
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
493
|
+
//a tail slot that is itself being deleted is not a live source
|
|
494
|
+
while (tailVictim >= 0 && indices[tailVictim] === source) {
|
|
495
|
+
tailVictim--;
|
|
496
|
+
source--;
|
|
488
497
|
}
|
|
489
498
|
|
|
490
|
-
swaps.push(victim,
|
|
499
|
+
swaps.push(victim, source);
|
|
491
500
|
numSwapElements += 2;
|
|
501
|
+
|
|
502
|
+
source--;
|
|
492
503
|
}
|
|
493
504
|
|
|
494
505
|
|
|
@@ -140,7 +140,7 @@ export function optimizeCommandQueue(queue) {
|
|
|
140
140
|
//it's important that Add and Remove operations are sorted to the front of the queue, before Write operations
|
|
141
141
|
if (operatorA < operatorB) {
|
|
142
142
|
return -1;
|
|
143
|
-
} else if (
|
|
143
|
+
} else if (operatorA > operatorB) {
|
|
144
144
|
return 1;
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AtlasLookupTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/AtlasLookupTexture.js"],"names":[],"mappings":"AAEA;IAEQ;;;OAGG;IACH,OAFU,eAAa,IAAI,CAEV;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,eAAgC;IAEhC,qBAAiD;
|
|
1
|
+
{"version":3,"file":"AtlasLookupTexture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/AtlasLookupTexture.js"],"names":[],"mappings":"AAEA;IAEQ;;;OAGG;IACH,OAFU,eAAa,IAAI,CAEV;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,eAAgC;IAEhC,qBAAiD;IAYrD;;;OAGG;IACH,kCAEC;IAED,eA+CC;CACJ;4BA5FgF,OAAO"}
|
|
@@ -29,7 +29,9 @@ export class AtlasLookupTexture {
|
|
|
29
29
|
this.texture.magFilter = NearestFilter;
|
|
30
30
|
this.texture.minFilter = NearestFilter;
|
|
31
31
|
this.texture.generateMipmaps = false;
|
|
32
|
-
|
|
32
|
+
// four channels are written per record, so the internal format has to be
|
|
33
|
+
// the four-channel one to match RGBAIntegerFormat
|
|
34
|
+
this.texture.internalFormat = 'RGBA16UI';
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -49,13 +51,18 @@ export class AtlasLookupTexture {
|
|
|
49
51
|
|
|
50
52
|
const rowSize = this.__row_size;
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
// at least one row: a zero-height texture is not a valid GL allocation,
|
|
55
|
+
// and an atlas legitimately starts out with no patches
|
|
56
|
+
const expected_row_count = Math.max(1, Math.ceil(patch_count / rowSize));
|
|
53
57
|
|
|
54
58
|
const texture = this.texture;
|
|
55
59
|
|
|
56
60
|
const image = texture.image;
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
// the texture starts out 1x1, so a height-only check is satisfied by any
|
|
63
|
+
// patch count that fits in a single row and no storage is ever allocated
|
|
64
|
+
// for it -- writes past the first record are then silently dropped
|
|
65
|
+
if (image.width !== rowSize || image.height < expected_row_count) {
|
|
59
66
|
texture.dispose();
|
|
60
67
|
|
|
61
68
|
image.height = expected_row_count;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/TextureAtlas.js"],"names":[],"mappings":"AAkBA;IACI;;;;;;OAMG;IACH,mBALW,MAAM,cACN,cAAc,kBACd,MAAM,EA2DhB;IAjDG;;;;OAIG;IACH,eAA0B;IAE1B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAFU,OAAO,CAEkB;IAInC;;;;OAIG;IACH,2BAAgH;IAGhH;;;OAGG;IACH,eAAiD;IAEjD;;QAEI;;WAEG;;MAEN;IAED;;;;OAIG;IACH,sBAA0B;IAG9B;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,kBAHW,SAAS,GACP,UAAU,GAAC,SAAS,CAYhC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAQnB;IAED;;OAEG;IACH,cAkBC;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,GACJ,OAAO,CA0CnB;IAED;;;;OAIG;IACH,mBAqBC;IAED;;;;OAIG;IACH,mBAaC;IAED;;;;;;OAMG;IACH,kBAIC;IAED;;;;;OAKG;IACH,aAJW,SAAS,YACT,MAAM,GACL,UAAU,CAgCrB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACT,OAAO,CAiClB;IAED;;;OAGG;IACH,UAFa,OAAO,
|
|
1
|
+
{"version":3,"file":"TextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/atlas/TextureAtlas.js"],"names":[],"mappings":"AAkBA;IACI;;;;;;OAMG;IACH,mBALW,MAAM,cACN,cAAc,kBACd,MAAM,EA2DhB;IAjDG;;;;OAIG;IACH,eAA0B;IAE1B;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,eAFU,OAAO,CAEkB;IAInC;;;;OAIG;IACH,2BAAgH;IAGhH;;;OAGG;IACH,eAAiD;IAEjD;;QAEI;;WAEG;;MAEN;IAED;;;;OAIG;IACH,sBAA0B;IAG9B;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,kBAHW,SAAS,GACP,UAAU,GAAC,SAAS,CAYhC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAQnB;IAED;;OAEG;IACH,cAkBC;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,GACJ,OAAO,CA0CnB;IAED;;;;OAIG;IACH,mBAqBC;IAED;;;;OAIG;IACH,mBAaC;IAED;;;;;;OAMG;IACH,kBAIC;IAED;;;;;OAKG;IACH,aAJW,SAAS,YACT,MAAM,GACL,UAAU,CAgCrB;IAED;;;;;OAKG;IACH,YAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACT,OAAO,CAiClB;IAED;;;OAGG;IACH,UAFa,OAAO,CAyBnB;IAED;;;;OAIG;IACH,aAqGC;IAED;;OAEG;IACH,cA6BC;IAsDD;;OAEG;IACH,cAQC;CACJ;qCAzjBoC,2BAA2B;oBAN5C,kCAAkC;mBAFnC,0CAA0C;0BAMnC,yBAAyB;2BAGxB,iBAAiB;+BAbb,gDAAgD"}
|
|
@@ -359,7 +359,10 @@ export class TextureAtlas extends AbstractTextureAtlas {
|
|
|
359
359
|
const patch = patches[i];
|
|
360
360
|
|
|
361
361
|
if (patch.getFlag(AtlasPatchFlag.Packed)) {
|
|
362
|
-
|
|
362
|
+
// repacking moves patches, so whatever is painted at the old
|
|
363
|
+
// position is stale -- clearing Painted is what schedules the
|
|
364
|
+
// repaint at the new one
|
|
365
|
+
patch.clearFlag(AtlasPatchFlag.Packed | AtlasPatchFlag.Painted);
|
|
363
366
|
|
|
364
367
|
this.packer.remove(patch.packing);
|
|
365
368
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLTextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js"],"names":[],"mappings":"AAeA;IACI;;;;;;;;OAgEC;IAvDG;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,cAAyB;IAEzB;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,qBAAqB;IAErB;;;;OAIG;IACH,mBAAuB;IAEvB;;;;OAIG;IACH,kBAAsK;IAG1K;;;;;;;;;OASG;IACH,+BAPW,MAAM,YACN,MAAM,gBACN,MAAM,iBACN,MAAM,gBACN,MAAM,iBACN,MAAM,
|
|
1
|
+
{"version":3,"file":"WebGLTextureAtlas.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js"],"names":[],"mappings":"AAeA;IACI;;;;;;;;OAgEC;IAvDG;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,cAAyB;IAEzB;;;;OAIG;IACH,gBAAgB;IAEhB;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,qBAAqB;IAErB;;;;OAIG;IACH,mBAAuB;IAEvB;;;;OAIG;IACH,kBAAsK;IAG1K;;;;;;;;;OASG;IACH,+BAPW,MAAM,YACN,MAAM,gBACN,MAAM,iBACN,MAAM,gBACN,MAAM,iBACN,MAAM,cAuBhB;IAED,eA0CC;IAED;;;;OAIG;IACH,qCA0BC;CACJ;2BAlL0B,kBAAkB"}
|
|
@@ -96,6 +96,12 @@ export class WebGLTextureAtlas {
|
|
|
96
96
|
const patch = new AtlasPatch();
|
|
97
97
|
patch.id = id;
|
|
98
98
|
|
|
99
|
+
// layout() packs `patch.packing`, so the target dimensions have to be
|
|
100
|
+
// recorded here or every patch is a zero-sized rectangle at the origin
|
|
101
|
+
// and they all pack on top of one another
|
|
102
|
+
patch.size.set(target_width, target_height);
|
|
103
|
+
patch.packing.set(0, 0, target_width, target_height);
|
|
104
|
+
|
|
99
105
|
this.__patches.push(patch);
|
|
100
106
|
this.__sources[id] = source;
|
|
101
107
|
|
|
@@ -143,6 +149,11 @@ export class WebGLTextureAtlas {
|
|
|
143
149
|
const patch = this.__patches[i];
|
|
144
150
|
|
|
145
151
|
patch.packing.copy(aabb);
|
|
152
|
+
|
|
153
|
+
// build() paints through patch.position, so the packed origin has
|
|
154
|
+
// to land there too -- otherwise every patch is copied to (0,0)
|
|
155
|
+
// no matter where the packer placed it
|
|
156
|
+
patch.position.set(aabb.x0, aabb.y0);
|
|
146
157
|
});
|
|
147
158
|
}
|
|
148
159
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load_environment_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/cubemap/load_environment_map.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load_environment_map.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/cubemap/load_environment_map.js"],"names":[],"mappings":"AAiFA;;;;;;;GAOG;AACH,6EANW,MAAM,GAAC,MAAM,EAAE,GAIb;IAAC,QAAQ,CAAC,EAAC,MAAM,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,WAAW,CAAA;CAAC,CA8EvE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CubeTextureLoader, LinearFilter, PMREMGenerator, sRGBEncoding, TextureLoader
|
|
1
|
+
import { CubeTextureLoader, LinearFilter, PMREMGenerator, sRGBEncoding, TextureLoader } from "three";
|
|
2
2
|
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
|
|
3
3
|
import { HDRCubeTextureLoader } from "three/examples/jsm/loaders/HDRCubeTextureLoader.js";
|
|
4
4
|
import { noop } from "../../../../core/function/noop.js";
|
|
@@ -53,8 +53,11 @@ function load_hdr_cube_texture(paths) {
|
|
|
53
53
|
*/
|
|
54
54
|
function load_exr_texture(path) {
|
|
55
55
|
return new Promise((resolve, reject) => {
|
|
56
|
+
// EXR is HDR data; EXRLoader only decodes into FloatType or HalfFloatType
|
|
57
|
+
// and defaults to HalfFloatType. Requesting UnsignedByteType left the
|
|
58
|
+
// decoder without an output buffer, so every .exr environment map failed
|
|
59
|
+
// to load. Match load_hdr_cube_texture and take the loader's default.
|
|
56
60
|
new EXRLoader()
|
|
57
|
-
.setDataType(UnsignedByteType)
|
|
58
61
|
.load(path, texture => {
|
|
59
62
|
resolve(texture);
|
|
60
63
|
}, noop, reject);
|
package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeSignedDistanceField_Chamfer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,4GALW,MAAM,MACN,MAAM,MACN,MAAM,
|
|
1
|
+
{"version":3,"file":"computeSignedDistanceField_Chamfer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,4GALW,MAAM,MACN,MAAM,MACN,MAAM,mBA0IhB"}
|
|
@@ -69,62 +69,70 @@ export function computeSignedDistanceField_Chamfer(source, distanceField, emptyV
|
|
|
69
69
|
for (y = 0; y < height; y++) {
|
|
70
70
|
for (x = 0; x < width; x++) {
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
// each candidate must be compared against the running minimum, not
|
|
73
|
+
// against the value the cell started with -- otherwise the *last*
|
|
74
|
+
// candidate that beat the original wins instead of the smallest.
|
|
75
|
+
// Accumulating and writing once is also fewer stores than before.
|
|
76
|
+
let best = getD(x, y);
|
|
73
77
|
|
|
74
78
|
const v0 = getD(x - 1, y - 1) + d2;
|
|
75
79
|
|
|
76
|
-
if (v0 <
|
|
77
|
-
|
|
80
|
+
if (v0 < best) {
|
|
81
|
+
best = v0;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
const v1 = getD(x, y - 1) + d1;
|
|
81
85
|
|
|
82
|
-
if (v1 <
|
|
83
|
-
|
|
86
|
+
if (v1 < best) {
|
|
87
|
+
best = v1;
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
const v2 = getD(x + 1, y - 1) + d2;
|
|
87
91
|
|
|
88
|
-
if (v2 <
|
|
89
|
-
|
|
92
|
+
if (v2 < best) {
|
|
93
|
+
best = v2;
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
const v3 = getD(x - 1, y) + d1;
|
|
93
97
|
|
|
94
|
-
if (v3 <
|
|
95
|
-
|
|
98
|
+
if (v3 < best) {
|
|
99
|
+
best = v3;
|
|
96
100
|
}
|
|
101
|
+
|
|
102
|
+
setD(x, y, best);
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
//second pass (backward)
|
|
101
107
|
for (y = maxY; y >= 0; y--) {
|
|
102
108
|
for (x = maxX; x >= 0; x--) {
|
|
103
|
-
|
|
109
|
+
let best = getD(x, y);
|
|
104
110
|
|
|
105
111
|
const v0 = getD(x + 1, y) + d1;
|
|
106
112
|
|
|
107
|
-
if (v0 <
|
|
108
|
-
|
|
113
|
+
if (v0 < best) {
|
|
114
|
+
best = v0;
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
const v1 = getD(x - 1, y + 1) + d2;
|
|
112
118
|
|
|
113
|
-
if (v1 <
|
|
114
|
-
|
|
119
|
+
if (v1 < best) {
|
|
120
|
+
best = v1;
|
|
115
121
|
}
|
|
116
122
|
|
|
117
123
|
const v2 = getD(x, y + 1) + d1;
|
|
118
124
|
|
|
119
|
-
if (v2 <
|
|
120
|
-
|
|
125
|
+
if (v2 < best) {
|
|
126
|
+
best = v2;
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
const v3 = getD(x + 1, y + 1) + d2;
|
|
124
130
|
|
|
125
|
-
if (v3 <
|
|
126
|
-
|
|
131
|
+
if (v3 < best) {
|
|
132
|
+
best = v3;
|
|
127
133
|
}
|
|
134
|
+
|
|
135
|
+
setD(x, y, best);
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
138
|
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Separable gaussian blur.
|
|
3
|
+
*
|
|
4
|
+
* `size` is the full footprint width in pixels: every output pixel is gathered
|
|
5
|
+
* from `[-size/2, +size/2]` around itself along each axis, at `sample_count`
|
|
6
|
+
* evenly spaced taps. `quality` scales the tap count, trading cost against
|
|
7
|
+
* sampling density; it leaves both the footprint and the standard deviation in
|
|
8
|
+
* pixels unchanged.
|
|
9
|
+
*
|
|
10
|
+
* Below `quality = 1` the taps are spaced more than a pixel apart, so detail
|
|
11
|
+
* finer than that spacing aliases — an isolated bright pixel gets smeared into
|
|
12
|
+
* a ring of tap-spaced echoes rather than a smooth falloff. On smooth input the
|
|
13
|
+
* result is indistinguishable from the fully sampled filter, which is what the
|
|
14
|
+
* setting is for; do not turn it down on input with isolated highlights.
|
|
2
15
|
*
|
|
3
16
|
* @param {Sampler2D} output
|
|
4
17
|
* @param {Sampler2D} input
|
|
5
|
-
* @param {number} size
|
|
6
|
-
* @param {number} [quality]
|
|
18
|
+
* @param {number} size footprint width, in pixels
|
|
19
|
+
* @param {number} [quality] taps per pixel of footprint; 1 gives roughly one tap per pixel
|
|
7
20
|
*/
|
|
8
21
|
export function sampler2d_blur_gaussian(output: Sampler2D, input: Sampler2D, size: number, quality?: number): void;
|
|
9
22
|
import { Sampler2D } from "../Sampler2D.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampler2d_blur_gaussian.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"sampler2d_blur_gaussian.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,gDALW,SAAS,SACT,SAAS,QACT,MAAM,YACN,MAAM,QAiGhB;0BAxHyB,iBAAiB"}
|
|
@@ -7,17 +7,43 @@ import { Sampler2D } from "../Sampler2D.js";
|
|
|
7
7
|
let temp_data = new Float64Array(1);
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
+
* Separable gaussian blur.
|
|
11
|
+
*
|
|
12
|
+
* `size` is the full footprint width in pixels: every output pixel is gathered
|
|
13
|
+
* from `[-size/2, +size/2]` around itself along each axis, at `sample_count`
|
|
14
|
+
* evenly spaced taps. `quality` scales the tap count, trading cost against
|
|
15
|
+
* sampling density; it leaves both the footprint and the standard deviation in
|
|
16
|
+
* pixels unchanged.
|
|
17
|
+
*
|
|
18
|
+
* Below `quality = 1` the taps are spaced more than a pixel apart, so detail
|
|
19
|
+
* finer than that spacing aliases — an isolated bright pixel gets smeared into
|
|
20
|
+
* a ring of tap-spaced echoes rather than a smooth falloff. On smooth input the
|
|
21
|
+
* result is indistinguishable from the fully sampled filter, which is what the
|
|
22
|
+
* setting is for; do not turn it down on input with isolated highlights.
|
|
10
23
|
*
|
|
11
24
|
* @param {Sampler2D} output
|
|
12
25
|
* @param {Sampler2D} input
|
|
13
|
-
* @param {number} size
|
|
14
|
-
* @param {number} [quality]
|
|
26
|
+
* @param {number} size footprint width, in pixels
|
|
27
|
+
* @param {number} [quality] taps per pixel of footprint; 1 gives roughly one tap per pixel
|
|
15
28
|
*/
|
|
16
29
|
export function sampler2d_blur_gaussian(output, input, size, quality = 1) {
|
|
17
30
|
|
|
18
|
-
const sigma = size * 3;
|
|
19
31
|
const sample_count = max2(3, nextOdd(Math.round(size * quality)));
|
|
20
32
|
|
|
33
|
+
// `build_gaussian_kernel_1d` places taps one unit apart, so its sigma is in
|
|
34
|
+
// TAP units, whereas the footprint is in pixels -- the two are related by
|
|
35
|
+
// `local_u_scale` below. Working in tap units, the outermost tap sits at
|
|
36
|
+
// (sample_count - 1) / 2, and we want the kernel truncated there at three
|
|
37
|
+
// standard deviations: beyond 3 sigma a gaussian carries ~0.3% of its mass,
|
|
38
|
+
// so cutting it there is visually lossless while keeping the taps busy.
|
|
39
|
+
//
|
|
40
|
+
// This previously read `size * 3`, which is the same expression with the
|
|
41
|
+
// ratio inverted and the wrong unit. That put every tap inside ±(1/6) of a
|
|
42
|
+
// standard deviation, where a gaussian is flat: the outermost tap carried
|
|
43
|
+
// ~99% of the weight of the centre one, so the filter was a box blur and
|
|
44
|
+
// `size` had no influence on the shape of the falloff at all.
|
|
45
|
+
const sigma = (sample_count - 1) / 6;
|
|
46
|
+
|
|
21
47
|
const kernel = new Float32Array(sample_count);
|
|
22
48
|
|
|
23
49
|
build_gaussian_kernel_1d(kernel, sample_count, sigma);
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Good for down-sampling
|
|
2
|
+
* Good for down-sampling.
|
|
3
|
+
*
|
|
4
|
+
* The kernel is separable and evaluated in destination-pixel units: a source
|
|
5
|
+
* texel's distance from the destination pixel's centre is divided by the
|
|
6
|
+
* scaling ratio, which is what stretches the filter's support to cover the
|
|
7
|
+
* whole footprint being averaged.
|
|
8
|
+
*
|
|
9
|
+
* Negative lobes are kept. They are the entire point of Lanczos -- discarding
|
|
10
|
+
* them removes the sharpening and, when every sample in the footprint happens
|
|
11
|
+
* to land in a negative lobe, leaves a zero weight sum and a NaN result.
|
|
12
|
+
*
|
|
3
13
|
* @param {Sampler2D} source
|
|
4
14
|
* @param {Sampler2D} destination
|
|
5
15
|
* @param {number} [lobes]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampler2d_scale_down_lanczos.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sampler2d_scale_down_lanczos.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;GAeG;AACH,gGAFW,MAAM,QA8GhB"}
|