@woosh/meep-engine 2.156.0 → 2.157.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 +1 -3
- package/editor/view/ecs/components/common/AutoCanvasView.js +100 -53
- package/editor/view/ecs/components/common/TextController.js +59 -0
- package/editor/view/node-graph/NodeGraphCamera.js +90 -0
- package/editor/view/node-graph/NodeGraphEditorView.js +121 -22
- package/editor/view/node-graph/NodeGraphSelection.js +89 -0
- package/editor/view/node-graph/NodeGraphView.js +669 -453
- package/editor/view/node-graph/NodeView.js +211 -135
- package/editor/view/node-graph/actions/ConnectionCreateAction.js +53 -0
- package/editor/view/node-graph/actions/ConnectionDeleteAction.js +36 -0
- package/editor/view/node-graph/actions/NodeDeleteAction.js +88 -0
- package/editor/view/node-graph/actions/NodeParameterSetAction.js +52 -0
- package/editor/view/node-graph/actions/NodesMoveAction.js +41 -0
- package/editor/view/node-graph/actions/SelectionSetAction.js +60 -0
- package/editor/view/node-graph/connection_wire_geometry.js +107 -0
- package/package.json +1 -1
- package/samples/generation/SampleGenerator0.js +8 -1
- package/src/core/binary/reinterpret_float32_as_uint32.d.ts +7 -0
- package/src/core/binary/reinterpret_float32_as_uint32.d.ts.map +1 -0
- package/src/core/binary/reinterpret_float32_as_uint32.js +13 -0
- package/src/core/binary/reinterpret_uint32_as_float32.d.ts +7 -0
- package/src/core/binary/reinterpret_uint32_as_float32.d.ts.map +1 -0
- package/src/core/binary/reinterpret_uint32_as_float32.js +14 -0
- package/src/core/bvh2/bvh3/ebvh_build_for_geometry_incremental.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/ebvh_build_for_geometry_incremental.js +1 -3
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.d.ts +12 -0
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.d.ts.map +1 -0
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.js +92 -0
- package/src/core/bvh8/BVH8.d.ts +127 -0
- package/src/core/bvh8/BVH8.d.ts.map +1 -0
- package/src/core/bvh8/BVH8.js +436 -0
- package/src/core/bvh8/NOTES.md +63 -0
- package/src/core/bvh8/build/BVH8Converter.d.ts +59 -0
- package/src/core/bvh8/build/BVH8Converter.d.ts.map +1 -0
- package/src/core/bvh8/build/BVH8Converter.js +588 -0
- package/src/core/bvh8/build/NodeProxy.d.ts +66 -0
- package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -0
- package/src/core/bvh8/build/NodeProxy.js +308 -0
- package/src/core/bvh8/build/TriangleCluster.d.ts +29 -0
- package/src/core/bvh8/build/TriangleCluster.d.ts.map +1 -0
- package/src/core/bvh8/build/TriangleCluster.js +123 -0
- package/src/core/bvh8/build/aabb3_compute_merge_cost.d.ts +8 -0
- package/src/core/bvh8/build/aabb3_compute_merge_cost.d.ts.map +1 -0
- package/src/core/bvh8/build/aabb3_compute_merge_cost.js +29 -0
- package/src/core/bvh8/build/aabb3_from_triangle_by_index.d.ts +10 -0
- package/src/core/bvh8/build/aabb3_from_triangle_by_index.d.ts.map +1 -0
- package/src/core/bvh8/build/aabb3_from_triangle_by_index.js +18 -0
- package/src/core/bvh8/build/bvh8_build_for_geometry.d.ts +10 -0
- package/src/core/bvh8/build/bvh8_build_for_geometry.d.ts.map +1 -0
- package/src/core/bvh8/build/bvh8_build_for_geometry.js +303 -0
- package/src/core/bvh8/build/bvh8_from_proxy.d.ts +9 -0
- package/src/core/bvh8/build/bvh8_from_proxy.d.ts.map +1 -0
- package/src/core/bvh8/build/bvh8_from_proxy.js +256 -0
- package/src/core/bvh8/build/byte.d.ts +7 -0
- package/src/core/bvh8/build/byte.d.ts.map +1 -0
- package/src/core/bvh8/build/byte.js +10 -0
- package/src/core/bvh8/build/encode_bounds_e.d.ts +9 -0
- package/src/core/bvh8/build/encode_bounds_e.d.ts.map +1 -0
- package/src/core/bvh8/build/encode_bounds_e.js +12 -0
- package/src/core/bvh8/bvh8_convert_to_dot.d.ts +11 -0
- package/src/core/bvh8/bvh8_convert_to_dot.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_convert_to_dot.js +133 -0
- package/src/core/bvh8/bvh8_count_primitives.d.ts +22 -0
- package/src/core/bvh8/bvh8_count_primitives.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_count_primitives.js +98 -0
- package/src/core/bvh8/bvh8_geometry_validate.d.ts +16 -0
- package/src/core/bvh8/bvh8_geometry_validate.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_geometry_validate.js +149 -0
- package/src/core/bvh8/bvh8_geometry_validate_indirect.d.ts +16 -0
- package/src/core/bvh8/bvh8_geometry_validate_indirect.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_geometry_validate_indirect.js +177 -0
- package/src/core/bvh8/bvh8_get_node_bounds.d.ts +9 -0
- package/src/core/bvh8/bvh8_get_node_bounds.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_get_node_bounds.js +35 -0
- package/src/core/bvh8/bvh8_get_node_child_bounds.d.ts +10 -0
- package/src/core/bvh8/bvh8_get_node_child_bounds.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_get_node_child_bounds.js +53 -0
- package/src/core/bvh8/bvh8_node_child_surface_area.d.ts +9 -0
- package/src/core/bvh8/bvh8_node_child_surface_area.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_node_child_surface_area.js +18 -0
- package/src/core/bvh8/bvh8_node_count_triangles.d.ts +8 -0
- package/src/core/bvh8/bvh8_node_count_triangles.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_node_count_triangles.js +28 -0
- package/src/core/bvh8/bvh8_quality.d.ts +8 -0
- package/src/core/bvh8/bvh8_quality.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_quality.js +73 -0
- package/src/core/bvh8/bvh8_validate_structure.d.ts +15 -0
- package/src/core/bvh8/bvh8_validate_structure.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_validate_structure.js +87 -0
- package/src/core/collection/Uint32MinHeap.d.ts +56 -0
- package/src/core/collection/Uint32MinHeap.d.ts.map +1 -0
- package/src/core/collection/Uint32MinHeap.js +109 -0
- package/src/core/collection/list/FilteredListProjection.js +1 -1
- package/src/{engine/physics/island → core/collection/union-find}/union_find.d.ts +8 -5
- package/src/core/collection/union-find/union_find.d.ts.map +1 -0
- package/src/{engine/physics/island → core/collection/union-find}/union_find.js +8 -5
- package/src/core/dom/isImageBitmap.d.ts +7 -0
- package/src/core/dom/isImageBitmap.d.ts.map +1 -0
- package/src/core/dom/isImageBitmap.js +12 -0
- package/src/core/function/frameThrottle.d.ts +8 -0
- package/src/core/function/frameThrottle.d.ts.map +1 -0
- package/src/core/function/frameThrottle.js +23 -0
- package/src/{engine/physics/narrowphase/clip_against_axis_uv.d.ts → core/geom/2d/polygon/polygon2_clip_axis_halfplane.d.ts} +3 -3
- package/src/core/geom/2d/polygon/polygon2_clip_axis_halfplane.d.ts.map +1 -0
- package/src/{engine/physics/narrowphase/clip_against_axis_uv.js → core/geom/2d/polygon/polygon2_clip_axis_halfplane.js} +51 -51
- package/src/{engine/physics/narrowphase/decomposition/aabb_world_to_local.d.ts → core/geom/3d/aabb/aabb3_transform_oriented_inverse.d.ts} +9 -7
- package/src/core/geom/3d/aabb/aabb3_transform_oriented_inverse.d.ts.map +1 -0
- package/src/{engine/physics/narrowphase/decomposition/aabb_world_to_local.js → core/geom/3d/aabb/aabb3_transform_oriented_inverse.js} +9 -7
- package/src/core/geom/3d/aabb/compute_triangle_group_aabb3.d.ts +12 -0
- package/src/core/geom/3d/aabb/compute_triangle_group_aabb3.d.ts.map +1 -0
- package/src/core/geom/3d/aabb/compute_triangle_group_aabb3.js +46 -0
- package/src/core/geom/3d/box/box3_projected_half_extent.d.ts +28 -0
- package/src/core/geom/3d/box/box3_projected_half_extent.d.ts.map +1 -0
- package/src/core/geom/3d/box/box3_projected_half_extent.js +35 -0
- package/src/core/geom/3d/frustum/read_cluster_frustum_corners.js +1 -1
- package/src/core/geom/3d/frustum/read_frustum_corner.d.ts +9 -0
- package/src/core/geom/3d/frustum/read_frustum_corner.d.ts.map +1 -0
- package/src/core/geom/3d/frustum/read_frustum_corner.js +14 -0
- package/src/core/geom/3d/gjk/gjk.d.ts.map +1 -0
- package/src/{engine/physics → core/geom/3d}/gjk/gjk.js +430 -372
- package/src/{engine/physics → core/geom/3d}/gjk/gjk_epa_penetration.d.ts +8 -5
- package/src/core/geom/3d/gjk/gjk_epa_penetration.d.ts.map +1 -0
- package/src/{engine/physics → core/geom/3d}/gjk/gjk_epa_penetration.js +520 -544
- package/src/{engine/physics → core/geom/3d}/gjk/minkowski_support.d.ts +5 -4
- package/src/core/geom/3d/gjk/minkowski_support.d.ts.map +1 -0
- package/src/{engine/physics → core/geom/3d}/gjk/minkowski_support.js +71 -70
- package/src/{engine/physics → core/geom/3d}/gjk/mpr.d.ts +3 -3
- package/src/core/geom/3d/gjk/mpr.d.ts.map +1 -0
- package/src/{engine/physics → core/geom/3d}/gjk/mpr.js +368 -362
- package/src/{engine/physics/integration/quat_integrate.d.ts → core/geom/3d/quaternion/quat3_integrate.d.ts} +2 -2
- package/src/core/geom/3d/quaternion/quat3_integrate.d.ts.map +1 -0
- package/src/{engine/physics/integration/quat_integrate.js → core/geom/3d/quaternion/quat3_integrate.js} +1 -1
- package/src/{engine/physics/narrowphase/PosedShape.d.ts → core/geom/3d/shape/PosedShape3D.d.ts} +9 -8
- package/src/{engine/physics/narrowphase/PosedShape.d.ts.map → core/geom/3d/shape/PosedShape3D.d.ts.map} +1 -1
- package/src/{engine/physics/narrowphase/PosedShape.js → core/geom/3d/shape/PosedShape3D.js} +10 -9
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +15 -11
- package/src/core/geom/vec3/v3_quat3_apply_inverse.d.ts +1 -1
- package/src/core/geom/vec3/v3_quat3_apply_inverse.js +1 -1
- package/src/core/math/complex/complex_add.d.ts +1 -1
- package/src/core/math/complex/complex_add.d.ts.map +1 -1
- package/src/core/math/complex/complex_add.js +12 -3
- package/src/core/math/complex/complex_div.d.ts +1 -1
- package/src/core/math/complex/complex_div.d.ts.map +1 -1
- package/src/core/math/complex/complex_div.js +11 -4
- package/src/core/math/complex/complex_mul.d.ts +1 -1
- package/src/core/math/complex/complex_mul.d.ts.map +1 -1
- package/src/core/math/complex/complex_mul.js +10 -3
- package/src/core/math/complex/complex_sub.d.ts +1 -1
- package/src/core/math/complex/complex_sub.d.ts.map +1 -1
- package/src/core/math/complex/complex_sub.js +12 -3
- package/src/{engine/physics/fluid/solver/optimal_sor_omega.d.ts → core/math/linalg/sor_optimal_omega.d.ts} +4 -3
- package/src/core/math/linalg/sor_optimal_omega.d.ts.map +1 -0
- package/src/{engine/physics/fluid/solver/optimal_sor_omega.js → core/math/linalg/sor_optimal_omega.js} +4 -3
- package/src/core/math/lookup/ParameterLookupTable.d.ts +123 -0
- package/src/core/math/lookup/ParameterLookupTable.d.ts.map +1 -0
- package/src/core/math/lookup/ParameterLookupTable.js +495 -0
- package/src/core/math/lookup/ParameterLookupTableFlags.d.ts +5 -0
- package/src/core/math/lookup/ParameterLookupTableFlags.d.ts.map +1 -0
- package/src/core/math/lookup/ParameterLookupTableFlags.js +6 -0
- package/src/core/math/physics/kinematics/computeInterceptPoint.d.ts.map +1 -0
- package/src/{engine/physics → core/math/physics/kinematics}/computeInterceptPoint.js +79 -79
- package/src/core/math/physics/mie/ri_air.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_air.js +1 -3
- package/src/core/math/physics/mie/ri_ammonium_sulfate.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_ammonium_sulfate.js +1 -3
- package/src/core/math/physics/mie/ri_brine.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_brine.js +1 -3
- package/src/core/math/physics/mie/ri_dust.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_dust.js +1 -3
- package/src/core/math/physics/mie/ri_pollen.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_pollen.js +1 -3
- package/src/core/math/physics/mie/ri_smoke.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_smoke.js +1 -3
- package/src/core/math/physics/mie/ri_soot.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_soot.js +1 -3
- package/src/core/math/physics/mie/ri_water.d.ts.map +1 -1
- package/src/core/math/physics/mie/ri_water.js +1 -3
- package/src/core/math/random/random_pick_weighted_index.d.ts +10 -0
- package/src/core/math/random/random_pick_weighted_index.d.ts.map +1 -0
- package/src/core/math/random/random_pick_weighted_index.js +26 -0
- package/src/core/model/node-graph/NodeGraph.d.ts +9 -0
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +38 -0
- package/src/core/model/node-graph/visual/NodeGraphVisualData.d.ts +23 -0
- package/src/core/model/node-graph/visual/NodeGraphVisualData.d.ts.map +1 -1
- package/src/core/model/node-graph/visual/NodeGraphVisualData.js +54 -0
- package/src/core/path/convertPathToURL.d.ts +9 -0
- package/src/core/path/convertPathToURL.d.ts.map +1 -0
- package/src/core/path/convertPathToURL.js +107 -0
- package/src/core/process/worker/WorkerBuilder.js +1 -1
- package/src/core/process/worker/extractTransferables.js +1 -1
- package/src/engine/animation/curve/draw/build_tangent_editor.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/build_tangent_editor.js +8 -1
- package/src/engine/animation/curve/editor/createKeyframeDraggableAspect.d.ts.map +1 -1
- package/src/engine/animation/curve/editor/createKeyframeDraggableAspect.js +11 -5
- package/src/engine/asset/Asset.d.ts.map +1 -1
- package/src/engine/asset/Asset.js +16 -6
- package/src/engine/asset/AssetManager.d.ts +61 -52
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/asset/AssetManager.js +1411 -1045
- package/src/engine/asset/AssetRequest.d.ts +1 -1
- package/src/engine/asset/AssetRequest.d.ts.map +1 -1
- package/src/engine/asset/AssetRequest.js +1 -1
- package/src/engine/asset/AssetRequestScope.d.ts.map +1 -1
- package/src/engine/asset/AssetRequestScope.js +7 -0
- package/src/engine/asset/PendingAsset.d.ts +32 -1
- package/src/engine/asset/PendingAsset.d.ts.map +1 -1
- package/src/engine/asset/PendingAsset.js +108 -61
- package/src/engine/asset/loaders/ArrayBufferLoader.js +2 -2
- package/src/engine/asset/loaders/AssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/AssetLoader.js +19 -2
- package/src/engine/asset/loaders/GLTFAssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/GLTFAssetLoader.js +123 -114
- package/src/engine/asset/loaders/JavascriptAssetLoader.d.ts +1 -1
- package/src/engine/asset/loaders/JavascriptAssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/JavascriptAssetLoader.js +31 -47
- package/src/engine/asset/loaders/JsonAssetLoader.js +1 -1
- package/src/engine/asset/loaders/SVGAssetLoader.js +2 -2
- package/src/engine/asset/loaders/SoundAssetLoader.js +1 -1
- package/src/engine/asset/loaders/TextAssetLoader.js +2 -2
- package/src/{core → engine/asset/loaders}/font/FontAsset.d.ts +1 -1
- package/src/engine/asset/loaders/font/FontAsset.d.ts.map +1 -0
- package/src/{core → engine/asset/loaders}/font/FontAsset.js +21 -21
- package/src/{core → engine/asset/loaders}/font/FontAssetLoader.d.ts +1 -1
- package/src/engine/asset/loaders/font/FontAssetLoader.d.ts.map +1 -0
- package/src/{core → engine/asset/loaders}/font/FontAssetLoader.js +20 -20
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.d.ts +1 -1
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.js +11 -20
- package/src/engine/asset/loaders/texture/TextureAssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/texture/TextureAssetLoader.js +8 -2
- package/src/engine/asset/preloader/AssetPreloader.js +1 -1
- package/src/engine/ecs/sockets/serialization/AttachmentSocketsAssetLoader.d.ts +1 -1
- package/src/engine/ecs/sockets/serialization/AttachmentSocketsAssetLoader.d.ts.map +1 -1
- package/src/engine/ecs/sockets/serialization/AttachmentSocketsAssetLoader.js +19 -22
- package/src/engine/graphics/FrameThrottle.d.ts +1 -7
- package/src/engine/graphics/FrameThrottle.d.ts.map +1 -1
- package/src/engine/graphics/FrameThrottle.js +2 -24
- package/src/{core/geom/3d/shape/util → engine/graphics/debug}/shape_to_visual_entity.d.ts +1 -1
- package/src/engine/graphics/debug/shape_to_visual_entity.d.ts.map +1 -0
- package/src/{core/geom/3d/shape/util → engine/graphics/debug}/shape_to_visual_entity.js +159 -159
- package/src/{core/geom/3d/tetrahedra → engine/graphics/debug}/visualize_tetrahedral_mesh.d.ts +1 -1
- package/src/engine/graphics/debug/visualize_tetrahedral_mesh.d.ts.map +1 -0
- package/src/{core/geom/3d/tetrahedra → engine/graphics/debug}/visualize_tetrahedral_mesh.js +46 -46
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionAssetLoader.d.ts +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionAssetLoader.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionAssetLoader.js +22 -32
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +2 -76
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +2 -427
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +1 -4
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +2 -6
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +1 -1
- package/src/engine/graphics/render/forward_plus/read_frustum_corner.d.ts +1 -8
- package/src/engine/graphics/render/forward_plus/read_frustum_corner.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/read_frustum_corner.js +2 -14
- package/src/engine/graphics/sh3/path_tracer/geometry/compute_triangle_group_aabb3.d.ts +1 -11
- package/src/engine/graphics/sh3/path_tracer/geometry/compute_triangle_group_aabb3.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/geometry/compute_triangle_group_aabb3.js +2 -46
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +1 -1
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts +27 -0
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts.map +1 -0
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.js +81 -0
- package/src/engine/graphics/texture/isImageBitmap.d.ts +1 -6
- package/src/engine/graphics/texture/isImageBitmap.d.ts.map +1 -1
- package/src/engine/graphics/texture/isImageBitmap.js +2 -12
- package/src/{core/process/action → engine/intelligence/behavior/util}/AsynchronousDelayAction.d.ts +2 -2
- package/src/engine/intelligence/behavior/util/AsynchronousDelayAction.d.ts.map +1 -0
- package/src/{core/process/action → engine/intelligence/behavior/util}/AsynchronousDelayAction.js +55 -55
- package/src/engine/network/NetworkSession.d.ts +12 -1
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +52 -1
- package/src/engine/network/README.md +45 -0
- package/src/engine/network/convertPathToURL.d.ts +1 -8
- package/src/engine/network/convertPathToURL.d.ts.map +1 -1
- package/src/engine/network/convertPathToURL.js +2 -107
- package/src/engine/network/core/quantize/quantize_float.d.ts.map +1 -1
- package/src/engine/network/core/quantize/quantize_float.js +7 -0
- package/src/engine/network/core/quantize/quantize_position.d.ts.map +1 -1
- package/src/engine/network/core/quantize/quantize_position.js +12 -1
- package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +15 -1
- package/src/engine/network/replication/Replicator.d.ts +8 -0
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +48 -0
- package/src/engine/network/transport/Channel.d.ts.map +1 -1
- package/src/engine/network/transport/Channel.js +46 -12
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts +16 -0
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts.map +1 -1
- package/src/engine/network/transport/ReliableCommandPipeline.js +29 -0
- package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.js +7 -1
- package/src/engine/network/transport/fragments/packet_size.d.ts +5 -5
- package/src/engine/network/transport/fragments/packet_size.d.ts.map +1 -1
- package/src/engine/network/transport/fragments/packet_size.js +5 -5
- package/src/engine/physics/BULLET_REVIEW.md +1 -1
- package/src/engine/physics/JOLT_REVIEW.md +2 -2
- package/src/engine/physics/PLAN.md +1094 -945
- package/src/engine/physics/RAPIER_REVIEW.md +2 -2
- package/src/engine/physics/body/BodyStorage.d.ts +2 -12
- package/src/engine/physics/body/BodyStorage.d.ts.map +1 -1
- package/src/engine/physics/body/BodyStorage.js +406 -452
- package/src/engine/physics/body/SolverBodyState.d.ts.map +1 -1
- package/src/engine/physics/body/SolverBodyState.js +12 -3
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +28 -3
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -1
- package/src/engine/physics/broadphase/compute_fat_world_aabb.js +60 -24
- package/src/engine/physics/broadphase/generate_pairs.d.ts +9 -5
- package/src/engine/physics/broadphase/generate_pairs.d.ts.map +1 -1
- package/src/engine/physics/broadphase/generate_pairs.js +52 -37
- package/src/engine/physics/ccd/linear_sweep.d.ts +15 -5
- package/src/engine/physics/ccd/linear_sweep.d.ts.map +1 -1
- package/src/engine/physics/ccd/linear_sweep.js +122 -40
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +830 -805
- package/src/engine/physics/contact/ManifoldStore.d.ts +91 -16
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
- package/src/engine/physics/contact/ManifoldStore.js +204 -60
- package/src/engine/physics/ecs/BodyKind.d.ts +7 -3
- package/src/engine/physics/ecs/BodyKind.d.ts.map +1 -1
- package/src/engine/physics/ecs/BodyKind.js +29 -25
- package/src/engine/physics/ecs/Collider.d.ts +7 -0
- package/src/engine/physics/ecs/Collider.d.ts.map +1 -1
- package/src/engine/physics/ecs/Collider.js +7 -0
- package/src/engine/physics/ecs/ColliderSerializationAdapter.js +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +110 -6
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +467 -45
- package/src/engine/physics/ecs/RigidBody.d.ts +20 -5
- package/src/engine/physics/ecs/RigidBody.d.ts.map +1 -1
- package/src/engine/physics/ecs/RigidBody.js +307 -286
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts +6 -3
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts.map +1 -1
- package/src/engine/physics/ecs/RigidBodyFlags.js +31 -28
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts +12 -4
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.js +19 -5
- package/src/engine/physics/ecs/RigidBodySerializationUpgrader_0_1.d.ts +10 -0
- package/src/engine/physics/ecs/RigidBodySerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/physics/ecs/RigidBodySerializationUpgrader_0_1.js +37 -0
- package/src/engine/physics/ecs/find_non_finite_physics_state.d.ts +28 -0
- package/src/engine/physics/ecs/find_non_finite_physics_state.d.ts.map +1 -0
- package/src/engine/physics/ecs/find_non_finite_physics_state.js +76 -0
- package/src/engine/physics/events/ContactEventBuffer.d.ts +11 -0
- package/src/engine/physics/events/ContactEventBuffer.d.ts.map +1 -1
- package/src/engine/physics/events/ContactEventBuffer.js +40 -0
- package/src/engine/physics/events/diff_manifolds.d.ts +30 -13
- package/src/engine/physics/events/diff_manifolds.d.ts.map +1 -1
- package/src/engine/physics/events/diff_manifolds.js +87 -50
- package/src/engine/physics/fluid/FluidField.d.ts +45 -17
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +53 -23
- package/src/engine/physics/fluid/FluidSimulator.d.ts +141 -5
- package/src/engine/physics/fluid/FluidSimulator.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidSimulator.js +336 -43
- package/src/engine/physics/fluid/REVIEW_02_PLAN.md +114 -0
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts +4 -3
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidComponent.js +4 -3
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
- package/src/engine/physics/fluid/effector/AmbientWindFluidEffector.d.ts +41 -0
- package/src/engine/physics/fluid/effector/AmbientWindFluidEffector.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/AmbientWindFluidEffector.js +124 -0
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts +27 -8
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +67 -18
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_scalar.d.ts +42 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_scalar.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_scalar.js +136 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.d.ts +37 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.js +169 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.d.ts +36 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.js +100 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_forward.d.ts +6 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_forward.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_forward.js +6 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.d.ts +7 -2
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.js +17 -12
- package/src/engine/physics/fluid/solver/v3_grid_apply_vorticity_confinement.d.ts +42 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_vorticity_confinement.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_vorticity_confinement.js +131 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.d.ts +32 -22
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.js +43 -26
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_constant.d.ts +31 -0
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_constant.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_constant.js +77 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.d.ts +26 -19
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.js +46 -42
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.d.ts +38 -10
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.js +158 -75
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.d.ts +22 -17
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.js +108 -96
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts +30 -1
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts.map +1 -1
- package/src/engine/physics/inertia/world_inverse_inertia.js +160 -116
- package/src/engine/physics/integration/integrate_position.js +97 -97
- package/src/engine/physics/island/IslandBuilder.d.ts +49 -8
- package/src/engine/physics/island/IslandBuilder.d.ts.map +1 -1
- package/src/engine/physics/island/IslandBuilder.js +93 -14
- package/src/engine/physics/narrowphase/box_box_manifold.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/box_box_manifold.js +683 -673
- package/src/engine/physics/narrowphase/box_triangle_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/box_triangle_contact.js +899 -749
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts +27 -0
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +624 -459
- package/src/engine/physics/narrowphase/capsule_triangle_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_triangle_contact.js +58 -38
- package/src/engine/physics/narrowphase/compute_penetration.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/compute_penetration.js +369 -325
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +3 -1
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/convex_convex_manifold.js +568 -422
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts +6 -3
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.js +66 -10
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts +4 -1
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +97 -94
- package/src/engine/physics/narrowphase/mesh_mesh_tet_manifold.js +117 -117
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +1738 -1739
- package/src/engine/physics/narrowphase/reduce_manifold_contacts.d.ts +14 -7
- package/src/engine/physics/narrowphase/reduce_manifold_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/reduce_manifold_contacts.js +74 -69
- package/src/engine/physics/persistence/solver_caches.d.ts +20 -0
- package/src/engine/physics/persistence/solver_caches.d.ts.map +1 -0
- package/src/engine/physics/persistence/solver_caches.js +309 -0
- package/src/engine/physics/queries/overlap_shape.d.ts.map +1 -1
- package/src/engine/physics/queries/overlap_shape.js +187 -184
- package/src/engine/physics/queries/raycast.d.ts +3 -2
- package/src/engine/physics/queries/raycast.d.ts.map +1 -1
- package/src/engine/physics/queries/raycast.js +37 -11
- package/src/engine/physics/queries/shape_cast.d.ts +18 -5
- package/src/engine/physics/queries/shape_cast.d.ts.map +1 -1
- package/src/engine/physics/queries/shape_cast.js +417 -393
- package/src/engine/physics/solver/solve_contacts.d.ts +22 -6
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -1
- package/src/engine/physics/solver/solve_contacts.js +1482 -1338
- package/src/engine/physics/vehicle/RaycastVehicle.d.ts.map +1 -1
- package/src/engine/physics/vehicle/RaycastVehicle.js +344 -339
- package/src/engine/ui/DraggableAspect.d.ts +12 -3
- package/src/engine/ui/DraggableAspect.d.ts.map +1 -1
- package/src/engine/ui/DraggableAspect.js +115 -83
- package/src/generation/COORDINATES.md +54 -0
- package/src/generation/GridTaskGroup.js +2 -2
- package/src/generation/REVIEW_01_ACTION_PLAN.md +628 -0
- package/src/generation/automata/CaveGeneratorCellularAutomata.d.ts +9 -1
- package/src/generation/automata/CaveGeneratorCellularAutomata.d.ts.map +1 -1
- package/src/generation/automata/CaveGeneratorCellularAutomata.js +79 -59
- package/src/generation/automata/CellularAutomata.d.ts +6 -3
- package/src/generation/automata/CellularAutomata.d.ts.map +1 -1
- package/src/generation/automata/CellularAutomata.js +22 -19
- package/src/generation/filtering/CellFilter.d.ts +17 -0
- package/src/generation/filtering/CellFilter.d.ts.map +1 -1
- package/src/generation/filtering/CellFilter.js +117 -77
- package/src/generation/filtering/CellFilterCellMatcher.d.ts.map +1 -1
- package/src/generation/filtering/CellFilterCellMatcher.js +2 -0
- package/src/generation/filtering/boolean/CellFilterLiteralBoolean.d.ts +5 -0
- package/src/generation/filtering/boolean/CellFilterLiteralBoolean.d.ts.map +1 -1
- package/src/generation/filtering/boolean/CellFilterLiteralBoolean.js +15 -0
- package/src/generation/filtering/core/CellFilterBinaryOperation.d.ts +0 -1
- package/src/generation/filtering/core/CellFilterBinaryOperation.d.ts.map +1 -1
- package/src/generation/filtering/core/CellFilterBinaryOperation.js +37 -50
- package/src/generation/filtering/core/CellFilterOperationTertiary.d.ts +0 -1
- package/src/generation/filtering/core/CellFilterOperationTertiary.d.ts.map +1 -1
- package/src/generation/filtering/core/CellFilterOperationTertiary.js +43 -59
- package/src/generation/filtering/core/CellFilterUnaryOperation.d.ts +0 -1
- package/src/generation/filtering/core/CellFilterUnaryOperation.d.ts.map +1 -1
- package/src/generation/filtering/core/CellFilterUnaryOperation.js +29 -33
- package/src/generation/filtering/numeric/CellFilterCache.d.ts +1 -0
- package/src/generation/filtering/numeric/CellFilterCache.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.d.ts +3 -2
- package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js +9 -35
- package/src/generation/filtering/numeric/complex/CellFilterCurvature.d.ts +0 -1
- package/src/generation/filtering/numeric/complex/CellFilterCurvature.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterCurvature.js +19 -43
- package/src/generation/filtering/numeric/complex/CellFilterFXAA.d.ts +0 -1
- package/src/generation/filtering/numeric/complex/CellFilterFXAA.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterFXAA.js +2 -6
- package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js +9 -12
- package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js +2 -1
- package/src/generation/filtering/numeric/complex/CellFilterSobel.d.ts +0 -1
- package/src/generation/filtering/numeric/complex/CellFilterSobel.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterSobel.js +2 -6
- package/src/generation/filtering/numeric/math/CellFilterInverseLerp.d.ts +5 -4
- package/src/generation/filtering/numeric/math/CellFilterInverseLerp.d.ts.map +1 -1
- package/src/generation/filtering/numeric/math/CellFilterInverseLerp.js +5 -4
- package/src/generation/filtering/numeric/process/computeFilterSurfaceNormal.d.ts +17 -0
- package/src/generation/filtering/numeric/process/computeFilterSurfaceNormal.d.ts.map +1 -0
- package/src/generation/filtering/numeric/process/computeFilterSurfaceNormal.js +42 -0
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +7 -1
- package/src/generation/filtering/numeric/util/populateSampler2DFromCellFilter.d.ts.map +1 -1
- package/src/generation/filtering/numeric/util/populateSampler2DFromCellFilter.js +7 -10
- package/src/generation/filtering/numeric/util/sampler_from_filter.d.ts.map +1 -1
- package/src/generation/filtering/numeric/util/sampler_from_filter.js +2 -1
- package/src/generation/grid/GridData.d.ts.map +1 -1
- package/src/generation/grid/GridData.js +14 -1
- package/src/generation/grid/actions/ContinuousGridCellAction.d.ts +10 -3
- package/src/generation/grid/actions/ContinuousGridCellAction.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellAction.js +18 -3
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.d.ts +11 -1
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.js +13 -3
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainObstacle.d.ts +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainObstacle.js +2 -2
- package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.d.ts +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionWriteObstacle.js +4 -6
- package/src/generation/grid/coords/grid_to_texel.d.ts +9 -0
- package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -0
- package/src/generation/grid/coords/grid_to_texel.js +10 -0
- package/src/generation/grid/coords/texel_to_grid.d.ts +9 -0
- package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -0
- package/src/generation/grid/coords/texel_to_grid.js +10 -0
- package/src/generation/grid/generation/GridTaskApplyActionToCells.d.ts +2 -2
- package/src/generation/grid/generation/GridTaskApplyActionToCells.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskApplyActionToCells.js +10 -6
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +20 -21
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts +7 -0
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.js +18 -10
- package/src/generation/grid/generation/discrete/GridTaskCellularAutomata.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskCellularAutomata.js +16 -7
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts +5 -3
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +26 -23
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +10 -1
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.d.ts.map +1 -1
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.js +4 -0
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.d.ts +15 -8
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.d.ts.map +1 -1
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +89 -92
- package/src/generation/markers/GridActionRuleSet.d.ts.map +1 -1
- package/src/generation/markers/GridActionRuleSet.js +10 -2
- package/src/generation/markers/GridCellActionPlaceMarker.d.ts +11 -0
- package/src/generation/markers/GridCellActionPlaceMarker.d.ts.map +1 -1
- package/src/generation/markers/GridCellActionPlaceMarker.js +20 -3
- package/src/generation/markers/GridCellActionPlaceMarkerGroup.d.ts +3 -1
- package/src/generation/markers/GridCellActionPlaceMarkerGroup.d.ts.map +1 -1
- package/src/generation/markers/GridCellActionPlaceMarkerGroup.js +9 -2
- package/src/generation/markers/MarkerNode.d.ts +8 -3
- package/src/generation/markers/MarkerNode.d.ts.map +1 -1
- package/src/generation/markers/MarkerNode.js +12 -5
- package/src/generation/markers/actions/MarkerNodeActionEntityPlacement.js +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessor.d.ts +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessor.d.ts.map +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessor.js +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorClingToTerrain.d.ts +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorClingToTerrain.d.ts.map +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorClingToTerrain.js +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts.map +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.js +2 -2
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorSequence.d.ts +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorSequence.d.ts.map +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorSequence.js +2 -2
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js +6 -4
- package/src/generation/markers/actions/probability/MarkerNodeActionWeightedElement.d.ts.map +1 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionWeightedElement.js +1 -3
- package/src/generation/markers/actions/terrain/MarkerNodeActionPaintTerrain.d.ts.map +1 -1
- package/src/generation/markers/actions/terrain/MarkerNodeActionPaintTerrain.js +12 -11
- package/src/generation/markers/matcher/MarkerNodeMatcherAnd.js +2 -2
- package/src/generation/markers/transform/MarkerNodeTransformer.d.ts +4 -1
- package/src/generation/markers/transform/MarkerNodeTransformer.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformer.js +4 -1
- package/src/generation/markers/transform/MarkerNodeTransformerAddPositionYFromFilter.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerAddPositionYFromFilter.js +1 -3
- package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.d.ts +5 -0
- package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.js +15 -0
- package/src/generation/markers/transform/MarkerNodeTransformerRecordProperty.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordProperty.js +1 -3
- package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.js +2 -4
- package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilterGradient.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilterGradient.js +1 -3
- package/src/generation/placement/GridCellPlacementRule.d.ts.map +1 -1
- package/src/generation/placement/GridCellPlacementRule.js +1 -3
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +8 -10
- package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.d.ts.map +1 -1
- package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.js +6 -4
- package/src/generation/placement/action/random/weighted/WeightedGridCellAction.d.ts.map +1 -1
- package/src/generation/placement/action/random/weighted/WeightedGridCellAction.js +1 -3
- package/src/generation/rules/CellMatcher.d.ts +3 -1
- package/src/generation/rules/CellMatcher.d.ts.map +1 -1
- package/src/generation/rules/CellMatcher.js +3 -1
- package/src/generation/rules/CellMatcherFromFilter.d.ts.map +1 -1
- package/src/generation/rules/CellMatcherFromFilter.js +1 -3
- package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
- package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -20
- package/src/generation/test_support/executeTaskTreeSync.d.ts +9 -0
- package/src/generation/test_support/executeTaskTreeSync.d.ts.map +1 -0
- package/src/generation/test_support/executeTaskTreeSync.js +78 -0
- package/src/generation/theme/TerrainLayerRuleAggregator.d.ts +2 -1
- package/src/generation/theme/TerrainLayerRuleAggregator.d.ts.map +1 -1
- package/src/generation/theme/TerrainLayerRuleAggregator.js +9 -6
- package/src/generation/theme/Theme.d.ts +1 -1
- package/src/generation/theme/Theme.d.ts.map +1 -1
- package/src/generation/theme/Theme.js +2 -2
- package/src/generation/theme/ThemeEngine.d.ts +3 -3
- package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
- package/src/generation/theme/ThemeEngine.js +26 -16
- package/src/generation/theme/cell/CellProcessingRule.d.ts +3 -3
- package/src/generation/theme/cell/CellProcessingRule.d.ts.map +1 -1
- package/src/generation/theme/cell/CellProcessingRule.js +6 -10
- package/src/generation/theme/cell/CellProcessingRuleSet.d.ts +1 -1
- package/src/generation/theme/cell/CellProcessingRuleSet.d.ts.map +1 -1
- package/src/generation/theme/cell/CellProcessingRuleSet.js +2 -2
- package/src/view/common/ListView.js +1 -1
- package/src/view/elements/BottomLeftResizeHandleView.d.ts.map +1 -1
- package/src/view/elements/BottomLeftResizeHandleView.js +13 -5
- package/src/core/font/FontAsset.d.ts.map +0 -1
- package/src/core/font/FontAssetLoader.d.ts.map +0 -1
- package/src/core/geom/3d/shape/util/shape_to_visual_entity.d.ts.map +0 -1
- package/src/core/geom/3d/tetrahedra/visualize_tetrahedral_mesh.d.ts.map +0 -1
- package/src/core/process/action/AsynchronousDelayAction.d.ts.map +0 -1
- package/src/engine/physics/computeInterceptPoint.d.ts.map +0 -1
- package/src/engine/physics/fluid/solver/optimal_sor_omega.d.ts.map +0 -1
- package/src/engine/physics/gjk/gjk.d.ts.map +0 -1
- package/src/engine/physics/gjk/gjk_epa_penetration.d.ts.map +0 -1
- package/src/engine/physics/gjk/minkowski_support.d.ts.map +0 -1
- package/src/engine/physics/gjk/mpr.d.ts.map +0 -1
- package/src/engine/physics/integration/quat_integrate.d.ts.map +0 -1
- package/src/engine/physics/island/union_find.d.ts.map +0 -1
- package/src/engine/physics/narrowphase/clip_against_axis_uv.d.ts.map +0 -1
- package/src/engine/physics/narrowphase/decomposition/aabb_world_to_local.d.ts.map +0 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskDistanceToMarkers.d.ts +0 -21
- package/src/generation/grid/generation/discrete/layer/GridTaskDistanceToMarkers.d.ts.map +0 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskDistanceToMarkers.js +0 -68
- package/src/generation/grid/generation/grid/GridTaskGridAlignedNodeGenerator.d.ts +0 -10
- package/src/generation/grid/generation/grid/GridTaskGridAlignedNodeGenerator.d.ts.map +0 -1
- package/src/generation/grid/generation/grid/GridTaskGridAlignedNodeGenerator.js +0 -17
- /package/src/{engine/physics → core/geom/3d}/gjk/NOTES.md +0 -0
- /package/src/{engine/physics → core/geom/3d}/gjk/gjk.d.ts +0 -0
- /package/src/{engine/physics → core/math/physics/kinematics}/computeInterceptPoint.d.ts +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { clamp } from "../../../../core/math/clamp.js";
|
|
2
|
+
import { lerp } from "../../../../core/math/lerp.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Trilinearly sample THREE single-channel 3D grids at the same fractional
|
|
6
|
+
* position, sharing one set of corner indices and interpolation weights.
|
|
7
|
+
*
|
|
8
|
+
* Identical result to calling {@link scs3d_sample_linear} once per channel —
|
|
9
|
+
* but the index/weight computation (the majority of the scalar sampler's work)
|
|
10
|
+
* is done once instead of three times. The fluid advection kernels sample
|
|
11
|
+
* velocity_x/y/z at a common back-traced point per cell, which makes this the
|
|
12
|
+
* hot sampling path.
|
|
13
|
+
*
|
|
14
|
+
* Positions outside the grid are clamped to the edge, channel-independently
|
|
15
|
+
* identical to the scalar sampler.
|
|
16
|
+
*
|
|
17
|
+
* @param {Float32Array|number[]} out length-3 destination, one value per channel
|
|
18
|
+
* @param {Float32Array} data_0
|
|
19
|
+
* @param {Float32Array} data_1
|
|
20
|
+
* @param {Float32Array} data_2
|
|
21
|
+
* @param {number} res_x
|
|
22
|
+
* @param {number} res_y
|
|
23
|
+
* @param {number} res_z
|
|
24
|
+
* @param {number} x
|
|
25
|
+
* @param {number} y
|
|
26
|
+
* @param {number} z
|
|
27
|
+
* @return {Float32Array|number[]} `out`, for chaining.
|
|
28
|
+
*/
|
|
29
|
+
export function scs3d_sample_linear3(out, data_0, data_1, data_2, res_x, res_y, res_z, x, y, z) {
|
|
30
|
+
const x_max = res_x - 1;
|
|
31
|
+
const y_max = res_y - 1;
|
|
32
|
+
const z_max = res_z - 1;
|
|
33
|
+
|
|
34
|
+
const x_clamped = clamp(x, 0, x_max);
|
|
35
|
+
const y_clamped = clamp(y, 0, y_max);
|
|
36
|
+
const z_clamped = clamp(z, 0, z_max);
|
|
37
|
+
|
|
38
|
+
const x0 = x_clamped | 0;
|
|
39
|
+
const y0 = y_clamped | 0;
|
|
40
|
+
const z0 = z_clamped | 0;
|
|
41
|
+
|
|
42
|
+
const f_x = x_clamped - x0;
|
|
43
|
+
const f_y = y_clamped - y0;
|
|
44
|
+
const f_z = z_clamped - z0;
|
|
45
|
+
|
|
46
|
+
const x1 = x_clamped === x0 ? x0 : x0 + 1;
|
|
47
|
+
const y1 = y_clamped === y0 ? y0 : y0 + 1;
|
|
48
|
+
const z1 = z_clamped === z0 ? z0 : z0 + 1;
|
|
49
|
+
|
|
50
|
+
const slice = res_x * res_y;
|
|
51
|
+
const z0_offset = z0 * slice;
|
|
52
|
+
const z1_offset = z1 * slice;
|
|
53
|
+
const y0_offset = y0 * res_x;
|
|
54
|
+
const y1_offset = y1 * res_x;
|
|
55
|
+
|
|
56
|
+
const c000 = z0_offset + y0_offset + x0;
|
|
57
|
+
const c100 = z0_offset + y0_offset + x1;
|
|
58
|
+
const c010 = z0_offset + y1_offset + x0;
|
|
59
|
+
const c110 = z0_offset + y1_offset + x1;
|
|
60
|
+
const c001 = z1_offset + y0_offset + x0;
|
|
61
|
+
const c101 = z1_offset + y0_offset + x1;
|
|
62
|
+
const c011 = z1_offset + y1_offset + x0;
|
|
63
|
+
const c111 = z1_offset + y1_offset + x1;
|
|
64
|
+
|
|
65
|
+
out[0] = lerp(
|
|
66
|
+
lerp(lerp(data_0[c000], data_0[c100], f_x), lerp(data_0[c010], data_0[c110], f_x), f_y),
|
|
67
|
+
lerp(lerp(data_0[c001], data_0[c101], f_x), lerp(data_0[c011], data_0[c111], f_x), f_y),
|
|
68
|
+
f_z
|
|
69
|
+
);
|
|
70
|
+
out[1] = lerp(
|
|
71
|
+
lerp(lerp(data_1[c000], data_1[c100], f_x), lerp(data_1[c010], data_1[c110], f_x), f_y),
|
|
72
|
+
lerp(lerp(data_1[c001], data_1[c101], f_x), lerp(data_1[c011], data_1[c111], f_x), f_y),
|
|
73
|
+
f_z
|
|
74
|
+
);
|
|
75
|
+
out[2] = lerp(
|
|
76
|
+
lerp(lerp(data_2[c000], data_2[c100], f_x), lerp(data_2[c010], data_2[c110], f_x), f_y),
|
|
77
|
+
lerp(lerp(data_2[c001], data_2[c101], f_x), lerp(data_2[c011], data_2[c111], f_x), f_y),
|
|
78
|
+
f_z
|
|
79
|
+
);
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Guards against cases where ImageBitmap doesn't exist
|
|
3
|
-
* @param {*} image
|
|
4
|
-
* @return {boolean}
|
|
5
|
-
*/
|
|
6
|
-
export function isImageBitmap(image: any): boolean;
|
|
1
|
+
export { isImageBitmap } from "../../../core/dom/isImageBitmap.js";
|
|
7
2
|
//# sourceMappingURL=isImageBitmap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isImageBitmap.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/isImageBitmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isImageBitmap.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/texture/isImageBitmap.js"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @param {*} image
|
|
4
|
-
* @return {boolean}
|
|
5
|
-
*/
|
|
6
|
-
export function isImageBitmap(image) {
|
|
7
|
-
/**
|
|
8
|
-
* check that browser/environment has the class at all to avoid potential exceptions
|
|
9
|
-
* Required for Safari below version 15.6
|
|
10
|
-
*/
|
|
11
|
-
return typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap;
|
|
12
|
-
}
|
|
1
|
+
// Re-export for path compatibility; implementation lives in core/dom/isImageBitmap.js
|
|
2
|
+
export { isImageBitmap } from "../../../core/dom/isImageBitmap.js";
|
package/src/{core/process/action → engine/intelligence/behavior/util}/AsynchronousDelayAction.d.ts
RENAMED
|
@@ -10,6 +10,6 @@ export class AsynchronousDelayAction extends AsynchronousAction {
|
|
|
10
10
|
__entity: Entity;
|
|
11
11
|
cancel(): Promise<void>;
|
|
12
12
|
}
|
|
13
|
-
import { AsynchronousAction } from "
|
|
14
|
-
import Entity from "../../../
|
|
13
|
+
import { AsynchronousAction } from "../../../../core/process/action/AsynchronousAction.js";
|
|
14
|
+
import Entity from "../../../ecs/Entity.js";
|
|
15
15
|
//# sourceMappingURL=AsynchronousDelayAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsynchronousDelayAction.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/util/AsynchronousDelayAction.js"],"names":[],"mappings":"AAUA;IAEI;;;;OAIG;IACH,+CAFW,MAAM,EAqBhB;IAdG,8BAAgB;IAChB,eAAkB;IAElB,iBAA4B;IAahC,wBASC;CAOJ;mCArDkC,uDAAuD;mBAEvE,wBAAwB"}
|
package/src/{core/process/action → engine/intelligence/behavior/util}/AsynchronousDelayAction.js
RENAMED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export class AsynchronousDelayAction extends AsynchronousAction {
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param {EntityComponentDataset} ecd
|
|
16
|
-
* @param {number} time in seconds
|
|
17
|
-
*/
|
|
18
|
-
constructor(ecd, time) {
|
|
19
|
-
super();
|
|
20
|
-
|
|
21
|
-
assert.isNumber(time, 'time');
|
|
22
|
-
|
|
23
|
-
this.__ecd = ecd;
|
|
24
|
-
this.__time = time;
|
|
25
|
-
|
|
26
|
-
this.__entity = new Entity();
|
|
27
|
-
|
|
28
|
-
this.__entity.add(BehaviorComponent.from(
|
|
29
|
-
SequenceBehavior.from([
|
|
30
|
-
DelayBehavior.from(time),
|
|
31
|
-
new ActionBehavior(() => {
|
|
32
|
-
this.__succeed();
|
|
33
|
-
}),
|
|
34
|
-
DieBehavior.create()
|
|
35
|
-
])
|
|
36
|
-
));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
cancel() {
|
|
40
|
-
if (this.status === TaskState.RUNNING) {
|
|
41
|
-
this.__entity.destroy();
|
|
42
|
-
// transition state and notify listeners, mirroring AsynchronousActionSequence.cancel
|
|
43
|
-
this.status = TaskState.CANCELLED;
|
|
44
|
-
this.on.cancelled.send0();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return Promise.resolve();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
start() {
|
|
51
|
-
super.start();
|
|
52
|
-
|
|
53
|
-
this.__entity.build(this.__ecd);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { AsynchronousAction } from "../../../../core/process/action/AsynchronousAction.js";
|
|
3
|
+
import TaskState from "../../../../core/process/task/TaskState.js";
|
|
4
|
+
import Entity from "../../../ecs/Entity.js";
|
|
5
|
+
import { SequenceBehavior } from "../composite/SequenceBehavior.js";
|
|
6
|
+
import { BehaviorComponent } from "../ecs/BehaviorComponent.js";
|
|
7
|
+
import { DieBehavior } from "../ecs/DieBehavior.js";
|
|
8
|
+
import { ActionBehavior } from "../primitive/ActionBehavior.js";
|
|
9
|
+
import { DelayBehavior } from "./DelayBehavior.js";
|
|
10
|
+
|
|
11
|
+
export class AsynchronousDelayAction extends AsynchronousAction {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {EntityComponentDataset} ecd
|
|
16
|
+
* @param {number} time in seconds
|
|
17
|
+
*/
|
|
18
|
+
constructor(ecd, time) {
|
|
19
|
+
super();
|
|
20
|
+
|
|
21
|
+
assert.isNumber(time, 'time');
|
|
22
|
+
|
|
23
|
+
this.__ecd = ecd;
|
|
24
|
+
this.__time = time;
|
|
25
|
+
|
|
26
|
+
this.__entity = new Entity();
|
|
27
|
+
|
|
28
|
+
this.__entity.add(BehaviorComponent.from(
|
|
29
|
+
SequenceBehavior.from([
|
|
30
|
+
DelayBehavior.from(time),
|
|
31
|
+
new ActionBehavior(() => {
|
|
32
|
+
this.__succeed();
|
|
33
|
+
}),
|
|
34
|
+
DieBehavior.create()
|
|
35
|
+
])
|
|
36
|
+
));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
cancel() {
|
|
40
|
+
if (this.status === TaskState.RUNNING) {
|
|
41
|
+
this.__entity.destroy();
|
|
42
|
+
// transition state and notify listeners, mirroring AsynchronousActionSequence.cancel
|
|
43
|
+
this.status = TaskState.CANCELLED;
|
|
44
|
+
this.on.cancelled.send0();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return Promise.resolve();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
start() {
|
|
51
|
+
super.start();
|
|
52
|
+
|
|
53
|
+
this.__entity.build(this.__ecd);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -94,6 +94,9 @@ export class NetworkSession {
|
|
|
94
94
|
* - `simulation_delay_ticks` is honored only under `role: 'host'`.
|
|
95
95
|
* Default 4. See {@link ServerAuthoritativeServer}.
|
|
96
96
|
* - `tick_rate_hz` defaults to 60.
|
|
97
|
+
* - `frame_capacity` sizes the action-log ring (rollback depth + back-fill
|
|
98
|
+
* range + retransmit window — see {@link DEFAULT_ACTION_LOG_FRAME_CAPACITY}).
|
|
99
|
+
* Default 32. Raise it for high-RTT / lossy links.
|
|
97
100
|
* - `scope_filter` defaults to {@link OwnerAwareScope} on the host.
|
|
98
101
|
* - `server_resume_grace_ms` (host role): how long peer state is
|
|
99
102
|
* retained after a transport drop before being freed. Default 30s.
|
|
@@ -101,7 +104,7 @@ export class NetworkSession {
|
|
|
101
104
|
* {@link DEFAULT_RECONNECT_POLICY}. Set `enabled: false` to opt
|
|
102
105
|
* out entirely.
|
|
103
106
|
*/
|
|
104
|
-
constructor({ entity_manager, transport, transport_factory, role, local_peer_id, simulation_delay_ticks, tick_rate_hz, binary_registry, scope_filter, time_dilation, adaptive_render_delay, server_resume_grace_ms, reconnect, }?: {
|
|
107
|
+
constructor({ entity_manager, transport, transport_factory, role, local_peer_id, simulation_delay_ticks, tick_rate_hz, frame_capacity, binary_registry, scope_filter, time_dilation, adaptive_render_delay, server_resume_grace_ms, reconnect, }?: {
|
|
105
108
|
entity_manager: EntityManager;
|
|
106
109
|
transport?: object;
|
|
107
110
|
transport_factory?: (() => object);
|
|
@@ -205,6 +208,14 @@ export class NetworkSession {
|
|
|
205
208
|
* @type {number}
|
|
206
209
|
*/
|
|
207
210
|
readonly simulation_delay_ticks: number;
|
|
211
|
+
/**
|
|
212
|
+
* Depth of the action-log ring passed to the orchestrator. Bounds
|
|
213
|
+
* rollback depth, back-fill range, and retransmit window — see
|
|
214
|
+
* {@link DEFAULT_ACTION_LOG_FRAME_CAPACITY}.
|
|
215
|
+
* @readonly
|
|
216
|
+
* @type {number}
|
|
217
|
+
*/
|
|
218
|
+
readonly frame_capacity: number;
|
|
208
219
|
/**
|
|
209
220
|
* @readonly
|
|
210
221
|
* @type {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkSession.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/NetworkSession.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;iCAqCoB,MAAM;AAhB1B;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;
|
|
1
|
+
{"version":3,"file":"NetworkSession.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/NetworkSession.js"],"names":[],"mappings":"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"}
|
|
@@ -45,6 +45,25 @@ export const NetworkSessionRole = Object.freeze({
|
|
|
45
45
|
const DEFAULT_TICK_RATE_HZ = 60;
|
|
46
46
|
const DEFAULT_SIMULATION_DELAY_TICKS = 4;
|
|
47
47
|
const DEFAULT_INITIAL_RENDER_DELAY_FRAMES = 6;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Default depth of the action-log ring (in frames). This single value bounds
|
|
51
|
+
* THREE distinct horizons at once:
|
|
52
|
+
* 1. Rollback depth — how far back the server can rewind+replay to fold in
|
|
53
|
+
* late client input.
|
|
54
|
+
* 2. Fresh-connect back-fill range — how many past frames a newly-connected
|
|
55
|
+
* peer's action stream covers before it has acked anything.
|
|
56
|
+
* 3. Action-stream retransmit window — how long an unacked frame stays
|
|
57
|
+
* resendable before it ages out of the ring.
|
|
58
|
+
*
|
|
59
|
+
* At 60 Hz, 32 frames ≈ 0.53 s. That is comfortable for rollback but tight for
|
|
60
|
+
* loss recovery on high-latency links: if a peer's ack RTT + jitter exceeds the
|
|
61
|
+
* window, unacked frames age out and the action stream develops gaps that fall
|
|
62
|
+
* back to the heavier RECOVERY_REQUEST → STATE_BURST path. Raise `frame_capacity`
|
|
63
|
+
* for high-RTT / lossy deployments (memory cost is ~one buffer per frame per
|
|
64
|
+
* orchestrator, so it is cheap to grow).
|
|
65
|
+
*/
|
|
66
|
+
const DEFAULT_ACTION_LOG_FRAME_CAPACITY = 32;
|
|
48
67
|
const PULL_PER_MS = 0.0005; // wall-clock low-pass on render frame state machine
|
|
49
68
|
const MAX_CLIENT_DILATED_TICKS_PER_STEP = 3;
|
|
50
69
|
const MAX_FIXED_STEPS_PER_TICK = 8;
|
|
@@ -79,6 +98,13 @@ const ReconnectState = Object.freeze({
|
|
|
79
98
|
*/
|
|
80
99
|
const SCRATCH_BUFFER_BYTES = 1024;
|
|
81
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Shared zero-length payload for empty ack packets. Hoisted to module scope so
|
|
103
|
+
* the per-peer, per-tick ack send doesn't allocate a fresh array each time.
|
|
104
|
+
* @type {Uint8Array}
|
|
105
|
+
*/
|
|
106
|
+
const EMPTY_PAYLOAD = new Uint8Array(0);
|
|
107
|
+
|
|
82
108
|
/**
|
|
83
109
|
* High-level networking facade. Wraps the orchestrator + state machinery
|
|
84
110
|
* into one config + lifecycle surface. The lower-level orchestrators
|
|
@@ -358,6 +384,9 @@ export class NetworkSession {
|
|
|
358
384
|
* - `simulation_delay_ticks` is honored only under `role: 'host'`.
|
|
359
385
|
* Default 4. See {@link ServerAuthoritativeServer}.
|
|
360
386
|
* - `tick_rate_hz` defaults to 60.
|
|
387
|
+
* - `frame_capacity` sizes the action-log ring (rollback depth + back-fill
|
|
388
|
+
* range + retransmit window — see {@link DEFAULT_ACTION_LOG_FRAME_CAPACITY}).
|
|
389
|
+
* Default 32. Raise it for high-RTT / lossy links.
|
|
361
390
|
* - `scope_filter` defaults to {@link OwnerAwareScope} on the host.
|
|
362
391
|
* - `server_resume_grace_ms` (host role): how long peer state is
|
|
363
392
|
* retained after a transport drop before being freed. Default 30s.
|
|
@@ -373,6 +402,7 @@ export class NetworkSession {
|
|
|
373
402
|
local_peer_id = -1,
|
|
374
403
|
simulation_delay_ticks = DEFAULT_SIMULATION_DELAY_TICKS,
|
|
375
404
|
tick_rate_hz = DEFAULT_TICK_RATE_HZ,
|
|
405
|
+
frame_capacity = DEFAULT_ACTION_LOG_FRAME_CAPACITY,
|
|
376
406
|
binary_registry = null,
|
|
377
407
|
scope_filter = null,
|
|
378
408
|
time_dilation = null,
|
|
@@ -388,6 +418,7 @@ export class NetworkSession {
|
|
|
388
418
|
assert.isNumber(tick_rate_hz, 'tick_rate_hz');
|
|
389
419
|
assert.ok(tick_rate_hz > 0, 'tick_rate_hz must be positive');
|
|
390
420
|
assert.isNonNegativeInteger(simulation_delay_ticks, 'simulation_delay_ticks');
|
|
421
|
+
assert.isPositiveInteger(frame_capacity, 'frame_capacity');
|
|
391
422
|
|
|
392
423
|
/**
|
|
393
424
|
* @readonly
|
|
@@ -421,6 +452,15 @@ export class NetworkSession {
|
|
|
421
452
|
? simulation_delay_ticks
|
|
422
453
|
: 0;
|
|
423
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Depth of the action-log ring passed to the orchestrator. Bounds
|
|
457
|
+
* rollback depth, back-fill range, and retransmit window — see
|
|
458
|
+
* {@link DEFAULT_ACTION_LOG_FRAME_CAPACITY}.
|
|
459
|
+
* @readonly
|
|
460
|
+
* @type {number}
|
|
461
|
+
*/
|
|
462
|
+
this.frame_capacity = frame_capacity;
|
|
463
|
+
|
|
424
464
|
/**
|
|
425
465
|
* @readonly
|
|
426
466
|
* @type {number}
|
|
@@ -631,6 +671,7 @@ export class NetworkSession {
|
|
|
631
671
|
binary_registry: this.binary_registry,
|
|
632
672
|
replicated_components,
|
|
633
673
|
action_classes,
|
|
674
|
+
frame_capacity: this.frame_capacity,
|
|
634
675
|
};
|
|
635
676
|
|
|
636
677
|
if (this.role === NetworkSessionRole.Host) {
|
|
@@ -867,6 +908,9 @@ export class NetworkSession {
|
|
|
867
908
|
this.#peer.disconnect_peer(peer_id);
|
|
868
909
|
} catch (_) { /* swallow */
|
|
869
910
|
}
|
|
911
|
+
// Drop the peer from the live send set so the (still-running) tick loop
|
|
912
|
+
// doesn't try to push empty-ack packets through the disposed channel.
|
|
913
|
+
this.#connected_peers.delete(peer_id);
|
|
870
914
|
if (this.#current_transport_listener !== null && this.#current_transport !== null) {
|
|
871
915
|
try {
|
|
872
916
|
this.#current_transport.onDisconnect.remove(this.#current_transport_listener);
|
|
@@ -1242,7 +1286,7 @@ export class NetworkSession {
|
|
|
1242
1286
|
*/
|
|
1243
1287
|
#send_empty_ack_packet() {
|
|
1244
1288
|
for (const peer_id of this.#connected_peers) {
|
|
1245
|
-
this.#peer.channel_for(peer_id).send(
|
|
1289
|
+
this.#peer.channel_for(peer_id).send(EMPTY_PAYLOAD, 0);
|
|
1246
1290
|
}
|
|
1247
1291
|
}
|
|
1248
1292
|
|
|
@@ -1559,6 +1603,13 @@ export class NetworkSession {
|
|
|
1559
1603
|
this.#peer.disconnect_peer(this.#remote_peer_id);
|
|
1560
1604
|
} catch (_) { /* swallow */
|
|
1561
1605
|
}
|
|
1606
|
+
// Stop treating this peer as a live send target. The channel is
|
|
1607
|
+
// gone, but `#remote_peer_id` is deliberately kept so the reconnect
|
|
1608
|
+
// ladder can re-`connect()` to the same id. Without this delete,
|
|
1609
|
+
// `#send_empty_ack_packet` (driven every tick) dereferences the
|
|
1610
|
+
// now-undefined channel and throws — which would crash the very
|
|
1611
|
+
// tick loop that drives the reconnect ladder.
|
|
1612
|
+
this.#connected_peers.delete(this.#remote_peer_id);
|
|
1562
1613
|
}
|
|
1563
1614
|
this.#current_transport = null;
|
|
1564
1615
|
this.#current_transport_listener = null;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# `engine/network` — netcode package
|
|
2
|
+
|
|
3
|
+
Action-log replication, client-side prediction + reconciliation, and a
|
|
4
|
+
server-authoritative rollback orchestrator, layered over a pluggable transport.
|
|
5
|
+
|
|
6
|
+
## Layers (bottom → top)
|
|
7
|
+
|
|
8
|
+
| Layer | Pieces | Responsibility |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| Transport | `transport/adapters/*` (`WebRTCDataChannel`, `WebTransport`, `WebSocket`, `NodeUDP`, `Simulated`, `Loopback`) | Move opaque byte buffers. UDP-style unless `reliable`/`ordered` say otherwise. |
|
|
11
|
+
| Channel | `transport/Channel.js` | Seq + ack-bitfield header; surfaces `onPacketAcked` / `onPacketLost` / `onPayload`. No retransmit. |
|
|
12
|
+
| Reliability / fragmentation | `transport/ReliableCommandPipeline.js`, `transport/fragments/*` | At-least-once commands; MTU fragmentation + NACK retransmit. |
|
|
13
|
+
| Sim core | `sim/*` (`ActionLog`, `SimAction`, `SimActionExecutor`, `RewindEngine`, `Snapshotter`, registries) | Record/apply/rewind replicated state mutations. |
|
|
14
|
+
| Replication | `replication/Replicator.js`, `replication/ScopeFilter.js` | Pack/unpack action records per peer, scope-filtered. |
|
|
15
|
+
| Orchestrator | `orchestrator/NetworkPeer.js`, `orchestrator/ServerAuthoritative{Server,Client}.js` | Per-tick send/recv, rollback (server), predict-reconcile (client). |
|
|
16
|
+
| Facade | `NetworkSession.js` | One config + lifecycle surface; wires everything below. |
|
|
17
|
+
|
|
18
|
+
## Wired automatically by `NetworkSession`
|
|
19
|
+
|
|
20
|
+
`NetworkPeer` (and through it `Channel`, `Replicator`, `ActionLog`,
|
|
21
|
+
`SimActionExecutor`, the registries, `ReplicationSlotTable`, `Baseline`,
|
|
22
|
+
the fragment layer, and `ReliableCommandPipeline`), the two orchestrators
|
|
23
|
+
(and through them `RewindEngine` and `InputRing`), plus `TimeDilation`,
|
|
24
|
+
`AdaptiveRenderDelay`, `InterpolationLog`, `NetworkSystem`, `NetworkIdentity`,
|
|
25
|
+
and `Snapshotter`. `ChangedEntitySet` / `MutationLedger` are wired on the host
|
|
26
|
+
when a mutation ledger is supplied.
|
|
27
|
+
|
|
28
|
+
## Opt-in primitives — NOT wired by `NetworkSession`
|
|
29
|
+
|
|
30
|
+
These are tested, public library surface intended for game code to wire up
|
|
31
|
+
directly; the facade does not use them. They are deliberate exports, not dead
|
|
32
|
+
code — fix bugs in them, don't delete them.
|
|
33
|
+
|
|
34
|
+
| Primitive | What it's for | To use it |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `time/TimeSync.js` | NTP-style clock-offset estimation | Drive it from a ping/pong round-trip; read `offset()` / `best_rtt()`. |
|
|
37
|
+
| `time/JitterBuffer.js` | Frame-tagged reorder/hold buffer | `push(frame, payload)`; `drain_until(current_frame, cb)`. |
|
|
38
|
+
| `sim/SmoothingState.js` | Hide the post-reconcile correction snap | After reconcile, feed the pre/post pose; add the decaying error in your render path. |
|
|
39
|
+
| `state/PriorityAccumulator.js` | Bandwidth-aware action scheduling | Consult `sorted_descending()` when an outgoing packet approaches MTU. |
|
|
40
|
+
| `diagnostics/BandwidthMeter.js` | Throughput accounting | Sample around `transport.getStats()`. |
|
|
41
|
+
| `diagnostics/ReplayLog.js` | Record/replay packet streams | Capture inbound/outbound for offline repro. |
|
|
42
|
+
| `diagnostics/SyncTest.js` | Determinism / desync checking | Compare state hashes across peers. |
|
|
43
|
+
| `adapters/Quaternion`/`Vector3InterpolationAdapter.js` | Interp building blocks | Reference when writing a component interpolation adapter (cf. `TransformInterpolationAdapter`). |
|
|
44
|
+
|
|
45
|
+
If you wire one of these into the facade, move its row up to the section above.
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Given a path, which may be a local path, produce a fully qualified URL
|
|
3
|
-
* @example '/path' -> 'http://example.com/path'
|
|
4
|
-
* @example 'some/local/path' -> 'http://example.com/current_path/some/local/path'
|
|
5
|
-
* @param {string} path
|
|
6
|
-
* @return {string}
|
|
7
|
-
*/
|
|
8
|
-
export function convertPathToURL(path: string): string;
|
|
1
|
+
export { convertPathToURL } from "../../core/path/convertPathToURL.js";
|
|
9
2
|
//# sourceMappingURL=convertPathToURL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertPathToURL.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/convertPathToURL.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convertPathToURL.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/convertPathToURL.js"],"names":[],"mappings":""}
|
|
@@ -1,107 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const rx_url_schema = /[a-zA-Z0-9_\-]+\:\/\//;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param {string} path
|
|
8
|
-
* @return {boolean}
|
|
9
|
-
*/
|
|
10
|
-
function isGlobalPath(path) {
|
|
11
|
-
//search for URL schema at the start of the path
|
|
12
|
-
return path.search(rx_url_schema) === 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// *** Environment setup code ***
|
|
16
|
-
const ENVIRONMENT_IS_WEB = typeof window === 'object';
|
|
17
|
-
const ENVIRONMENT_IS_NODE = typeof process === 'object' && !ENVIRONMENT_IS_WEB;
|
|
18
|
-
const ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
|
|
19
|
-
const ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param {string} path
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
function localPathToGlobal(path) {
|
|
27
|
-
/**
|
|
28
|
-
* @type {Window|DedicatedWorkerGlobalScope}
|
|
29
|
-
*/
|
|
30
|
-
let scope;
|
|
31
|
-
|
|
32
|
-
if (ENVIRONMENT_IS_WEB) {
|
|
33
|
-
scope = window;
|
|
34
|
-
} else if (ENVIRONMENT_IS_WORKER) {
|
|
35
|
-
scope = self;
|
|
36
|
-
} else if (ENVIRONMENT_IS_NODE) {
|
|
37
|
-
|
|
38
|
-
let normalized_path = `${process.cwd()}/`.replace(/\\/g, '/');
|
|
39
|
-
|
|
40
|
-
// remove multiple sequential slashes
|
|
41
|
-
normalized_path = normalized_path.replace(/\/+/g, '/');
|
|
42
|
-
|
|
43
|
-
if (normalized_path[0] !== '/') {
|
|
44
|
-
// Windows drive letter must be prefixed with a slash.
|
|
45
|
-
normalized_path = `/${normalized_path}`;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
scope = {
|
|
49
|
-
location: {
|
|
50
|
-
pathname: normalized_path,
|
|
51
|
-
host: '',
|
|
52
|
-
protocol: 'file:'
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
} else {
|
|
56
|
-
throw new Error('Unknown environment');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const location = scope.location;
|
|
60
|
-
const pathname = location.pathname;
|
|
61
|
-
|
|
62
|
-
let directoryPath;
|
|
63
|
-
|
|
64
|
-
/*
|
|
65
|
-
path name contains file name also, there are two options here, "a/b" or "a/b/" second is a directory
|
|
66
|
-
we need to extract directory to load relative path
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
if (pathname.endsWith('/')) {
|
|
70
|
-
//path is to a directory, strip last slash
|
|
71
|
-
directoryPath = pathname.substring(0, pathname.length - 1);
|
|
72
|
-
} else {
|
|
73
|
-
//path is to a file
|
|
74
|
-
const i = pathname.lastIndexOf('/');
|
|
75
|
-
|
|
76
|
-
if (i === -1) {
|
|
77
|
-
//root level file
|
|
78
|
-
directoryPath = ""
|
|
79
|
-
} else {
|
|
80
|
-
directoryPath = pathname.substring(0, i);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const urlBase = location.protocol + "//" + location.host + directoryPath + "/";
|
|
85
|
-
return urlBase + path;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Given a path, which may be a local path, produce a fully qualified URL
|
|
90
|
-
* @example '/path' -> 'http://example.com/path'
|
|
91
|
-
* @example 'some/local/path' -> 'http://example.com/current_path/some/local/path'
|
|
92
|
-
* @param {string} path
|
|
93
|
-
* @return {string}
|
|
94
|
-
*/
|
|
95
|
-
export function convertPathToURL(path) {
|
|
96
|
-
assert.isString(path, 'path');
|
|
97
|
-
|
|
98
|
-
const is_global = isGlobalPath(path);
|
|
99
|
-
|
|
100
|
-
let result = path;
|
|
101
|
-
|
|
102
|
-
if (!is_global) {
|
|
103
|
-
result = localPathToGlobal(path);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
1
|
+
// Re-export for path compatibility; implementation lives in core/path/convertPathToURL.js
|
|
2
|
+
export { convertPathToURL } from "../../core/path/convertPathToURL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantize_float.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/network/core/quantize/quantize_float.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quantize_float.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/network/core/quantize/quantize_float.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;GAcG;AACH,sCANW,MAAM,OACN,MAAM,OACN,MAAM,QACN,MAAM,GACJ,MAAM,CAWlB;AAED;;;;;;;;;GASG;AACH,4CANW,MAAM,OACN,MAAM,OACN,MAAM,QACN,MAAM,GACJ,MAAM,CAMlB;AAED;;;;;;;;;;GAUG;AACH,sDANW,MAAM,OACN,MAAM,OACN,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Uniform float quantization to an N-bit unsigned integer.
|
|
3
5
|
*
|
|
@@ -29,6 +31,10 @@
|
|
|
29
31
|
* @returns {number} unsigned integer in [0, 2^bits - 1]
|
|
30
32
|
*/
|
|
31
33
|
export function quantize_float(value, min, max, bits) {
|
|
34
|
+
// `1 << bits` overflows into the sign bit at bits >= 31, silently producing
|
|
35
|
+
// a negative max_int and garbage output. Guard the documented 1..30 range.
|
|
36
|
+
// Asserts are stripped in production, so this costs nothing on the hot path.
|
|
37
|
+
assert.ok(bits >= 1 && bits <= 30, `quantize_float: bits must be in [1, 30], got ${bits}`);
|
|
32
38
|
const max_int = (1 << bits) - 1;
|
|
33
39
|
const normalized = (value - min) / (max - min);
|
|
34
40
|
const clamped = normalized < 0 ? 0 : (normalized > 1 ? 1 : normalized);
|
|
@@ -46,6 +52,7 @@ export function quantize_float(value, min, max, bits) {
|
|
|
46
52
|
* @returns {number}
|
|
47
53
|
*/
|
|
48
54
|
export function dequantize_float(quantized, min, max, bits) {
|
|
55
|
+
assert.ok(bits >= 1 && bits <= 30, `dequantize_float: bits must be in [1, 30], got ${bits}`);
|
|
49
56
|
const max_int = (1 << bits) - 1;
|
|
50
57
|
return min + (quantized / max_int) * (max - min);
|
|
51
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantize_position.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/network/core/quantize/quantize_position.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,yCALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,+CALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;GAOG;AACH,0CAJW,MAAM,mBACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"quantize_position.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/network/core/quantize/quantize_position.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,yCALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,+CALW,MAAM,SACN,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;GAOG;AACH,0CAJW,MAAM,mBACN,MAAM,GACJ,MAAM,CAelB"}
|
|
@@ -50,5 +50,16 @@ export function dequantize_position(quantized, range, bits) {
|
|
|
50
50
|
* @returns {number}
|
|
51
51
|
*/
|
|
52
52
|
export function position_bit_count(range, quanta_per_unit) {
|
|
53
|
-
|
|
53
|
+
const bits = Math.ceil(Math.log2(2 * range * quanta_per_unit));
|
|
54
|
+
// quantize_float uses `1 << bits`, which overflows the sign bit at >= 31.
|
|
55
|
+
// A real throw (not an assert) so an over-large range/precision combo fails
|
|
56
|
+
// loudly at setup in production too, rather than silently corrupting every
|
|
57
|
+
// quantized position. This is setup-time, not a hot path.
|
|
58
|
+
if (bits > 30) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`position_bit_count: range=${range} × quanta_per_unit=${quanta_per_unit} needs ${bits} bits, ` +
|
|
61
|
+
`exceeding the 30-bit limit of the quantizer; reduce range or precision, or split across components`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return bits;
|
|
54
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkPeer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/orchestrator/NetworkPeer.js"],"names":[],"mappings":";;;;;gCAiCU,MAAM;;;;;;;;;;;;;;;;;;;iCAoGI,MAAM;AAF1B;;;GAGG;AACH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IAWI;;;;;;;;;;;;OAYG;IACH;;;+BAT4B,UAAU;wBACjB,UAAU;;wCACmB,MAAM,cAAc,MAAM,GAAG,OAAO;;yBAChE,MAAM;8BACD,MAAM;0BACV,cAAc,GAAC,IAAI;+BACd,MAAM;OA8NjC;IA3MG,qCAAqC;IACrC,8BAAkB;IAElB,0CAA0C;IAC1C,oBADW,2BAA2B,CACoC;IAK1E,gCAAgC;IAChC,iBADW,iBAAiB,CACkB;IAK9C,mCAAmC;IACnC,YADW,oBAAoB,CACa;IAE5C,wBAAwB;IACxB,YADW,SAAS,CACoD;IAExE;;;;;;;;OAQG;IACH,iBAFU,cAAc,GAAC,IAAI,CAES;IAatC,gCAAgC;IAChC,UADW,iBAAiB,CAQ1B;IAEF,yBAAyB;IACzB,YADW,UAAU,CAOnB;IAEF,uBAAuB;IACvB,UADW,QAAQ,CACW;IA8C9B;;;;;;OAMG;IACH,mBAFU,MAAM,CAEqB;IAErC;;;;;;;;OAQG;IACH,cAFU,MAAM,CAEgB;IAEhC;;;;;;;;OAQG;IACH,aAFU,MAAM,CAEe;IAE/B;;;;OAIG;IACH,wBAFU,MAAM,CAE0B;IAE1C;;;;;;OAMG;IACH,eAFU,MAAM,CAEiB;IAEjC;;;;;;;OAOG;IACH,eAFU,MAAM,CAEiB;IAEjC;;;;OAIG;IACH,gBAFU,MAAM,CAEkB;IAElC;;;;OAIG;IACH,gBAFU,MAAM,CAEkB;IAElC;;;;;OAKG;IACH,oBAFU,MAAM,CAEsB;IAEtC;;;;;;;;;;;;;OAaG;IACH,mBAFU,MAAM,CAEqB;IAGzC;;;;;;;OAOG;IACH,sBAHW,MAAM;oBACQ,UAAU,UAAU,MAAM,GAAG,IAAI;mBAAa,GAAG;
|
|
1
|
+
{"version":3,"file":"NetworkPeer.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/orchestrator/NetworkPeer.js"],"names":[],"mappings":"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"}
|