@woosh/meep-engine 2.169.0 → 2.169.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/process/symbolic/make3DSymbolicDisplay.js +1 -1
- package/editor/view/ecs/EntityList.js +1 -1
- package/editor/view/ecs/components/particles/ParticleLayerController.js +1 -1
- package/editor/view/makeEntityDecorators.js +1 -1
- package/package.json +1 -1
- package/src/REVIEW_2026_08_06.md +39 -0
- package/src/core/IdPool.d.ts +2 -2
- package/src/core/IdPool.d.ts.map +1 -1
- package/src/core/IdPool.js +1 -1
- package/src/core/binary/32BitEncoder.d.ts +2 -3
- package/src/core/binary/32BitEncoder.d.ts.map +1 -1
- package/src/core/binary/32BitEncoder.js +1 -1
- package/src/core/bvh2/bvh3/BVH.d.ts +2 -2
- package/src/core/bvh2/bvh3/BVH.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/BVH.js +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.d.ts +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.js +86 -86
- package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.d.ts +2 -2
- package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.d.ts.map +1 -1
- package/src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.js +1 -1
- package/src/core/cache/Cache.d.ts +4 -4
- package/src/core/cache/Cache.d.ts.map +1 -1
- package/src/core/cache/Cache.js +3 -3
- package/src/core/cache/LoadingCache.d.ts +1 -1
- package/src/core/cache/LoadingCache.js +2 -2
- package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts +2 -2
- package/src/core/cache/wtinylfu/CacheWTinylfu.js +2 -2
- package/src/core/collection/array/array_index_by_equality.d.ts +2 -2
- package/src/core/collection/array/array_index_by_equality.d.ts.map +1 -1
- package/src/core/collection/array/array_index_by_equality.js +1 -1
- package/src/core/collection/array/array_pick_best_element.d.ts +2 -2
- package/src/core/collection/array/array_pick_best_element.d.ts.map +1 -1
- package/src/core/collection/array/array_pick_best_element.js +1 -1
- package/src/core/collection/array/array_pick_best_elements.d.ts +2 -2
- package/src/core/collection/array/array_pick_best_elements.d.ts.map +1 -1
- package/src/core/collection/array/array_pick_best_elements.js +1 -1
- package/src/core/collection/array/array_set_diff.d.ts +2 -3
- package/src/core/collection/array/array_set_diff.d.ts.map +1 -1
- package/src/core/collection/array/array_set_diff.js +1 -1
- package/src/core/collection/array/array_set_diff_sorting.d.ts +2 -2
- package/src/core/collection/array/array_set_diff_sorting.d.ts.map +1 -1
- package/src/core/collection/array/array_set_diff_sorting.js +1 -1
- package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts +2 -1
- package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -1
- package/src/core/collection/heap/BinaryHeap.d.ts +2 -2
- package/src/core/collection/heap/BinaryHeap.d.ts.map +1 -1
- package/src/core/collection/heap/BinaryHeap.js +1 -1
- package/src/core/collection/list/List.d.ts +19 -19
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +10 -10
- package/src/core/collection/map/HashMap.d.ts +2 -2
- package/src/core/collection/map/HashMap.d.ts.map +1 -1
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/core/collection/set/ArraySet.d.ts +2 -2
- package/src/core/collection/set/ArraySet.d.ts.map +1 -1
- package/src/core/collection/set/ArraySet.js +1 -1
- package/src/core/collection/table/RowFirstTable.d.ts +2 -2
- package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTable.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +4 -4
- package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts +2 -2
- package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts.map +1 -1
- package/src/core/fsm/simple/SimpleStateMachineDescription.js +1 -1
- package/src/core/geom/2d/bvh/BVH2D.d.ts +2 -2
- package/src/core/geom/2d/bvh/BVH2D.d.ts.map +1 -1
- package/src/core/geom/2d/bvh/BVH2D.js +1 -1
- package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.d.ts +2 -2
- package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.js +1 -1
- package/src/core/geom/2d/quad-tree/qt_query_data_raycast.d.ts +2 -2
- package/src/core/geom/2d/quad-tree/qt_query_data_raycast.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/qt_query_data_raycast.js +1 -1
- package/src/core/geom/3d/aabb/AABB3.d.ts +2 -2
- package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/AABB3.js +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts +2 -2
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.d.ts +2 -5
- package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/debug/push_boundary_with_validation.js +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.d.ts +2 -2
- package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/debug/validate_cavity_boundary.js +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts +2 -3
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +69 -69
- package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.d.ts +2 -3
- package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedron_neighbourhood.js +50 -50
- package/src/core/geom/3d/topology/struct/TopoEdge.d.ts +2 -2
- package/src/core/geom/3d/topology/struct/TopoEdge.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoEdge.js +1 -1
- package/src/core/geom/3d/topology/struct/TopoMesh.d.ts +2 -3
- package/src/core/geom/3d/topology/struct/TopoMesh.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoMesh.js +1 -1
- package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts +2 -2
- package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoTriangle.js +1 -1
- package/src/core/geom/3d/topology/struct/TopoVertex.d.ts +2 -2
- package/src/core/geom/3d/topology/struct/TopoVertex.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoVertex.js +1 -1
- package/src/core/geom/3d/topology/util/mesh_flood_fill.d.ts +1 -1
- package/src/core/geom/3d/topology/util/mesh_flood_fill.js +1 -1
- package/src/core/geom/3d/util/aabb3_emit_point_grid.d.ts +2 -2
- package/src/core/geom/3d/util/aabb3_emit_point_grid.d.ts.map +1 -1
- package/src/core/geom/3d/util/aabb3_emit_point_grid.js +1 -1
- package/src/core/geom/Quaternion.d.ts +2 -2
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +1 -1
- package/src/core/geom/Vector1.d.ts +2 -2
- package/src/core/geom/Vector1.d.ts.map +1 -1
- package/src/core/geom/Vector1.js +1 -1
- package/src/core/geom/packing/max-rect/find_best_container.d.ts +2 -2
- package/src/core/geom/packing/max-rect/find_best_container.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/find_best_container.js +1 -1
- package/src/core/geom/vec3/v3_lerp.d.ts +1 -1
- package/src/core/geom/vec3/v3_lerp.js +1 -1
- package/src/core/json/abstractJSONSerializer.d.ts +2 -2
- package/src/core/json/abstractJSONSerializer.d.ts.map +1 -1
- package/src/core/json/abstractJSONSerializer.js +1 -1
- package/src/core/lang/reactive/AbstractCachingParser.d.ts +2 -3
- package/src/core/lang/reactive/AbstractCachingParser.d.ts.map +1 -1
- package/src/core/lang/reactive/AbstractCachingParser.js +1 -1
- package/src/core/localization/Localization.d.ts +2 -2
- package/src/core/localization/Localization.d.ts.map +1 -1
- package/src/core/localization/Localization.js +1 -1
- package/src/core/math/noise/create_simplex_noise_2d.d.ts +2 -2
- package/src/core/math/noise/create_simplex_noise_2d.d.ts.map +1 -1
- package/src/core/math/noise/create_simplex_noise_2d.js +1 -1
- package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.js +1 -1
- package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts +3 -3
- package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -1
- package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +2 -2
- package/src/core/math/random/seededRandom_Mulberry32.d.ts +3 -2
- package/src/core/math/random/seededRandom_Mulberry32.d.ts.map +1 -1
- package/src/core/math/random/seededRandom_Mulberry32.js +1 -1
- package/src/core/model/ModuleRegistry.d.ts +2 -2
- package/src/core/model/ModuleRegistry.d.ts.map +1 -1
- package/src/core/model/ModuleRegistry.js +1 -1
- package/src/core/model/node-graph/json/serializeNodeGraphToJSON.d.ts +1 -1
- package/src/core/model/node-graph/json/serializeNodeGraphToJSON.js +2 -2
- package/src/core/model/object/objectDeepEquals.d.ts +2 -2
- package/src/core/model/object/objectDeepEquals.d.ts.map +1 -1
- package/src/core/model/object/objectDeepEquals.js +1 -1
- package/src/core/model/reactive/model/ReactiveExpression.d.ts +2 -2
- package/src/core/model/reactive/model/ReactiveExpression.d.ts.map +1 -1
- package/src/core/model/reactive/model/ReactiveExpression.js +1 -1
- package/src/core/model/validate_enum_schema.d.ts +2 -3
- package/src/core/model/validate_enum_schema.d.ts.map +1 -1
- package/src/core/model/validate_enum_schema.js +1 -1
- package/src/core/process/Future.d.ts +3 -3
- package/src/core/process/Future.d.ts.map +1 -1
- package/src/core/process/Future.js +1 -1
- package/src/core/process/task/Task.d.ts +3 -3
- package/src/core/process/task/Task.d.ts.map +1 -1
- package/src/core/process/task/Task.js +2 -2
- package/src/core/process/task/util/countTask.d.ts +2 -2
- package/src/core/process/task/util/countTask.d.ts.map +1 -1
- package/src/core/process/task/util/countTask.js +1 -1
- package/src/core/process/task/util/randomCountTask.d.ts +2 -2
- package/src/core/process/task/util/randomCountTask.d.ts.map +1 -1
- package/src/core/process/task/util/randomCountTask.js +1 -1
- package/src/engine/animation/Animations.d.ts +4 -4
- package/src/engine/animation/Animations.d.ts.map +1 -1
- package/src/engine/animation/Animations.js +2 -2
- package/src/engine/animation/EntityAnimation.d.ts +5 -5
- package/src/engine/animation/EntityAnimation.d.ts.map +1 -1
- package/src/engine/animation/EntityAnimation.js +2 -2
- package/src/engine/animation/TransitionFunctions.d.ts +1 -4
- package/src/engine/animation/TransitionFunctions.d.ts.map +1 -1
- package/src/engine/animation/TransitionFunctions.js +1 -1
- package/src/engine/animation/Tween.d.ts +4 -4
- package/src/engine/animation/Tween.d.ts.map +1 -1
- package/src/engine/animation/Tween.js +2 -2
- package/src/engine/asset/AssetManager.d.ts +6 -6
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/asset/AssetManager.js +1411 -1411
- package/src/engine/asset/AssetRequest.d.ts +4 -4
- package/src/engine/asset/AssetRequest.d.ts.map +1 -1
- package/src/engine/asset/AssetRequest.js +3 -3
- package/src/engine/asset/loaders/AssetLoader.d.ts +3 -3
- package/src/engine/asset/loaders/AssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/AssetLoader.js +2 -2
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +0 -10
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.d.ts +6 -6
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +3 -3
- package/src/engine/ecs/EntityManager.d.ts +4 -4
- package/src/engine/ecs/EntityManager.js +4 -4
- package/src/engine/ecs/EntityObserver.d.ts +3 -3
- package/src/engine/ecs/EntityObserver.d.ts.map +1 -1
- package/src/engine/ecs/EntityObserver.js +2 -2
- package/src/engine/ecs/System.d.ts +4 -4
- package/src/engine/ecs/System.d.ts.map +1 -1
- package/src/engine/ecs/System.js +2 -2
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts +2 -3
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +1 -1
- package/src/engine/ecs/grid/pick.d.ts +4 -2
- package/src/engine/ecs/grid/pick.d.ts.map +1 -1
- package/src/engine/ecs/grid/pick.js +1 -1
- package/src/engine/ecs/parent/EntityNode.d.ts +4 -4
- package/src/engine/ecs/parent/EntityNode.d.ts.map +1 -1
- package/src/engine/ecs/parent/EntityNode.js +2 -2
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts +2 -2
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts.map +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionHeaderCodec.d.ts +1 -2
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionHeaderCodec.d.ts.map +1 -1
- package/src/engine/ecs/systems/AnimationSystem.d.ts +0 -5
- package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts +2 -2
- package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.js +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +5 -5
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +3 -3
- package/src/engine/ecs/terrain/util/obtainTerrain.d.ts +2 -3
- package/src/engine/ecs/terrain/util/obtainTerrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/util/obtainTerrain.js +1 -1
- package/src/engine/ecs/util/hideEntityGracefully.js +2 -2
- package/src/engine/graphics/FrameRunner.d.ts +2 -2
- package/src/engine/graphics/FrameRunner.d.ts.map +1 -1
- package/src/engine/graphics/FrameRunner.js +1 -1
- package/src/engine/graphics/GraphicsEngine.d.ts +4 -2
- package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +1 -1
- package/src/engine/graphics/camera/CameraShake.d.ts +6 -6
- package/src/engine/graphics/camera/CameraShake.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +2 -2
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.js +1 -1
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts +2 -3
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
- package/src/engine/graphics/ecs/light/three/ThreeLightCache.d.ts +1 -1
- package/src/engine/graphics/ecs/light/three/ThreeLightCache.js +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts +4 -5
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -2
- package/src/engine/graphics/geometry/computeBoundingSphereFromVertexData.d.ts +2 -2
- package/src/engine/graphics/geometry/computeBoundingSphereFromVertexData.js +1 -1
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts +2 -2
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts.map +1 -1
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +1 -1
- package/src/engine/graphics/geometry/ribbon/Ribbon.d.ts +2 -2
- package/src/engine/graphics/geometry/ribbon/Ribbon.d.ts.map +1 -1
- package/src/engine/graphics/geometry/ribbon/Ribbon.js +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +2 -2
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +2 -2
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +2 -2
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +1 -1
- package/src/engine/graphics/render/RendererPool.d.ts +4 -4
- package/src/engine/graphics/render/RendererPool.d.ts.map +1 -1
- package/src/engine/graphics/render/RendererPool.js +2 -2
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +5 -4
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.js +2 -2
- package/src/engine/graphics/render/layers/RenderLayer.d.ts +2 -2
- package/src/engine/graphics/render/layers/RenderLayer.d.ts.map +1 -1
- package/src/engine/graphics/render/layers/RenderLayer.js +1 -1
- package/src/engine/graphics/render/layers/RenderLayerUtils.js +1 -1
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts +3 -1
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.js +681 -681
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts +2 -2
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.js +145 -145
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts +2 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +2 -2
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +1 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +6 -3
- 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 +6 -16
- package/src/engine/graphics/texture/sampler/sampler2d_combine.d.ts +2 -2
- package/src/engine/graphics/texture/sampler/sampler2d_combine.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_combine.js +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +2 -2
- package/src/engine/grid/obstacle/GridObstacle.d.ts +2 -2
- package/src/engine/grid/obstacle/GridObstacle.d.ts.map +1 -1
- package/src/engine/grid/obstacle/GridObstacle.js +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts +2 -2
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.js +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +3 -3
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +2 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/Blackboard.d.ts +4 -4
- package/src/engine/intelligence/blackboard/Blackboard.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/Blackboard.js +2 -2
- package/src/engine/intelligence/mcts/MonteCarlo.d.ts +17 -15
- package/src/engine/intelligence/mcts/MonteCarlo.d.ts.map +1 -1
- package/src/engine/intelligence/mcts/MonteCarlo.js +345 -345
- package/src/engine/intelligence/mcts/StateNode.d.ts +2 -2
- package/src/engine/intelligence/mcts/StateNode.d.ts.map +1 -1
- package/src/engine/intelligence/mcts/StateNode.js +364 -364
- package/src/engine/intelligence/optimization/RandomOptimizer.d.ts +3 -3
- package/src/engine/intelligence/optimization/RandomOptimizer.d.ts.map +1 -1
- package/src/engine/intelligence/optimization/RandomOptimizer.js +2 -2
- package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.d.ts +2 -2
- package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.d.ts.map +1 -1
- package/src/engine/intelligence/optimization/optimize_cyclic_sequence_pairwise.js +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts +4 -5
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts.map +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +2 -2
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts +0 -5
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +0 -4
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +0 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
- package/src/engine/save/GameStateLoader.d.ts +2 -2
- package/src/engine/save/GameStateLoader.d.ts.map +1 -1
- package/src/engine/save/GameStateLoader.js +1 -1
- package/src/engine/save/Storage.d.ts +4 -4
- package/src/engine/save/Storage.d.ts.map +1 -1
- package/src/engine/save/Storage.js +2 -2
- package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
- package/src/engine/save/storage/IndexedDBStorage.js +11 -10
- package/src/engine/sound/simulation/prototypeAcousticSolver.js +1652 -1652
- package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts +2 -2
- package/src/engine/sound/sopra/util/buildAttenuationCurve.d.ts.map +1 -1
- package/src/engine/sound/sopra/util/buildAttenuationCurve.js +40 -40
- package/src/engine/ui/notification/NotificationManager.d.ts +5 -5
- package/src/engine/ui/notification/NotificationManager.d.ts.map +1 -1
- package/src/engine/ui/notification/NotificationManager.js +4 -4
- package/src/engine/ui/tiles2d/TileGrid.d.ts +2 -2
- package/src/engine/ui/tiles2d/TileGrid.d.ts.map +1 -1
- package/src/engine/ui/tiles2d/TileGrid.js +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.d.ts +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js +1 -1
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -2
- package/src/generation/grid/generation/util/buildPathFromDistanceMap.d.ts +1 -1
- package/src/generation/grid/generation/util/buildPathFromDistanceMap.js +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts +2 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts.map +1 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts +2 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts +2 -1
- package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts +4 -3
- package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.js +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts +2 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts.map +1 -1
- package/src/view/common/VirtualListView.d.ts +1 -1
- package/src/view/common/VirtualListView.js +1 -1
- package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.d.ts +2 -2
- package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.d.ts.map +1 -1
- package/src/view/tooltip/gml/compiler/GMLReferenceCompiler.js +1 -1
|
@@ -7,7 +7,7 @@ import { SymbolicDisplayInternalAPI } from "./SymbolicDisplayInternalAPI.js";
|
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* @param {Engine} engine
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {(components: [], api: {bind: (signal: Signal, action: function, context: *) => void, update: function, bindings: SignalBinding[]}) => void} factory
|
|
11
11
|
* @param {Class[]} components
|
|
12
12
|
* @return {ComponentSymbolicDisplay}
|
|
13
13
|
*/
|
|
@@ -62,7 +62,7 @@ class EntityListView extends View {
|
|
|
62
62
|
/**
|
|
63
63
|
*
|
|
64
64
|
* @param {Editor} editor
|
|
65
|
-
* @param { (
|
|
65
|
+
* @param { ((entity: number, ecd: EntityComponentDataset, view: View) => void)[]} decorators
|
|
66
66
|
*/
|
|
67
67
|
constructor({
|
|
68
68
|
editor,
|
|
@@ -73,7 +73,7 @@ class ParticleLayerController extends GuiControl {
|
|
|
73
73
|
/**
|
|
74
74
|
*
|
|
75
75
|
* @param {string} property
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {(layer: ParticleLayer, value: *) => void} mutationCallback
|
|
77
77
|
* @param {*} ops
|
|
78
78
|
*/
|
|
79
79
|
function addControl(property, mutationCallback, ops) {
|
|
@@ -10,7 +10,7 @@ import ImageView from "../../src/view/elements/image/ImageView.js";
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
|
-
* @return {(
|
|
13
|
+
* @return {((entity: number, ecd: EntityComponentDataset, view: View) => void)[]}
|
|
14
14
|
*/
|
|
15
15
|
export function makeEntityDecorators() {
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"author": "Alexander Goldring",
|
|
9
|
-
"version": "2.169.
|
|
9
|
+
"version": "2.169.1",
|
|
10
10
|
"main": "build/meep.module.js",
|
|
11
11
|
"module": "build/meep.module.js",
|
|
12
12
|
"exports": {
|
package/src/REVIEW_2026_08_06.md
CHANGED
|
@@ -569,3 +569,42 @@ Measurement, since the original proposal asked for it: `Math.floor` and `x | 0`
|
|
|
569
569
|
Round 2 closed 16 items. The CRITICALs listed as still open in §9 are unchanged by this round except for ECS-14 and BIN-2 — round 2 deliberately took the unambiguous work, and the open CRITICALs are open precisely because they are not.
|
|
570
570
|
|
|
571
571
|
The three durable additions from this round are worth more than the individual fixes: the `hammersley` distinctness check, the `ArrayBufferLoader` settle-under-failure specs, and `Localization`'s first spec (which drives a real `AssetManager` through a real loader, the pattern the rest of the loader tests should follow).
|
|
572
|
+
|
|
573
|
+
## 12. Review of the round-1 and round-2 commits
|
|
574
|
+
|
|
575
|
+
A pass over all 34 commits, in `62047e542..a0e4b9dbc` plus the round-1 range. The point was to find defects in the remediation itself, so what follows leads with those.
|
|
576
|
+
|
|
577
|
+
### 12.1 Verified rather than assumed
|
|
578
|
+
|
|
579
|
+
- **Particle compaction** — the swap plan was brute-forced against a reference over every victim subset for arrays up to 12 elements: 8178 cases, 0 mismatches.
|
|
580
|
+
- **Camera 0→1 and Path 2→3 upgraders** — executed end to end; see §12.3, which turned this into a standing harness.
|
|
581
|
+
- **Both new upgraders are registered** in `GameBinarySerializationRegistry.js` (`3ecf5c16`, `8b8df83a`). A version bump without registration silently breaks every existing save, and that was the failure worth checking.
|
|
582
|
+
- **`ServerAuthoritativeClient`** — `Uint32Map.get` does return −1 for absent; network ids come off a free list, so the watermark map is bounded by peak concurrent entities rather than leaking; and a recycled id inherits a watermark that is always behind the current server frame, so reuse cannot drop state.
|
|
583
|
+
- **Physics hot paths** — `solve_constraints`, `convex_convex_manifold`, `raycast`, `ManifoldStore`, `quat3_multiply`: zero executable changes across the whole range, JSDoc only.
|
|
584
|
+
- **`BiMap`** — the argument swap is names-only; identical behaviour for the same positional call.
|
|
585
|
+
- **`Engine` lifecycle** — `Ticker.start` re-adds its lifecycle listeners, so `stop()`→`start()` is clean; the one consumer testing `graphics === undefined` also tests for null; and `start()` already returned a promise before it became `async`.
|
|
586
|
+
- **The round-trip harness is not vacuous** — deleting a field's restoration from an adapter turns it red on exactly that adapter.
|
|
587
|
+
|
|
588
|
+
### 12.2 Defects found in the remediation, and fixed
|
|
589
|
+
|
|
590
|
+
- **`IndexedDBStorage.store` rejected up to three times for one failure.** `resolve`/`reject` there are the caller's own callbacks, not promise settle functions, and a failed write raises `error` on the request, bubbles to `error` on the transaction, then aborts it — with a listener on each. In-tree callers wrap the call in a promise, which hides it; `Storage` is published API, so an external consumer saw one lost save reported three times. Now it rejects on `abort` alone, which is the event that always fires for a transaction that will not commit, and it carries `transaction.error` as the reason. The storage classes had no specs at all; they have one now.
|
|
591
|
+
- **The Lanczos `weight_sum === 0` fallback was unreachable.** Swept over every downscale ratio from 1 to 40 at 2 and 3 lobes, the weight sum was never zero, never negative, and never below 1. The NaN it claimed to prevent came from the *old* `if (weight <= 0) continue`, which discarded the negative lobes — and the rewrite had already removed that. Keeping the whole kernel makes the sum the integral of the kernel over the footprint, which stays near 1. Removed: it was precisely the defensive guard for a can't-happen condition this project rejects, and its comment described a failure the new code cannot produce.
|
|
592
|
+
|
|
593
|
+
### 12.3 The gap that mattered most: upgraders were never executed
|
|
594
|
+
|
|
595
|
+
`upgrader_chain_contract.spec.js` checks that a path from every historical version to the current one *exists*. That catches a missing upgrader, which is what it was built for. It does not catch an upgrader that is present and emits the wrong layout — and at load time that is the worse failure, because the deserializer then reads real bytes at wrong offsets instead of failing loudly. Its own docblock admitted this and left it outstanding.
|
|
596
|
+
|
|
597
|
+
`upgrader_execution_contract.spec.js` closes it. Each covered upgrader gets a source buffer in the layout it reads, the chain runs to the current version through `executeBinaryClassUpgraderChain` — the same executor production uses — and the current adapter deserializes the result. The assertion that does the work is the byte count: the adapter must consume exactly what the chain produced.
|
|
598
|
+
|
|
599
|
+
Two properties make it honest rather than decorative:
|
|
600
|
+
|
|
601
|
+
- **It is a check of what an upgrader *writes*, not what it reads.** The golden describes the start version's layout, which is derived from the upgrader's own reads. The adapter that originally wrote that layout is gone, so there is nothing left to check the read side against, and the spec says so instead of implying otherwise.
|
|
602
|
+
- **Coverage is enumerated, not assumed.** 9 of 23 upgraders have goldens; the other 14 are listed in `WITHOUT_GOLDEN`, and a new upgrader that appears in neither list fails the spec. Each entry is a save-format version nothing verifies can still be read.
|
|
603
|
+
|
|
604
|
+
Mutation-verified in both directions: making an upgrader emit one extra field, and making it omit one, each turns its own case red.
|
|
605
|
+
|
|
606
|
+
### 12.4 Left open, deliberately
|
|
607
|
+
|
|
608
|
+
- **The Lanczos rewrite changed the filter shape** from radial (`sqrt(fx²+fy²)`) to separable (`L(x)·L(y)`). Separable is the correct Lanczos and it is cheaper — O(rx+ry) transcendental evaluations per output pixel instead of O(rx·ry) — but every downscaled texture now differs from before, and the commit framed it purely as a NaN fix. Recorded here rather than reverted; the old behaviour was not worth preserving.
|
|
609
|
+
- **`sampler2d_scale_down_lanczos` throws "source is larger than destination"** when the condition, `source_width < d_w`, means the source is *smaller*. Pre-existing, and left alone rather than folded into an unrelated change.
|
|
610
|
+
- **`IndexedDBStorage.remove` still reports success off the request** rather than the transaction commit — the same durability gap `store` had. Not touched here because it is a separate defect from the triple-reject this pass was fixing, and it deserves its own change.
|
package/src/core/IdPool.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ declare class IdPool {
|
|
|
29
29
|
isUsed(id: number): boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Traverse all IDs currently in use
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {(id: number) => void} visitor
|
|
33
33
|
*/
|
|
34
|
-
traverseUsed(visitor:
|
|
34
|
+
traverseUsed(visitor: (id: number) => void): void;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
* @param {number} id
|
package/src/core/IdPool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdPool.d.ts","sourceRoot":"","sources":["../../../src/core/IdPool.js"],"names":[],"mappings":";AAGA;;;GAGG;AACH;IAOI;;;;OAIG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,OAFa,MAAM,CAQlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACL,OAAO,CASlB;IAED;;;;OAIG;IACH,WAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"IdPool.d.ts","sourceRoot":"","sources":["../../../src/core/IdPool.js"],"names":[],"mappings":";AAGA;;;GAGG;AACH;IAOI;;;;OAIG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,OAFa,MAAM,CAQlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACL,OAAO,CASlB;IAED;;;;OAIG;IACH,WAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;OAGG;IACH,2BAFgB,MAAM,KAAK,IAAI,QAW9B;IAED;;;OAGG;IACH,YAFW,MAAM,QAIhB;IAED;;OAEG;IACH,cAEC;;CACJ"}
|
package/src/core/IdPool.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds an encoder/decoder to simplify process of reading/writing various parts of a 32 bit field
|
|
3
3
|
* @param {number[]} bitCounts
|
|
4
|
-
* @returns {{encode: function(...number):number, decode:
|
|
4
|
+
* @returns {{encode: function(...number):number, decode: (value: number, result: number[]) => void}}
|
|
5
5
|
*/
|
|
6
6
|
export function create32BitCodec(bitCounts: number[]): {
|
|
7
7
|
encode: (...args: number[]) => number;
|
|
8
|
-
decode: (
|
|
9
|
-
result: number[];
|
|
8
|
+
decode: (value: number, result: number[]) => void;
|
|
10
9
|
};
|
|
11
10
|
//# sourceMappingURL=32BitEncoder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"32BitEncoder.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/32BitEncoder.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,4CAHW,MAAM,EAAE;sBACe,MAAM,OAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"32BitEncoder.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/32BitEncoder.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,4CAHW,MAAM,EAAE;sBACe,MAAM,OAAE,MAAM;oBAAkB,MAAM,UAAU,MAAM,EAAE,KAAK,IAAI;EA8DlG"}
|
|
@@ -4,7 +4,7 @@ import { assert } from "../assert.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Builds an encoder/decoder to simplify process of reading/writing various parts of a 32 bit field
|
|
6
6
|
* @param {number[]} bitCounts
|
|
7
|
-
* @returns {{encode: function(...number):number, decode:
|
|
7
|
+
* @returns {{encode: function(...number):number, decode: (value: number, result: number[]) => void}}
|
|
8
8
|
*/
|
|
9
9
|
export function create32BitCodec(bitCounts) {
|
|
10
10
|
assert.isArray(bitCounts, 'bitCounts');
|
|
@@ -353,10 +353,10 @@ export class BVH {
|
|
|
353
353
|
release_all(): void;
|
|
354
354
|
/**
|
|
355
355
|
*
|
|
356
|
-
* @param {
|
|
356
|
+
* @param {(node: number, tree: BVH) => void} callback
|
|
357
357
|
* @param {*} [ctx]
|
|
358
358
|
*/
|
|
359
|
-
traverse(callback:
|
|
359
|
+
traverse(callback: (node: number, tree: BVH) => void, ctx?: any): void;
|
|
360
360
|
/**
|
|
361
361
|
*
|
|
362
362
|
* @param {number[]} destination
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BVH.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/BVH.js"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"BVH.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/BVH.js"],"names":[],"mappings":"AASA,8BAA+B;AAC/B,+BAAgC;AAChC,+BAAgC;AAChC,8BAA+B;AAE/B;;;;;GAKG;AACH,+BAFU,MAAM,CAE+B;AAE/C;;;GAGG;AACH,wBAFU,MAAM,CAEoB;AAcpC;;;;;GAKG;AACH,iCAFU,MAAM,CAEqB;AAiBrC;;;;;;;;GAQG;AACH;IAEI;;;;OAIG;IACH,sBAAuE;IAYvE;;;;;OAKG;IACH,kCAeC;IA/BD;;;;;OAKG;IACH,+BAEC;IAyBD;;;;OAIG;IACH,uBAAsD;IAUtD;;;;OAIG;IACH,sBAAoD;IAEpD;;;;OAIG;IACH,mBAA8B;IApB9B;;;OAGG;IACH,iCAEC;IAgBD;;;;OAIG;IACH,eAAW;IAEX;;;;OAIG;IACH,eAAY;IAEZ;;;;OAIG;IACH,uBAAmB;IAEnB;;;;OAIG;IACH,eAAmB;IAUnB;;;OAGG;IACH,sBAEC;IAdD;;;OAGG;IACH,mBAEC;IAUD;;;;OAIG;IACH,mBAEC;IAUD;;;OAGG;IACH,+BAMC;IAlBD;;;OAGG;IACH,4BAEC;IAcD,wBAgBC;IAED;;;;OAIG;IACH,uBA6BC;IAED;;OAEG;IACH,aAIC;IAED;;;;;;;OAOG;IACH,4BAFW,MAAM,QAQhB;IAED;;;OAGG;IACH,iBAFa,MAAM,CAqDlB;IAED;;;;OAIG;IACH,iBAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,OAAO,CAOnB;IAED;;;;OAIG;IACH,uBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,uBAHW,MAAM,SACN,MAAM,QAOhB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,UACN,MAAM,QAIhB;IAGD;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;OAIG;IACH,oBAHW,MAAM,UACN,MAAM,QAKhB;IAED;;;;OAIG;IACH,kBAHW,MAAM,UACN,MAAM,EAAE,GAAC,YAAY,QAe/B;IAED;;;;OAIG;IACH,kBAHW,MAAM,QACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,QAAM,QAsB1C;IAED;;;;OAIG;IACH,mBAHW,MAAM,QACN,MAAM,EAAE,QAYlB;IAED;;;;;;;;;OASG;IACH,4BARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAmBhB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAoBlB;IAED;;;;;OAKG;IACH,wCAJW,MAAM,WACN,MAAM,GACJ,MAAM,CAoClB;IAED;;;;;OAKG;IACH,oCAJW,MAAM,WACN,MAAM,WACN,MAAM,QAgBhB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,IAAI,CA0GhB;IAED;;;;;OAKG;IACH,wBAqBC;IAED;;;;OAIG;IACH,yBAmCC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,IAAI,CA6ChB;IAED;;;;;;;;;;;OAWG;IACH,uBAoMC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,uBAwHC;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,WACN,MAAM,WACN,MAAM,QAWhB;IAED;;;;;;;OAOG;IACH,kCAJW,MAAM,WACN,MAAM,WACN,MAAM,QAmBhB;IAED;;;OAGG;IACH,oBAIC;IAED;;;;OAIG;IACH,0BAHkB,MAAM,QAAQ,GAAG,KAAK,IAAI,mBAiC3C;IAED;;;;;OAKG;IACH,+BAJW,MAAM,EAAE,sBACR,MAAM,GACJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,0BA6BC;IAED;;;;;OAKG;IACH,cAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAsCnB;IAGL;;;;OAIG;IACH,gBAFU,OAAO,CAEE;CAPlB"}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* @param {number} x
|
|
16
16
|
* @param {number} y
|
|
17
17
|
* @param {number} z
|
|
18
|
-
* @param {
|
|
18
|
+
* @param {(userData: number) => boolean} filter keep a leaf iff this returns true for its user data
|
|
19
19
|
* @param {number} [max_distance=Infinity] how far to search
|
|
20
20
|
* @returns {number} user data of the nearest passing leaf, or -1 if none qualifies
|
|
21
21
|
*/
|
|
22
|
-
export function bvh_query_user_data_nearest_to_point_filtered(bvh: BVH, x: number, y: number, z: number, filter:
|
|
22
|
+
export function bvh_query_user_data_nearest_to_point_filtered(bvh: BVH, x: number, y: number, z: number, filter: (userData: number) => boolean, max_distance?: number): number;
|
|
23
23
|
//# sourceMappingURL=bvh_query_user_data_nearest_to_point_filtered.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bvh_query_user_data_nearest_to_point_filtered.d.ts","sourceRoot":"","sources":["../../../../../../src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2EAPW,MAAM,KACN,MAAM,KACN,MAAM,
|
|
1
|
+
{"version":3,"file":"bvh_query_user_data_nearest_to_point_filtered.d.ts","sourceRoot":"","sources":["../../../../../../src/core/bvh2/bvh3/query/bvh_query_user_data_nearest_to_point_filtered.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2EAPW,MAAM,KACN,MAAM,KACN,MAAM,qBACK,MAAM,KAAK,OAAO,iBAC7B,MAAM,GACJ,MAAM,CA4DlB"}
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
-
import { aabb3_unsigned_distance_sqr_to_point } from "../../../geom/3d/aabb/aabb3_unsigned_distance_sqr_to_point.js";
|
|
3
|
-
import { COLUMN_CHILD_1, COLUMN_CHILD_2, ELEMENT_WORD_COUNT, NULL_NODE } from "../BVH.js";
|
|
4
|
-
|
|
5
|
-
const stack = SCRATCH_UINT32_TRAVERSAL_STACK;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Nearest leaf to a point whose user data PASSES `filter` — the branch-and-bound search of
|
|
9
|
-
* {@link bvh_query_user_data_nearest_to_point}, except a leaf only becomes the new best when
|
|
10
|
-
* `filter(userData)` returns true. Branches farther than the current best PASSING leaf are still pruned, so
|
|
11
|
-
* `filter` runs only on leaves nearer than the best so far — typically a handful, not every leaf. Lets a
|
|
12
|
-
* caller reject candidates by an external predicate the BVH itself can't express (e.g. line-of-sight from
|
|
13
|
-
* the query point).
|
|
14
|
-
*
|
|
15
|
-
* Re-entrancy: this consumer keeps the shared traversal `pointer` live (advances the global pointer while
|
|
16
|
-
* walking), so per the {@link SCRATCH_UINT32_TRAVERSAL_STACK} contract `filter` MAY itself run a nested
|
|
17
|
-
* BVH walk (it pushes above this live frame and drains back). `filter` must not throw (a throw mid-walk
|
|
18
|
-
* leaves the shared pointer elevated).
|
|
19
|
-
*
|
|
20
|
-
* @param {BVH} bvh
|
|
21
|
-
* @param {number} x
|
|
22
|
-
* @param {number} y
|
|
23
|
-
* @param {number} z
|
|
24
|
-
* @param {
|
|
25
|
-
* @param {number} [max_distance=Infinity] how far to search
|
|
26
|
-
* @returns {number} user data of the nearest passing leaf, or -1 if none qualifies
|
|
27
|
-
*/
|
|
28
|
-
export function bvh_query_user_data_nearest_to_point_filtered(bvh, x, y, z, filter, max_distance = Infinity) {
|
|
29
|
-
const root = bvh.root;
|
|
30
|
-
|
|
31
|
-
if (root === NULL_NODE) {
|
|
32
|
-
return -1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const stack_top = stack.pointer++;
|
|
36
|
-
|
|
37
|
-
stack[stack_top] = root;
|
|
38
|
-
|
|
39
|
-
let best_user_data = -1;
|
|
40
|
-
let best_distance_sqr = max_distance * max_distance;
|
|
41
|
-
|
|
42
|
-
// bind data directly to avoid extra copies reading out AABBs
|
|
43
|
-
const float32 = bvh.__data_float32;
|
|
44
|
-
const uint32 = bvh.__data_uint32;
|
|
45
|
-
|
|
46
|
-
do {
|
|
47
|
-
stack.pointer--;
|
|
48
|
-
|
|
49
|
-
const node = stack[stack.pointer];
|
|
50
|
-
|
|
51
|
-
const address = node * ELEMENT_WORD_COUNT;
|
|
52
|
-
|
|
53
|
-
const distance_sqr = aabb3_unsigned_distance_sqr_to_point(
|
|
54
|
-
float32[address], float32[address + 1], float32[address + 2],
|
|
55
|
-
float32[address + 3], float32[address + 4], float32[address + 5],
|
|
56
|
-
x, y, z
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
if (distance_sqr >= best_distance_sqr) {
|
|
60
|
-
// node (or its whole subtree) can't beat the best passing leaf
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const child_1 = uint32[address + COLUMN_CHILD_1];
|
|
65
|
-
|
|
66
|
-
if (child_1 !== NULL_NODE) {
|
|
67
|
-
|
|
68
|
-
// not a leaf — push children onto the traversal stack
|
|
69
|
-
stack[stack.pointer++] = child_1;
|
|
70
|
-
stack[stack.pointer++] = uint32[address + COLUMN_CHILD_2];
|
|
71
|
-
|
|
72
|
-
} else {
|
|
73
|
-
|
|
74
|
-
// leaf nearer than the current best — accept only if it passes the predicate
|
|
75
|
-
const user_data = bvh.node_get_user_data(node);
|
|
76
|
-
|
|
77
|
-
if (filter(user_data)) {
|
|
78
|
-
best_distance_sqr = distance_sqr;
|
|
79
|
-
best_user_data = user_data;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
} while (stack.pointer > stack_top)
|
|
84
|
-
|
|
85
|
-
return best_user_data;
|
|
86
|
-
}
|
|
1
|
+
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
+
import { aabb3_unsigned_distance_sqr_to_point } from "../../../geom/3d/aabb/aabb3_unsigned_distance_sqr_to_point.js";
|
|
3
|
+
import { COLUMN_CHILD_1, COLUMN_CHILD_2, ELEMENT_WORD_COUNT, NULL_NODE } from "../BVH.js";
|
|
4
|
+
|
|
5
|
+
const stack = SCRATCH_UINT32_TRAVERSAL_STACK;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Nearest leaf to a point whose user data PASSES `filter` — the branch-and-bound search of
|
|
9
|
+
* {@link bvh_query_user_data_nearest_to_point}, except a leaf only becomes the new best when
|
|
10
|
+
* `filter(userData)` returns true. Branches farther than the current best PASSING leaf are still pruned, so
|
|
11
|
+
* `filter` runs only on leaves nearer than the best so far — typically a handful, not every leaf. Lets a
|
|
12
|
+
* caller reject candidates by an external predicate the BVH itself can't express (e.g. line-of-sight from
|
|
13
|
+
* the query point).
|
|
14
|
+
*
|
|
15
|
+
* Re-entrancy: this consumer keeps the shared traversal `pointer` live (advances the global pointer while
|
|
16
|
+
* walking), so per the {@link SCRATCH_UINT32_TRAVERSAL_STACK} contract `filter` MAY itself run a nested
|
|
17
|
+
* BVH walk (it pushes above this live frame and drains back). `filter` must not throw (a throw mid-walk
|
|
18
|
+
* leaves the shared pointer elevated).
|
|
19
|
+
*
|
|
20
|
+
* @param {BVH} bvh
|
|
21
|
+
* @param {number} x
|
|
22
|
+
* @param {number} y
|
|
23
|
+
* @param {number} z
|
|
24
|
+
* @param {(userData: number) => boolean} filter keep a leaf iff this returns true for its user data
|
|
25
|
+
* @param {number} [max_distance=Infinity] how far to search
|
|
26
|
+
* @returns {number} user data of the nearest passing leaf, or -1 if none qualifies
|
|
27
|
+
*/
|
|
28
|
+
export function bvh_query_user_data_nearest_to_point_filtered(bvh, x, y, z, filter, max_distance = Infinity) {
|
|
29
|
+
const root = bvh.root;
|
|
30
|
+
|
|
31
|
+
if (root === NULL_NODE) {
|
|
32
|
+
return -1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const stack_top = stack.pointer++;
|
|
36
|
+
|
|
37
|
+
stack[stack_top] = root;
|
|
38
|
+
|
|
39
|
+
let best_user_data = -1;
|
|
40
|
+
let best_distance_sqr = max_distance * max_distance;
|
|
41
|
+
|
|
42
|
+
// bind data directly to avoid extra copies reading out AABBs
|
|
43
|
+
const float32 = bvh.__data_float32;
|
|
44
|
+
const uint32 = bvh.__data_uint32;
|
|
45
|
+
|
|
46
|
+
do {
|
|
47
|
+
stack.pointer--;
|
|
48
|
+
|
|
49
|
+
const node = stack[stack.pointer];
|
|
50
|
+
|
|
51
|
+
const address = node * ELEMENT_WORD_COUNT;
|
|
52
|
+
|
|
53
|
+
const distance_sqr = aabb3_unsigned_distance_sqr_to_point(
|
|
54
|
+
float32[address], float32[address + 1], float32[address + 2],
|
|
55
|
+
float32[address + 3], float32[address + 4], float32[address + 5],
|
|
56
|
+
x, y, z
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
if (distance_sqr >= best_distance_sqr) {
|
|
60
|
+
// node (or its whole subtree) can't beat the best passing leaf
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const child_1 = uint32[address + COLUMN_CHILD_1];
|
|
65
|
+
|
|
66
|
+
if (child_1 !== NULL_NODE) {
|
|
67
|
+
|
|
68
|
+
// not a leaf — push children onto the traversal stack
|
|
69
|
+
stack[stack.pointer++] = child_1;
|
|
70
|
+
stack[stack.pointer++] = uint32[address + COLUMN_CHILD_2];
|
|
71
|
+
|
|
72
|
+
} else {
|
|
73
|
+
|
|
74
|
+
// leaf nearer than the current best — accept only if it passes the predicate
|
|
75
|
+
const user_data = bvh.node_get_user_data(node);
|
|
76
|
+
|
|
77
|
+
if (filter(user_data)) {
|
|
78
|
+
best_distance_sqr = distance_sqr;
|
|
79
|
+
best_user_data = user_data;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
} while (stack.pointer > stack_top)
|
|
84
|
+
|
|
85
|
+
return best_user_data;
|
|
86
|
+
}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* @param {number[]} planes
|
|
15
15
|
* @param {number} plane_count
|
|
16
16
|
* @param {number} plane_mask
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {(x: number, y: number, z: number) => void} callback
|
|
18
18
|
* @param {*} [thisArg]
|
|
19
19
|
*/
|
|
20
|
-
export function aabb3_detailed_volume_intersection_callback_based(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, plane_mask: number, planes: number[], plane_count: number, callback:
|
|
20
|
+
export function aabb3_detailed_volume_intersection_callback_based(x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, plane_mask: number, planes: number[], plane_count: number, callback: (x: number, y: number, z: number) => void, thisArg?: any): void;
|
|
21
21
|
//# sourceMappingURL=aabb3_detailed_volume_intersection_callback_based.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aabb3_detailed_volume_intersection_callback_based.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;GAkBG;AACH,sEAZW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,cAGN,MAAM,UAFN,MAAM,EAAE,eACR,MAAM,
|
|
1
|
+
{"version":3,"file":"aabb3_detailed_volume_intersection_callback_based.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/traversal/aabb3_detailed_volume_intersection_callback_based.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;GAkBG;AACH,sEAZW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,cAGN,MAAM,UAFN,MAAM,EAAE,eACR,MAAM,gBAEF,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,IAAI,uBAoCnD"}
|
|
@@ -23,7 +23,7 @@ const scratch_points_data = [];
|
|
|
23
23
|
* @param {number[]} planes
|
|
24
24
|
* @param {number} plane_count
|
|
25
25
|
* @param {number} plane_mask
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {(x: number, y: number, z: number) => void} callback
|
|
27
27
|
* @param {*} [thisArg]
|
|
28
28
|
*/
|
|
29
29
|
export function aabb3_detailed_volume_intersection_callback_based(
|
|
@@ -23,8 +23,8 @@ export class Cache<Key, Value> {
|
|
|
23
23
|
* Note: setting {@link maxWeight} to 0 is pointless, as the cache will not be able to hold even a single element.
|
|
24
24
|
*
|
|
25
25
|
* @param {number} [maxWeight=Number.POSITIVE_INFINITY] capacity of the cache, measure in "weight"; The weight is computed by summing key and value weights.
|
|
26
|
-
* @param {
|
|
27
|
-
* @param {
|
|
26
|
+
* @param {(key: Key) => number} [keyWeigher= key=>0] function to compute weight of a key
|
|
27
|
+
* @param {(value: Value) => number} [valueWeigher= value=>1] function to compute weight of a value
|
|
28
28
|
* @param {function(Key):number} [keyHashFunction]
|
|
29
29
|
* @param {function(Key, Key):boolean} [keyEqualityFunction]
|
|
30
30
|
* @param {number} [capacity] initial capacity for the cache, helps prevent early resizing
|
|
@@ -200,11 +200,11 @@ export class Cache<Key, Value> {
|
|
|
200
200
|
drop(): void;
|
|
201
201
|
/**
|
|
202
202
|
*
|
|
203
|
-
* @param {
|
|
203
|
+
* @param {(message: string, key: Key, value: Value) => void} callback
|
|
204
204
|
* @param {*} [thisArg]
|
|
205
205
|
* @returns {boolean}
|
|
206
206
|
*/
|
|
207
|
-
validate(callback:
|
|
207
|
+
validate(callback: (message: string, key: Key, value: Value) => void, thisArg?: any): boolean;
|
|
208
208
|
/**
|
|
209
209
|
* Shortcut for "Map" class spec compliance
|
|
210
210
|
* @readonly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/Cache.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAgBI;;;;;;;;;;OAUG;IACH,sGARW,MAAM,EA2FhB;IAzDG;;;;OAIG;IACH,mBAA4B;IAE5B;;;;OAIG;IACH,qBAAgC;IAEhC;;;;OAIG;IACH,gBAAmB;IACnB;;;;OAIG;IACH,eAAkB;IAGlB;;;;OAIG;IACH,aAIE;IAEF;;;;OAIG;IACH,eAA6B;IAE7B;;;OAGG;IACH,eAA6B;IAE7B;;;OAGG;IACH,WAAyB;IAG7B;;;;;OAKG;IACH,kBAqBC;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAeC;IAED,wBAEC;IAED;;;;OAIG;IACH,wBAaC;IAED;;;;;;OAMG;IACH,yBAHW,GAAG,GACD,OAAO,CAgCnB;IAED;;;;;OAKG;IACH,6BAUC;IAED;;;OAGG;IACH,sBAFa,aAAa,GAAG,EAAC,KAAK,CAAC,GAAC,IAAI,CAIxC;IAED;;;OAGG;IACH,YAFa,OAAO,CAkBnB;IAED;;;OAGG;IACH,gCAFW,MAAM,QAWhB;IAED;;;;OAIG;IACH,SAHW,GAAG,SACH,KAAK,QA+Ef;IAED;;;;OAIG;IACH,cAHW,GAAG,GACD,OAAO,CAInB;IAED;;;;OAIG;IACH,SAHW,GAAG,GACD,KAAK,GAAC,IAAI,CAYtB;IAGD;;;;;;OAMG;IACH,kBALW,GAAG,kBACM,GAAG,KAAE,KAAK,0BAElB,KAAK,CAchB;IAED;;;;OAIG;IACH,wBAqBC;IAED;;;;OAIG;IACH,YAHW,GAAG,GACD,OAAO,CAgBnB;IAED;;;;;OAKG;IACH,kBAHW,GAAG,GACD,OAAO,CAanB;IAED;;;;OAIG;IACH,cAcC;IAED;;;OAGG;IACH,aAOC;IAED;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/Cache.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAgBI;;;;;;;;;;OAUG;IACH,sGARW,MAAM,EA2FhB;IAzDG;;;;OAIG;IACH,mBAA4B;IAE5B;;;;OAIG;IACH,qBAAgC;IAEhC;;;;OAIG;IACH,gBAAmB;IACnB;;;;OAIG;IACH,eAAkB;IAGlB;;;;OAIG;IACH,aAIE;IAEF;;;;OAIG;IACH,eAA6B;IAE7B;;;OAGG;IACH,eAA6B;IAE7B;;;OAGG;IACH,WAAyB;IAG7B;;;;;OAKG;IACH,kBAqBC;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAeC;IAED,wBAEC;IAED;;;;OAIG;IACH,wBAaC;IAED;;;;;;OAMG;IACH,yBAHW,GAAG,GACD,OAAO,CAgCnB;IAED;;;;;OAKG;IACH,6BAUC;IAED;;;OAGG;IACH,sBAFa,aAAa,GAAG,EAAC,KAAK,CAAC,GAAC,IAAI,CAIxC;IAED;;;OAGG;IACH,YAFa,OAAO,CAkBnB;IAED;;;OAGG;IACH,gCAFW,MAAM,QAWhB;IAED;;;;OAIG;IACH,SAHW,GAAG,SACH,KAAK,QA+Ef;IAED;;;;OAIG;IACH,cAHW,GAAG,GACD,OAAO,CAInB;IAED;;;;OAIG;IACH,SAHW,GAAG,GACD,KAAK,GAAC,IAAI,CAYtB;IAGD;;;;;;OAMG;IACH,kBALW,GAAG,kBACM,GAAG,KAAE,KAAK,0BAElB,KAAK,CAchB;IAED;;;;OAIG;IACH,wBAqBC;IAED;;;;OAIG;IACH,YAHW,GAAG,GACD,OAAO,CAgBnB;IAED;;;;;OAKG;IACH,kBAHW,GAAG,GACD,OAAO,CAanB;IAED;;;;OAIG;IACH,cAcC;IAED;;;OAGG;IACH,aAOC;IAED;;;;;OAKG;IACH,6BAJqB,MAAM,OAAO,GAAG,SAAS,KAAK,KAAK,IAAI,kBAE/C,OAAO,CAMnB;IAGL;;;OAGG;IACH,6CAAmB;IAEnB;;;OAGG;IACH,+BA9FiB,OAAO,CA8FF;IAEtB;;;OAGG;IACH,4BAhLiB,OAAO,CAgLL;;CAlBlB;6BApkB4B,mBAAmB"}
|
package/src/core/cache/Cache.js
CHANGED
|
@@ -48,8 +48,8 @@ export class Cache {
|
|
|
48
48
|
* Note: setting {@link maxWeight} to 0 is pointless, as the cache will not be able to hold even a single element.
|
|
49
49
|
*
|
|
50
50
|
* @param {number} [maxWeight=Number.POSITIVE_INFINITY] capacity of the cache, measure in "weight"; The weight is computed by summing key and value weights.
|
|
51
|
-
* @param {
|
|
52
|
-
* @param {
|
|
51
|
+
* @param {(key: Key) => number} [keyWeigher= key=>0] function to compute weight of a key
|
|
52
|
+
* @param {(value: Value) => number} [valueWeigher= value=>1] function to compute weight of a value
|
|
53
53
|
* @param {function(Key):number} [keyHashFunction]
|
|
54
54
|
* @param {function(Key, Key):boolean} [keyEqualityFunction]
|
|
55
55
|
* @param {number} [capacity] initial capacity for the cache, helps prevent early resizing
|
|
@@ -577,7 +577,7 @@ export class Cache {
|
|
|
577
577
|
|
|
578
578
|
/**
|
|
579
579
|
*
|
|
580
|
-
* @param {
|
|
580
|
+
* @param {(message: string, key: Key, value: Value) => void} callback
|
|
581
581
|
* @param {*} [thisArg]
|
|
582
582
|
* @returns {boolean}
|
|
583
583
|
*/
|
|
@@ -18,7 +18,7 @@ export class LoadingCache<K, V> {
|
|
|
18
18
|
* @param [keyEqualityFunction]
|
|
19
19
|
* @param [capacity]
|
|
20
20
|
* @param {number} [timeToLive] in seconds, default is 10 seconds
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {(key: K) => Promise<V>} load
|
|
22
22
|
* @param {boolean} [retryFailed]
|
|
23
23
|
*/
|
|
24
24
|
constructor({ maxWeight, keyWeigher, valueWeigher, keyHashFunction, keyEqualityFunction, capacity, timeToLive, load, retryFailed }?: {
|
|
@@ -61,7 +61,7 @@ export class LoadingCache {
|
|
|
61
61
|
#timeToLive = DEFAULT_TIME_TO_LIVE;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* @type {
|
|
64
|
+
* @type {(key: K) => Promise<V>}
|
|
65
65
|
*/
|
|
66
66
|
#load
|
|
67
67
|
|
|
@@ -85,7 +85,7 @@ export class LoadingCache {
|
|
|
85
85
|
* @param [keyEqualityFunction]
|
|
86
86
|
* @param [capacity]
|
|
87
87
|
* @param {number} [timeToLive] in seconds, default is 10 seconds
|
|
88
|
-
* @param {
|
|
88
|
+
* @param {(key: K) => Promise<V>} load
|
|
89
89
|
* @param {boolean} [retryFailed]
|
|
90
90
|
*/
|
|
91
91
|
constructor({
|
|
@@ -5,8 +5,8 @@ export class CacheWTinylfu {
|
|
|
5
5
|
* @param {number} [promotionThreshold=1] frequency an item must exceed to be promoted out of Trial (Probation)
|
|
6
6
|
* @param {number} [capacityWindow=1] weight cap of the Window region (burst buffer)
|
|
7
7
|
* @param {number} [capacityProtected=1] weight cap of the Protected region (VIP segment of Main)
|
|
8
|
-
* @param {
|
|
9
|
-
* @param {
|
|
8
|
+
* @param {(key: Key) => number} [keyWeigher= key=>0] function to compute weight of a key
|
|
9
|
+
* @param {(value: Value) => number} [valueWeigher= value=>1] function to compute weight of a value
|
|
10
10
|
* @param {function(Key):number} [keyHashFunction]
|
|
11
11
|
* @param {function(Key, Key):boolean} [keyEqualityFunction]
|
|
12
12
|
*/
|
|
@@ -143,8 +143,8 @@ export class CacheWTinylfu {
|
|
|
143
143
|
* @param {number} [promotionThreshold=1] frequency an item must exceed to be promoted out of Trial (Probation)
|
|
144
144
|
* @param {number} [capacityWindow=1] weight cap of the Window region (burst buffer)
|
|
145
145
|
* @param {number} [capacityProtected=1] weight cap of the Protected region (VIP segment of Main)
|
|
146
|
-
* @param {
|
|
147
|
-
* @param {
|
|
146
|
+
* @param {(key: Key) => number} [keyWeigher= key=>0] function to compute weight of a key
|
|
147
|
+
* @param {(value: Value) => number} [valueWeigher= value=>1] function to compute weight of a value
|
|
148
148
|
* @param {function(Key):number} [keyHashFunction]
|
|
149
149
|
* @param {function(Key, Key):boolean} [keyEqualityFunction]
|
|
150
150
|
*/
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @template T
|
|
4
4
|
* @param {T[]} array
|
|
5
5
|
* @param {T} element
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {(a: T, b: T) => boolean} equals
|
|
7
7
|
* @returns {number} index of first match or -1 if no matches found
|
|
8
8
|
*/
|
|
9
|
-
export function array_index_by_equality<T>(array: T[], element: T, equals:
|
|
9
|
+
export function array_index_by_equality<T>(array: T[], element: T, equals: (a: T, b: T) => boolean): number;
|
|
10
10
|
//# sourceMappingURL=array_index_by_equality.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_index_by_equality.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_index_by_equality.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"array_index_by_equality.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_index_by_equality.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,2FAH2B,OAAO,GACrB,MAAM,CAclB"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @template T
|
|
4
4
|
* @param {T[]} array
|
|
5
5
|
* @param {T} element
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {(a: T, b: T) => boolean} equals
|
|
7
7
|
* @returns {number} index of first match or -1 if no matches found
|
|
8
8
|
*/
|
|
9
9
|
export function array_index_by_equality(array, element, equals) {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* If multiple elements with the same highest score exist, the result will be first such encountered element
|
|
4
4
|
* @template T
|
|
5
5
|
* @param {T[]} array
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {(el: T, index: number) => number} scoreFunction
|
|
7
7
|
* @returns {T|undefined}
|
|
8
8
|
*/
|
|
9
|
-
export function array_pick_best_element<T>(array: T[], scoreFunction:
|
|
9
|
+
export function array_pick_best_element<T>(array: T[], scoreFunction: (el: T, index: number) => number): T;
|
|
10
10
|
//# sourceMappingURL=array_pick_best_element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_pick_best_element.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_pick_best_element.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"array_pick_best_element.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_pick_best_element.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,qFAH0B,MAAM,KAAK,MAAM,KAqC1C"}
|
|
@@ -5,7 +5,7 @@ import { assert } from "../../assert.js";
|
|
|
5
5
|
* If multiple elements with the same highest score exist, the result will be first such encountered element
|
|
6
6
|
* @template T
|
|
7
7
|
* @param {T[]} array
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {(el: T, index: number) => number} scoreFunction
|
|
9
9
|
* @returns {T|undefined}
|
|
10
10
|
*/
|
|
11
11
|
export function array_pick_best_element(array, scoreFunction) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @template T
|
|
3
3
|
* @param {T[]} array
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {(el: T, index: number) => number} scoreFunction
|
|
5
5
|
* @returns {T[]}
|
|
6
6
|
*/
|
|
7
|
-
export function array_pick_best_elements<T>(array: T[], scoreFunction:
|
|
7
|
+
export function array_pick_best_elements<T>(array: T[], scoreFunction: (el: T, index: number) => number): T[];
|
|
8
8
|
//# sourceMappingURL=array_pick_best_elements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_pick_best_elements.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_pick_best_elements.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"array_pick_best_elements.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/array_pick_best_elements.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,sFAH0B,MAAM,KAAK,MAAM,OA6C1C"}
|
|
@@ -3,7 +3,7 @@ import { assert } from "../../assert.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* @template T
|
|
5
5
|
* @param {T[]} array
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {(el: T, index: number) => number} scoreFunction
|
|
7
7
|
* @returns {T[]}
|
|
8
8
|
*/
|
|
9
9
|
export function array_pick_best_elements(array, scoreFunction) {
|