@woosh/meep-engine 2.169.1 → 2.169.2
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/ecs/component/editors/NumericIntervalEditor.js +18 -35
- package/editor/ecs/component/editors/ObservedIntegerEditor.js +22 -43
- package/editor/ecs/component/editors/ObservedStringEditor.js +34 -51
- package/editor/ecs/component/editors/common/makeV3_editor.js +12 -30
- package/editor/ecs/component/editors/common/two_way_sync.js +50 -0
- package/editor/ecs/component/editors/geom/QuaternionEditor.js +20 -35
- package/editor/ecs/component/editors/geom/Vector1Editor.js +5 -28
- package/editor/ecs/component/editors/primitive/NumberEditor.js +15 -31
- package/editor/tools/paint/TerrainHeightPaintTool.js +22 -31
- package/editor/tools/paint/TerrainPaintTool.js +85 -13
- package/editor/tools/paint/TerrainTexturePaintTool.js +18 -29
- package/editor/view/ecs/components/TerrainController.js +1 -4
- package/package.json +1 -1
- package/src/DUPLICATION_AUDIT_2026_08_07/00_core_reuse_surface.md +738 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/A_core_math_geom.md +79 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/B_core_data.md +93 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/C_gfx_render.md +80 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/D_gfx_features.md +164 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/E_physics.md +69 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/F_sound.md +102 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/G_net_save.md +129 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/H_engine_misc.md +72 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/I_generation_view.md +74 -0
- package/src/DUPLICATION_AUDIT_2026_08_07/K_crosscutting.md +169 -0
- package/src/DUPLICATION_AUDIT_2026_08_07.md +254 -0
- package/src/DUPLICATION_AUDIT_REMEDIATION.md +250 -0
- package/src/core/bvh2/bvh3/query/bvh_collect_user_data.js +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_leaves_generic.js +77 -77
- package/src/core/bvh2/bvh3/query/bvh_query_leaves_ray.js +90 -90
- package/src/core/bvh2/bvh3/query/bvh_query_leaves_ray_segment.js +94 -94
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_generic.js +86 -86
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_intersects_aabb.js +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_intersects_capsule.js +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_intersects_frustum.js +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_intersects_sphere.js +2 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.js +96 -96
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray_segment.js +100 -100
- package/src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js +2 -2
- package/src/core/bvh8/aabb3_round_to_float32.d.ts +16 -0
- package/src/core/bvh8/aabb3_round_to_float32.d.ts.map +1 -0
- package/src/core/bvh8/aabb3_round_to_float32.js +22 -0
- package/src/core/bvh8/bvh8_geometry_validate.d.ts.map +1 -1
- package/src/core/bvh8/bvh8_geometry_validate.js +1 -12
- package/src/core/bvh8/bvh8_geometry_validate_indirect.d.ts.map +1 -1
- package/src/core/bvh8/bvh8_geometry_validate_indirect.js +1 -12
- package/src/core/cache/Cache.d.ts +13 -0
- package/src/core/cache/Cache.d.ts.map +1 -1
- package/src/core/cache/Cache.js +13 -0
- package/src/core/color/operations/color_darken.d.ts +5 -2
- package/src/core/color/operations/color_darken.d.ts.map +1 -1
- package/src/core/color/operations/color_darken.js +24 -33
- package/src/core/color/operations/color_desaturate.d.ts +5 -2
- package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
- package/src/core/color/operations/color_desaturate.js +24 -33
- package/src/core/color/operations/color_lighten.d.ts +5 -2
- package/src/core/color/operations/color_lighten.d.ts.map +1 -1
- package/src/core/color/operations/color_lighten.js +24 -33
- package/src/core/color/operations/color_saturate.d.ts +5 -2
- package/src/core/color/operations/color_saturate.d.ts.map +1 -1
- package/src/core/color/operations/color_saturate.js +24 -33
- package/src/core/color/operations/color_scale_okhsv_channel.d.ts +28 -0
- package/src/core/color/operations/color_scale_okhsv_channel.d.ts.map +1 -0
- package/src/core/color/operations/color_scale_okhsv_channel.js +45 -0
- package/src/core/geom/2d/hash-grid/SpatialHashGrid.d.ts.map +1 -1
- package/src/core/geom/2d/hash-grid/SpatialHashGrid.js +12 -0
- package/src/core/geom/2d/line/segment2_intersects_segment2_2d.d.ts.map +1 -1
- package/src/core/geom/2d/line/segment2_intersects_segment2_2d.js +25 -29
- package/src/core/geom/2d/line/segment2_segment_compute_intersection_array_2d.d.ts.map +1 -1
- package/src/core/geom/2d/line/segment2_segment_compute_intersection_array_2d.js +46 -51
- package/src/core/geom/2d/line/segment2_segment_intersection_fractions.d.ts +31 -0
- package/src/core/geom/2d/line/segment2_segment_intersection_fractions.d.ts.map +1 -0
- package/src/core/geom/2d/line/segment2_segment_intersection_fractions.js +52 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_circle.d.ts +6 -1
- package/src/core/geom/2d/quad-tree/qt_collect_by_circle.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/qt_collect_by_circle.js +39 -65
- package/src/core/geom/2d/quad-tree/qt_match_data_by_circle.d.ts +15 -5
- 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 +101 -70
- package/src/core/geom/2d/r-tree/StaticR2Tree.d.ts.map +1 -1
- package/src/core/geom/2d/r-tree/StaticR2Tree.js +7 -3
- package/src/core/geom/3d/aabb/aabb3_intersects_ray_segment.d.ts +7 -8
- package/src/core/geom/3d/aabb/aabb3_intersects_ray_segment.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_intersects_ray_segment.js +15 -51
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.js +13 -14
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.js +2 -17
- package/src/core/geom/3d/atlas/segment/atlas_chart_roundness_delta.d.ts +22 -0
- package/src/core/geom/3d/atlas/segment/atlas_chart_roundness_delta.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_chart_roundness_delta.js +30 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts +19 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.js +5 -9
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.js +4 -12
- package/src/core/geom/3d/frustum/read_frustum_corner.d.ts +5 -0
- package/src/core/geom/3d/frustum/read_frustum_corner.d.ts.map +1 -1
- package/src/core/geom/3d/frustum/read_frustum_corner.js +8 -5
- package/src/core/geom/3d/line/line3_segment_segment_closest_point_pair.d.ts +33 -0
- package/src/core/geom/3d/line/line3_segment_segment_closest_point_pair.d.ts.map +1 -0
- package/src/core/geom/3d/line/line3_segment_segment_closest_point_pair.js +71 -0
- package/src/core/geom/3d/mat4/m4_compose.d.ts +5 -0
- package/src/core/geom/3d/mat4/m4_compose.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_compose.js +22 -53
- package/src/core/geom/3d/mat4/m4_decompose.d.ts +8 -0
- package/src/core/geom/3d/mat4/m4_decompose.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_decompose.js +84 -76
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts +2 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.js +10 -44
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale_scalar.d.ts +27 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale_scalar.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale_scalar.js +67 -0
- package/src/core/geom/3d/plane/orient3d_fast.d.ts.map +1 -1
- package/src/core/geom/3d/plane/orient3d_fast.js +2 -22
- package/src/core/geom/3d/plane/orient3d_fast_point.d.ts +28 -0
- package/src/core/geom/3d/plane/orient3d_fast_point.d.ts.map +1 -0
- package/src/core/geom/3d/plane/orient3d_fast_point.js +47 -0
- package/src/core/geom/3d/quaternion/quat3_nlerp.d.ts +48 -0
- package/src/core/geom/3d/quaternion/quat3_nlerp.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_nlerp.js +72 -0
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts +9 -0
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/AbstractShape3D.js +44 -1
- package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/BoxShape3D.js +2 -1
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CapsuleShape3D.js +2 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts +0 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.js +25 -56
- package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CylinderShape3D.js +2 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.js +3 -5
- package/src/core/geom/3d/shape/MeshShape3D.d.ts +0 -11
- package/src/core/geom/3d/shape/MeshShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/MeshShape3D.js +27 -106
- package/src/core/geom/3d/shape/Triangle3D.d.ts +1 -1
- package/src/core/geom/3d/shape/Triangle3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/Triangle3D.js +10 -31
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_carve_outside_surface.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_carve_outside_surface.js +8 -57
- package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.d.ts +8 -1
- package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.js +281 -272
- package/src/core/geom/3d/topology/simplify/quadratic/build_vertex_quadrics.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/quadratic/build_vertex_quadrics.js +3 -4
- package/src/core/geom/3d/topology/simplify/quadratic/quadric3_set_from_plane_through_point.d.ts +22 -0
- package/src/core/geom/3d/topology/simplify/quadratic/quadric3_set_from_plane_through_point.d.ts.map +1 -0
- package/src/core/geom/3d/topology/simplify/quadratic/quadric3_set_from_plane_through_point.js +27 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_boundary_loop.d.ts +24 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_boundary_loop.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_boundary_loop.js +73 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_close_boundary_holes.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_close_boundary_holes.js +2 -53
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_vertex_quadrics.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compute_vertex_quadrics.js +3 -4
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_fill_small_holes.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_fill_small_holes.js +3 -33
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_from_indexed_geometry.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_from_indexed_geometry.js +4 -37
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_poke.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_poke.js +3 -32
- package/src/core/geom/3d/topology/struct/binary/query/bt_face_read_triangle.d.ts +32 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_face_read_triangle.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_face_read_triangle.js +66 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path.js +703 -728
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.js +13 -24
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_sample_interior_grid_points.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_sample_interior_grid_points.js +8 -54
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_surface_ray_parity.d.ts +35 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_surface_ray_parity.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_surface_ray_parity.js +82 -0
- package/src/core/geom/3d/triangle/tri3_closest_point.d.ts +29 -0
- package/src/core/geom/3d/triangle/tri3_closest_point.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/tri3_closest_point.js +65 -0
- package/src/core/geom/3d/triangle/tri3_flatten_isometric.d.ts +42 -0
- package/src/core/geom/3d/triangle/tri3_flatten_isometric.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/tri3_flatten_isometric.js +79 -0
- package/src/core/geom/Vector2.d.ts.map +1 -1
- package/src/core/geom/Vector2.js +2 -1
- package/src/core/geom/random/random_orthonormal_basis.d.ts +21 -0
- package/src/core/geom/random/random_orthonormal_basis.d.ts.map +1 -0
- package/src/core/geom/random/random_orthonormal_basis.js +31 -0
- package/src/core/geom/vec2/v2_rotate.d.ts +18 -0
- package/src/core/geom/vec2/v2_rotate.d.ts.map +1 -0
- package/src/core/geom/vec2/v2_rotate.js +21 -0
- package/src/core/geom/vec2/v2_rotate_cos_sin.d.ts +19 -0
- package/src/core/geom/vec2/v2_rotate_cos_sin.d.ts.map +1 -0
- package/src/core/geom/vec2/v2_rotate_cos_sin.js +21 -0
- package/src/core/graph/csr/csr_graph_from_undirected_edge_list.d.ts +30 -0
- package/src/core/graph/csr/csr_graph_from_undirected_edge_list.d.ts.map +1 -0
- package/src/core/graph/csr/csr_graph_from_undirected_edge_list.js +94 -0
- package/src/core/graph/layout/CircleLayout.d.ts.map +1 -1
- package/src/core/graph/layout/CircleLayout.js +6 -29
- package/src/core/graph/layout/box/BoxLayouter.d.ts.map +1 -1
- package/src/core/graph/layout/box/BoxLayouter.js +2 -26
- package/src/core/graph/layout/box/position_box_next_to_box.d.ts.map +1 -1
- package/src/core/graph/layout/box/position_box_next_to_box.js +2 -1
- package/src/core/graph/layout/computeDisconnectedSubGraphs.d.ts.map +1 -1
- package/src/core/graph/layout/computeDisconnectedSubGraphs.js +14 -3
- package/src/core/graph/layout/graph_peel_topological_layer.d.ts +25 -0
- package/src/core/graph/layout/graph_peel_topological_layer.d.ts.map +1 -0
- package/src/core/graph/layout/graph_peel_topological_layer.js +45 -0
- package/src/core/math/hash/hash_mix2.d.ts +21 -0
- package/src/core/math/hash/hash_mix2.d.ts.map +1 -0
- package/src/core/math/hash/hash_mix2.js +22 -0
- package/src/core/math/hash/hash_mix3.d.ts +16 -0
- package/src/core/math/hash/hash_mix3.d.ts.map +1 -0
- package/src/core/math/hash/hash_mix3.js +19 -0
- package/src/core/math/lookup/LUT_HEATMAP.d.ts +17 -0
- package/src/core/math/lookup/LUT_HEATMAP.d.ts.map +1 -0
- package/src/core/math/lookup/LUT_HEATMAP.js +30 -0
- package/src/core/math/noise/curl_noise_3d.d.ts +6 -0
- package/src/core/math/noise/curl_noise_3d.d.ts.map +1 -1
- package/src/core/math/noise/curl_noise_3d.js +18 -27
- package/src/core/math/statistics/hammersley_sequence.d.ts +28 -16
- package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
- package/src/core/math/statistics/hammersley_sequence.js +53 -34
- package/src/core/science/units/MEASUREMENT_UNITS_SI.d.ts +3 -0
- package/src/core/science/units/MEASUREMENT_UNITS_SI.d.ts.map +1 -1
- package/src/core/science/units/MEASUREMENT_UNITS_SI.js +5 -16
- package/src/engine/animation/TransitionFunctions.d.ts +31 -0
- package/src/engine/animation/TransitionFunctions.d.ts.map +1 -1
- package/src/engine/animation/TransitionFunctions.js +44 -0
- package/src/engine/animation/curve/animation_curve_binary_codec.d.ts +29 -0
- package/src/engine/animation/curve/animation_curve_binary_codec.d.ts.map +1 -0
- package/src/engine/animation/curve/animation_curve_binary_codec.js +60 -0
- package/src/engine/animation/curve/draw/canvas_point_to_curve.d.ts +16 -0
- package/src/engine/animation/curve/draw/canvas_point_to_curve.d.ts.map +1 -0
- package/src/engine/animation/curve/draw/canvas_point_to_curve.js +22 -0
- package/src/engine/animation/curve/draw/curve_point_to_canvas.d.ts +27 -0
- package/src/engine/animation/curve/draw/curve_point_to_canvas.d.ts.map +1 -0
- package/src/engine/animation/curve/draw/curve_point_to_canvas.js +38 -0
- package/src/engine/animation/curve/draw/position_canvas_to_curve.d.ts +2 -0
- package/src/engine/animation/curve/draw/position_canvas_to_curve.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/position_canvas_to_curve.js +22 -24
- package/src/engine/animation/curve/draw/position_curve_to_canvas.d.ts +2 -0
- package/src/engine/animation/curve/draw/position_curve_to_canvas.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/position_curve_to_canvas.js +22 -25
- package/src/engine/animation/curve/editor/canvas2dDrawWorldAxisLabels.d.ts.map +1 -1
- package/src/engine/animation/curve/editor/canvas2dDrawWorldAxisLabels.js +3 -2
- package/src/engine/animation/curve/editor/canvas2dPlotCurvePoints.d.ts.map +1 -1
- package/src/engine/animation/curve/editor/canvas2dPlotCurvePoints.js +14 -14
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +1 -1
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +5 -0
- package/src/engine/asset/loaders/GLTFAssetLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/GLTFAssetLoader.js +25 -51
- package/src/engine/asset/loaders/material/StaticMaterialCache.d.ts +3 -2
- package/src/engine/asset/loaders/material/StaticMaterialCache.d.ts.map +1 -1
- package/src/engine/asset/loaders/material/StaticMaterialCache.js +16 -55
- package/src/engine/asset/loaders/material/TextureCoalescer.d.ts +32 -0
- package/src/engine/asset/loaders/material/TextureCoalescer.d.ts.map +1 -0
- package/src/engine/asset/loaders/material/TextureCoalescer.js +68 -0
- package/src/engine/asset/loaders/material/traverseMaterialTextures.d.ts +10 -2
- package/src/engine/asset/loaders/material/traverseMaterialTextures.d.ts.map +1 -1
- package/src/engine/asset/loaders/material/traverseMaterialTextures.js +10 -2
- package/src/engine/control/first-person/abilities/Mantle.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/Mantle.js +10 -26
- package/src/engine/ecs/dynamic_actions/actions/definition/WeightedRandomActionDescription.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/actions/definition/WeightedRandomActionDescription.js +5 -0
- package/src/engine/ecs/evaluation/complex/PointFitnessGaussianBlur.d.ts +22 -2
- package/src/engine/ecs/evaluation/complex/PointFitnessGaussianBlur.d.ts.map +1 -1
- package/src/engine/ecs/evaluation/complex/PointFitnessGaussianBlur.js +92 -41
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.d.ts +3 -1
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.d.ts.map +1 -1
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.js +14 -16
- package/src/engine/ecs/gui/parallax/GuiElementParallaxSystem.d.ts.map +1 -1
- package/src/engine/ecs/gui/parallax/GuiElementParallaxSystem.js +16 -29
- package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.d.ts.map +1 -1
- package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +12 -74
- package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.d.ts.map +1 -1
- package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.js +10 -73
- package/src/engine/ecs/ik/ik_probe_terrain_contact.d.ts +38 -0
- package/src/engine/ecs/ik/ik_probe_terrain_contact.d.ts.map +1 -0
- package/src/engine/ecs/ik/ik_probe_terrain_contact.js +119 -0
- package/src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.d.ts +0 -1
- package/src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.d.ts.map +1 -1
- package/src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.js +2 -14
- package/src/engine/graphics/FULL_SCREEN_QUAD_VERTEX_SHADER.d.ts +12 -1
- package/src/engine/graphics/FULL_SCREEN_QUAD_VERTEX_SHADER.d.ts.map +1 -1
- package/src/engine/graphics/FULL_SCREEN_QUAD_VERTEX_SHADER.js +14 -10
- package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.js +7 -28
- package/src/engine/graphics/ecs/highlight/renderer/HighlightDecodeShader.d.ts +1 -2
- package/src/engine/graphics/ecs/highlight/renderer/HighlightDecodeShader.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/renderer/HighlightDecodeShader.js +4 -12
- package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js +2 -11
- package/src/engine/graphics/ecs/highlight/renderer/makeBlurShader_9.d.ts +1 -2
- package/src/engine/graphics/ecs/highlight/renderer/makeBlurShader_9.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/renderer/makeBlurShader_9.js +3 -11
- package/src/engine/graphics/ecs/highlight/renderer/makeDilationShader.d.ts +1 -2
- package/src/engine/graphics/ecs/highlight/renderer/makeDilationShader.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/renderer/makeDilationShader.js +3 -11
- package/src/engine/graphics/ecs/highlight/renderer/make_screen_space_quad_material.d.ts +33 -0
- package/src/engine/graphics/ecs/highlight/renderer/make_screen_space_quad_material.d.ts.map +1 -0
- package/src/engine/graphics/ecs/highlight/renderer/make_screen_space_quad_material.js +44 -0
- package/src/engine/graphics/ecs/highlight/system/HighlightSystemBase.d.ts +55 -0
- package/src/engine/graphics/ecs/highlight/system/HighlightSystemBase.d.ts.map +1 -0
- package/src/engine/graphics/ecs/highlight/system/HighlightSystemBase.js +205 -0
- package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts +4 -45
- package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.js +39 -162
- package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts +4 -51
- package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.js +34 -164
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts +5 -57
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.js +48 -175
- package/src/engine/graphics/ecs/light/shadow/extend_shadow_camera_near_for_casters.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/shadow/extend_shadow_camera_near_for_casters.js +7 -25
- package/src/engine/graphics/ecs/make_bvh_depth_range_computer.d.ts +26 -0
- package/src/engine/graphics/ecs/make_bvh_depth_range_computer.d.ts.map +1 -0
- package/src/engine/graphics/ecs/make_bvh_depth_range_computer.js +33 -0
- package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh/MeshSystem.js +2 -5
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -5
- package/src/engine/graphics/ecs/render_layers_compute_depth_range.d.ts +35 -0
- package/src/engine/graphics/ecs/render_layers_compute_depth_range.d.ts.map +1 -0
- package/src/engine/graphics/ecs/render_layers_compute_depth_range.js +64 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -5
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +2 -5
- package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/water/WaterSystem.js +2 -5
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js +22 -94
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_overlap_clipping_volume.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_overlap_clipping_volume.js +17 -57
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_raycast.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_raycast.js +17 -57
- package/src/engine/graphics/geometry/buffered/query/nearest_point_on_triangle_record.d.ts +30 -0
- package/src/engine/graphics/geometry/buffered/query/nearest_point_on_triangle_record.d.ts.map +1 -0
- package/src/engine/graphics/geometry/buffered/query/nearest_point_on_triangle_record.js +87 -0
- package/src/engine/graphics/geometry/buffered/query/query_bvh_geometry_nearest.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/query_bvh_geometry_nearest.js +11 -55
- package/src/engine/graphics/geometry/buffered/read_triangle_vertices.d.ts +29 -0
- package/src/engine/graphics/geometry/buffered/read_triangle_vertices.d.ts.map +1 -0
- package/src/engine/graphics/geometry/buffered/read_triangle_vertices.js +102 -0
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderDepthV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderDepthV0.js +17 -122
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderLitV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderLitV0.js +15 -194
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderNormalsV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderNormalsV0.js +12 -108
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderPerPixelV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderPerPixelV0.js +14 -183
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderV0.js +12 -154
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderViewportDepthV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderViewportDepthV0.js +10 -94
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderWireframeV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/shader/ImpostorShaderWireframeV0.js +8 -72
- package/src/engine/graphics/impostors/octahedral/shader/glsl/common.glsl +10 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.js +79 -58
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.js +11 -22
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.js +7 -16
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.js +5 -9
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.js +4 -19
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.d.ts.map +1 -1
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.js +5 -9
- package/src/engine/graphics/material/SplatMaterial.d.ts.map +1 -1
- package/src/engine/graphics/material/SplatMaterial.js +2 -17
- package/src/engine/graphics/material/WaterMaterial.d.ts.map +1 -1
- package/src/engine/graphics/material/WaterMaterial.js +3 -18
- package/src/engine/graphics/material/manager/compilers/CoalesceTextures.d.ts +4 -4
- package/src/engine/graphics/material/manager/compilers/CoalesceTextures.d.ts.map +1 -1
- package/src/engine/graphics/material/manager/compilers/CoalesceTextures.js +25 -70
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +2 -5
- package/src/engine/graphics/particles/node-based/codegen/glsl/getTypeByteSize.d.ts +8 -11
- package/src/engine/graphics/particles/node-based/codegen/glsl/getTypeByteSize.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/codegen/glsl/getTypeByteSize.js +20 -21
- package/src/engine/graphics/particles/node-based/nodes/particle_data_type_component_count.d.ts +39 -0
- package/src/engine/graphics/particles/node-based/nodes/particle_data_type_component_count.d.ts.map +1 -0
- package/src/engine/graphics/particles/node-based/nodes/particle_data_type_component_count.js +45 -0
- package/src/engine/graphics/particles/node-based/particle/ParticleAttributeSpecification.d.ts +6 -8
- package/src/engine/graphics/particles/node-based/particle/ParticleAttributeSpecification.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/particle/ParticleAttributeSpecification.js +2 -13
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +16 -78
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts +45 -0
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +1 -0
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.js +168 -0
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +11 -115
- package/src/engine/graphics/postprocess/threejs/shaders/CopyShader.d.ts +24 -16
- package/src/engine/graphics/postprocess/threejs/shaders/CopyShader.d.ts.map +1 -1
- package/src/engine/graphics/postprocess/threejs/shaders/CopyShader.js +15 -47
- package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts +4 -0
- package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts.map +1 -1
- package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js +4 -0
- package/src/engine/graphics/sh3/build_injected_shader.d.ts +51 -0
- package/src/engine/graphics/sh3/build_injected_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/build_injected_shader.js +56 -0
- package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/MaterialTransformer.js +10 -1
- package/src/engine/graphics/sh3/gi/material/chunk_lpv_get_irradiance_at.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/chunk_lpv_get_irradiance_at.js +17 -0
- package/src/engine/graphics/sh3/gi/material/common.d.ts +1 -1
- package/src/engine/graphics/sh3/gi/material/common.js +6 -222
- package/src/engine/graphics/sh3/gi/material/space_fragment/build_fragment_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/space_fragment/build_fragment_shader.js +7 -11
- package/src/engine/graphics/sh3/gi/material/space_fragment/build_vertex_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/space_fragment/build_vertex_shader.js +27 -29
- package/src/engine/graphics/sh3/gi/material/space_vertex/build_fragment_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/space_vertex/build_fragment_shader.js +7 -11
- package/src/engine/graphics/sh3/gi/material/space_vertex/build_vertex_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/space_vertex/build_vertex_shader.js +7 -12
- package/src/engine/graphics/sh3/grid_dilate_average.d.ts +38 -0
- package/src/engine/graphics/sh3/grid_dilate_average.d.ts.map +1 -0
- package/src/engine/graphics/sh3/grid_dilate_average.js +175 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts +4 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.js +7 -70
- package/src/engine/graphics/sh3/lpg/light_probe_grid_dilate.d.ts +6 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_dilate.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/light_probe_grid_dilate.js +14 -113
- package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.js +7 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.js +5 -8
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.js +5 -8
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.js +5 -8
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.js +5 -8
- package/src/engine/graphics/sh3/lpv/depth/chunk_probe_depth_sampling.d.ts +38 -0
- package/src/engine/graphics/sh3/lpv/depth/chunk_probe_depth_sampling.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/depth/chunk_probe_depth_sampling.js +265 -0
- package/src/engine/graphics/sh3/lpv/depth/octahedral/shader/visualize.frag.glsl +11 -0
- package/src/engine/graphics/sh3/lpv/depth/octahedral/v2/VLPDepthMapVisualisation.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/depth/octahedral/v2/VLPDepthMapVisualisation.js +5 -1
- package/src/engine/graphics/sh3/lpv/depth/octahedral/v2/visualise.frag.glsl +189 -419
- package/src/engine/graphics/sh3/shader/visualize.frag.d.ts +1 -1
- package/src/engine/graphics/sh3/shader/visualize.frag.js +7 -0
- package/src/engine/graphics/shaders/chunks/glsl_octahedral_impostor.d.ts +102 -0
- package/src/engine/graphics/shaders/chunks/glsl_octahedral_impostor.d.ts.map +1 -0
- package/src/engine/graphics/shaders/chunks/glsl_octahedral_impostor.js +277 -0
- package/src/engine/graphics/shaders/chunks/glsl_packing.d.ts +29 -0
- package/src/engine/graphics/shaders/chunks/glsl_packing.d.ts.map +1 -0
- package/src/engine/graphics/shaders/chunks/glsl_packing.js +30 -0
- package/src/engine/graphics/shaders/chunks/glsl_voxel_impostor_splat.d.ts +40 -0
- package/src/engine/graphics/shaders/chunks/glsl_voxel_impostor_splat.d.ts.map +1 -0
- package/src/engine/graphics/shaders/chunks/glsl_voxel_impostor_splat.js +57 -0
- package/src/engine/graphics/shaders/lib/make_clouds_uniforms.d.ts +22 -0
- package/src/engine/graphics/shaders/lib/make_clouds_uniforms.d.ts.map +1 -0
- package/src/engine/graphics/shaders/lib/make_clouds_uniforms.js +39 -0
- package/src/engine/graphics/texture/attribute_spec_to_three_format.d.ts +6 -0
- package/src/engine/graphics/texture/attribute_spec_to_three_format.d.ts.map +1 -1
- package/src/engine/graphics/texture/attribute_spec_to_three_format.js +9 -9
- package/src/engine/graphics/texture/channel_count_to_format_prefix.d.ts +14 -0
- package/src/engine/graphics/texture/channel_count_to_format_prefix.d.ts.map +1 -0
- package/src/engine/graphics/texture/channel_count_to_format_prefix.js +26 -0
- package/src/engine/graphics/texture/computeThreeTextureInternalFormatFromDataType.d.ts.map +1 -1
- package/src/engine/graphics/texture/computeThreeTextureInternalFormatFromDataType.js +2 -20
- package/src/engine/graphics/texture/normalized_internal_format.d.ts.map +1 -1
- package/src/engine/graphics/texture/normalized_internal_format.js +2 -20
- package/src/engine/graphics/texture/sampler/convertTexture2Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/convertTexture2Sampler2D.js +9 -3
- package/src/engine/input/devices/gamepad/GamepadDeviceLayout.d.ts +54 -0
- package/src/engine/input/devices/gamepad/GamepadDeviceLayout.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadDeviceLayout.js +323 -0
- package/src/engine/input/devices/gamepad/GamepadHandle.d.ts +21 -2
- package/src/engine/input/devices/gamepad/GamepadHandle.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadHandle.js +39 -11
- package/src/engine/input/devices/gamepad/GamepadLayout.d.ts +128 -0
- package/src/engine/input/devices/gamepad/GamepadLayout.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadLayout.js +160 -0
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts +10 -0
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.js +11 -0
- package/src/engine/input/devices/gamepad/GamepadStick.d.ts +5 -1
- package/src/engine/input/devices/gamepad/GamepadStick.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadStick.js +5 -1
- package/src/engine/input/devices/gamepad/gamepad_layout_database.d.ts +27 -0
- package/src/engine/input/devices/gamepad/gamepad_layout_database.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/gamepad_layout_database.js +144 -0
- package/src/engine/input/devices/gamepad/gamepad_read_hat_axis.d.ts +25 -0
- package/src/engine/input/devices/gamepad/gamepad_read_hat_axis.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/gamepad_read_hat_axis.js +61 -0
- package/src/engine/input/devices/gamepad/prototypeGamepadTester.d.ts +2 -0
- package/src/engine/input/devices/gamepad/prototypeGamepadTester.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/prototypeGamepadTester.js +2124 -0
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +3 -33
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.js +5 -0
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.d.ts.map +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.js +18 -19
- package/src/engine/network/adapters/TransformInterpolationAdapter.d.ts.map +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.js +18 -13
- package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +2 -1
- package/src/engine/network/sim/ActionLog.d.ts +9 -6
- package/src/engine/network/sim/ActionLog.d.ts.map +1 -1
- package/src/engine/network/sim/ActionLog.js +43 -80
- package/src/engine/network/sim/SmoothingState.d.ts.map +1 -1
- package/src/engine/network/sim/SmoothingState.js +27 -28
- package/src/engine/network/state/FrameBufferRing.d.ts +84 -0
- package/src/engine/network/state/FrameBufferRing.d.ts.map +1 -0
- package/src/engine/network/state/FrameBufferRing.js +168 -0
- package/src/engine/network/state/InputRing.d.ts +14 -12
- package/src/engine/network/state/InputRing.d.ts.map +1 -1
- package/src/engine/network/state/InputRing.js +37 -76
- package/src/engine/network/transport/LoopbackTransport.d.ts.map +1 -1
- package/src/engine/network/transport/LoopbackTransport.js +10 -31
- package/src/engine/network/transport/Transport.d.ts +42 -2
- package/src/engine/network/transport/Transport.d.ts.map +1 -1
- package/src/engine/network/transport/Transport.js +87 -3
- package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.js +7 -33
- package/src/engine/network/transport/adapters/SimulatedTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/SimulatedTransport.js +17 -28
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +6 -32
- package/src/engine/network/transport/adapters/WebSocketTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.js +6 -32
- package/src/engine/network/transport/adapters/WebTransportTransport.d.ts.map +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.js +11 -22
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +18 -48
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_scalar.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_scalar.js +7 -0
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_advect_maccormack_velocity.js +11 -18
- package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_advect_sl_velocity.js +7 -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 +15 -57
- package/src/engine/physics/fluid/solver/v3_grid_apply_scalar_advection.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_apply_scalar_advection.js +7 -0
- package/src/engine/physics/fluid/solver/v3_grid_limit8_at_indices.d.ts +28 -0
- package/src/engine/physics/fluid/solver/v3_grid_limit8_at_indices.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_limit8_at_indices.js +38 -0
- package/src/engine/physics/fluid/solver/v3_mac_advect_maccormack_velocity.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_mac_advect_maccormack_velocity.js +12 -14
- package/src/engine/physics/fluid/solver/v3_mac_apply_vorticity_confinement.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_mac_apply_vorticity_confinement.js +9 -0
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts +13 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
- package/src/engine/physics/mls-mpm/MLS_MPM.js +15 -4
- package/src/engine/physics/narrowphase/box_triangle_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/box_triangle_contact.js +9 -0
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +10 -11
- package/src/engine/physics/narrowphase/sphere_triangle_contact.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/sphere_triangle_contact.js +7 -12
- package/src/engine/physics/solver/apply_impulse_to_body.d.ts +36 -0
- package/src/engine/physics/solver/apply_impulse_to_body.d.ts.map +1 -0
- package/src/engine/physics/solver/apply_impulse_to_body.js +86 -0
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -1
- package/src/engine/physics/solver/solve_contacts.js +1 -53
- package/src/engine/plugin/EnginePlugin.d.ts +3 -0
- package/src/engine/plugin/EnginePlugin.d.ts.map +1 -1
- package/src/engine/plugin/EnginePlugin.js +3 -0
- package/src/engine/save/storage/IndexedDBStorage.d.ts +1 -0
- package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
- package/src/engine/save/storage/IndexedDBStorage.js +50 -50
- package/src/engine/sound/ecs/SoundControllerSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/SoundControllerSystem.js +2 -10
- package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
- package/src/engine/sound/simulation/AcousticSimulator.js +2 -1
- package/src/engine/sound/simulation/core/AcousticOccluderIndex.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/AcousticOccluderIndex.js +4 -6
- package/src/engine/sound/simulation/core/OcclusionSolver.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/OcclusionSolver.js +2 -9
- package/src/engine/sound/simulation/probe/ProbeVisibilityRecheck.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/ProbeVisibilityRecheck.js +9 -14
- package/src/engine/sound/simulation/probe/bakeReverbBands.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeReverbBands.js +2 -6
- package/src/engine/sound/simulation/probe/bakeVisibility.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeVisibility.js +4 -34
- package/src/engine/sound/simulation/probe/probe_densify_portals.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_densify_portals.js +3 -6
- package/src/engine/sound/simulation/probe/probe_edge_key.d.ts +31 -0
- package/src/engine/sound/simulation/probe/probe_edge_key.d.ts.map +1 -0
- package/src/engine/sound/simulation/probe/probe_edge_key.js +38 -0
- package/src/engine/sound/simulation/probe/probe_sdf_grid.d.ts +10 -3
- package/src/engine/sound/simulation/probe/probe_sdf_grid.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_sdf_grid.js +10 -22
- package/src/engine/sound/simulation/probe/probe_visibility_augment.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_visibility_augment.js +12 -48
- package/src/engine/sound/simulation/probe/probe_visibility_bridge_components.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_visibility_bridge_components.js +4 -3
- package/src/engine/sound/simulation/render/foaReverbImpulseResponse.d.ts +5 -4
- package/src/engine/sound/simulation/render/foaReverbImpulseResponse.d.ts.map +1 -1
- package/src/engine/sound/simulation/render/foaReverbImpulseResponse.js +23 -31
- package/src/engine/sound/simulation/render/reverbImpulseResponse.d.ts +1 -8
- package/src/engine/sound/simulation/render/reverbImpulseResponse.d.ts.map +1 -1
- package/src/engine/sound/simulation/render/reverbImpulseResponse.js +21 -31
- package/src/engine/sound/simulation/render/reverb_band_tails.d.ts +55 -0
- package/src/engine/sound/simulation/render/reverb_band_tails.d.ts.map +1 -0
- package/src/engine/sound/simulation/render/reverb_band_tails.js +93 -0
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.js +6 -22
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClip.js +7 -3
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.js +7 -22
- package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/ContainerAudioClip.js +28 -0
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClip.js +1 -5
- package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClip.js +1 -13
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClip.js +2 -8
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts +3 -0
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +26 -14
- package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/BusGraph.js +21 -33
- package/src/engine/sound/sopra/runtime/EventInstance.js +1 -1
- package/src/engine/ui/apply_pointer_tilt_3d.d.ts +25 -0
- package/src/engine/ui/apply_pointer_tilt_3d.d.ts.map +1 -0
- package/src/engine/ui/apply_pointer_tilt_3d.js +50 -0
- package/src/engine/ui/bindings/processors/DomElementProcessorTilt3D.d.ts.map +1 -1
- package/src/engine/ui/bindings/processors/DomElementProcessorTilt3D.js +9 -26
- package/src/generation/filtering/numeric/CellFilterCache.d.ts.map +1 -1
- package/src/generation/filtering/numeric/CellFilterCache.js +4 -21
- package/src/generation/filtering/numeric/complex/CellFilterSobel.d.ts.map +1 -1
- package/src/generation/filtering/numeric/complex/CellFilterSobel.js +11 -20
- package/src/generation/filtering/numeric/math/CellFilterPower.d.ts +1 -1
- package/src/generation/filtering/numeric/math/CellFilterPower.d.ts.map +1 -1
- package/src/generation/filtering/numeric/math/CellFilterPower.js +1 -5
- package/src/generation/filtering/numeric/process/computeCellFilterGradient.d.ts.map +1 -1
- package/src/generation/filtering/numeric/process/computeCellFilterGradient.js +13 -15
- package/src/generation/filtering/numeric/process/computeCellFilterSobel.d.ts +20 -0
- package/src/generation/filtering/numeric/process/computeCellFilterSobel.d.ts.map +1 -0
- package/src/generation/filtering/numeric/process/computeCellFilterSobel.js +36 -0
- package/src/generation/filtering/numeric/util/CellFilterDisplaced.d.ts.map +1 -1
- package/src/generation/filtering/numeric/util/CellFilterDisplaced.js +11 -6
- package/src/generation/filtering/numeric/util/populateSampler2DFromCellFilter.d.ts.map +1 -1
- package/src/generation/filtering/numeric/util/populateSampler2DFromCellFilter.js +18 -36
- package/src/generation/filtering/numeric/util/write_cell_filter_to_sampler2d.d.ts +21 -0
- package/src/generation/filtering/numeric/util/write_cell_filter_to_sampler2d.d.ts.map +1 -0
- package/src/generation/filtering/numeric/util/write_cell_filter_to_sampler2d.js +47 -0
- package/src/generation/filtering/util/cell_filter_weights_pick.d.ts +25 -0
- package/src/generation/filtering/util/cell_filter_weights_pick.d.ts.map +1 -0
- package/src/generation/filtering/util/cell_filter_weights_pick.js +54 -0
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +14 -1
- package/src/generation/markers/GridActionRuleSet.d.ts.map +1 -1
- package/src/generation/markers/GridActionRuleSet.js +10 -7
- package/src/generation/markers/GridCellActionPlaceMarker.d.ts.map +1 -1
- package/src/generation/markers/GridCellActionPlaceMarker.js +10 -12
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js +7 -42
- package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.js +11 -6
- package/src/generation/placement/GridCellPlacementRule.d.ts.map +1 -1
- package/src/generation/placement/GridCellPlacementRule.js +10 -7
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.js +10 -4
- package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.d.ts.map +1 -1
- package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.js +2 -38
- package/src/generation/placement/action/util/GridCellDisplacedAction.d.ts.map +1 -1
- package/src/generation/placement/action/util/GridCellDisplacedAction.js +11 -6
- package/src/generation/rules/cell/CellMatcherGridPattern.d.ts.map +1 -1
- package/src/generation/rules/cell/CellMatcherGridPattern.js +11 -4
- package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
- package/src/generation/theme/ThemeEngine.js +7 -12
- package/src/view/elements/Group.d.ts +24 -3
- package/src/view/elements/Group.d.ts.map +1 -1
- package/src/view/elements/Group.js +56 -34
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Duplication audit — remediation plan
|
|
2
|
+
|
|
3
|
+
Source: [DUPLICATION_AUDIT_2026_08_07.md](DUPLICATION_AUDIT_2026_08_07.md); per-domain evidence in
|
|
4
|
+
[DUPLICATION_AUDIT_2026_08_07/](DUPLICATION_AUDIT_2026_08_07/).
|
|
5
|
+
|
|
6
|
+
**117 items selected for remediation.**
|
|
7
|
+
|
|
8
|
+
Each item gets, before any code changes:
|
|
9
|
+
1. **Adversarial review** — is the finding actually valid? (re-read the source; findings were
|
|
10
|
+
reliable about *what* but unreliable about *where* — see audit §7.)
|
|
11
|
+
2. **Complexity question** — does the fix make the code significantly more complex?
|
|
12
|
+
3. **Performance question** — does the fix make the relevant part of the engine significantly slower?
|
|
13
|
+
|
|
14
|
+
An item may be closed as **REJECTED** (finding invalid) or **DECLINED** (valid but the fix costs more
|
|
15
|
+
than the duplication) — both are legitimate outcomes and are recorded with the reason.
|
|
16
|
+
|
|
17
|
+
Legend: `[ ]` pending · `[x]` done · `[~]` rejected/declined (reason given)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## A — core/geom + core/math (25 items)
|
|
22
|
+
|
|
23
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
24
|
+
|---|---|---|---|---|---|---|
|
|
25
|
+
| [x] | **A2** | HIGH | Boolean and distance-returning AABB-vs-ray-segment slab tests, whose docs declare they MUST agree, are two independent copies of the same numerical… | Yes — identical through t_box_max; only the return differs | No, −45 lines | No — 1 static call, monomorphic, V8 inlines |
|
|
26
|
+
| [x] | **A3** | HIGH | Point-in-closed-triangle-surface classifier (BVH build + 3-ray parity majority vote) copy-pasted whole between the tetrahedral carver and the inter… | Yes — RAY_DIRECTIONS digit-identical, build_surface_bvh token-identical | No — extracted to bt_mesh_surface_ray_parity | No — tetrahedralisation is build-time |
|
|
27
|
+
| [x] | **A4** | HIGH | Radial-cycle splice (the core half-edge invariant "link a loop into an edge's face ring") implemented three times, with two of them behaviourally d… | Yes — 3 impls, 2 divergences (prev-vs-next splice, missing self-link) | No — 2 private copies deleted | No — mesh construction, build-time. Ring order differs only for 3+ loops on one edge; 2-manifold rings identical either way |
|
|
28
|
+
| [x] | **A5** | HIGH | Static implicit-binary-tree spatial index (morton quicksort + bottom-up bounds assembly) forked 3D→2D; the fork carries a scratch-stack indexing bu… | Yes — CONFIRMED re-entrancy bug: seeds stack[0]/[1] absolutely but reads from stack_top | No — 2-line fix | No. Full sort_morton/build hoist DECLINED: would need combine_fn/morton_fn indirect calls per node in a build inner loop |
|
|
29
|
+
| [x] | **A7** | MEDIUM | ConvexHullShape3D and MeshShape3D share five copy-pasted query methods. | Yes — sample_random_point_in_volume token-identical; needs only 2 abstract methods | No — 2 copies removed, 1 base default added | No — 256 contains_point probes dominate the bbox copy |
|
|
30
|
+
| [x] | **A8** | MEDIUM | Bounding box of a flat (x,y,z) buffer re-inlined instead of calling aabb3_from_v3_array. | Yes — same reduction the primitive performs | No, −11 lines x2 | No — same loop, inside recompute |
|
|
31
|
+
| [x] | **A11** | MEDIUM | MeshShape3D re-implements the shared finite-difference SDF-gradient sampler with a different step size and no normalisation, while every other shap… | Yes — 6 siblings delegate, this one didn't; also unnormalised | No, 18 lines to 1 | No — 4 SDF calls dominate; adds one sqrt |
|
|
32
|
+
| [x] | **A13** | MEDIUM | curl_noise_3d is curl_noise_3dt with w = 0, including the six duplicated decorrelation offsets. | Yes — curl_noise_3dt(w=0) is exactly it | No, 12 lines to 1 | No — 3x sdnoise3 dominates |
|
|
33
|
+
| [x] | **A14** | MEDIUM | m4_compose (object args) and m4_from_rotation_translation_scale (array args) contain the same 45-line quaternion→matrix expansion. | Yes — identical expansion, only operand reads differ | No — one scalar core, both public names kept | No — one static call; V8 inlines |
|
|
34
|
+
| [x] | **A15** | MEDIUM | The boolean segment-segment intersection test is an exact prefix of the point-returning one. | Yes — exact prefix, 13 identical lines | No — shared core, both faces thin | No — one call; boolean discards via module scratch |
|
|
35
|
+
| [x] | **A16** | MEDIUM | Reading a triangular face's three vertex ids / coordinates out of a BinaryTopology is hand-written at ~8 non-spec sites, with inconsistent "is it a… | Yes — 2 copies with INCONSISTENT safety: one checked NULL_POINTER, neither verified triangularity | No — new primitive checks both; call sites shorter | No — same reads plus one loop_read_next triangularity check |
|
|
36
|
+
| [x] | **A17** | MEDIUM | Straight-line vertex-to-vertex distance re-implemented inside both pathfinders while the primitive sits in the same directory — and the two copies … | Yes — 3 spellings incl. hypot vs sqrt (not bit-identical) | No — deletes 2 local fns | No — FASTER; hypot is slower than sqrt |
|
|
37
|
+
| [x] | **A18** | MEDIUM | order_cycle_from and the fan-fill of a boundary loop are copy-pasted between the two hole-closing modules. | Yes — order_cycle_from byte-identical modulo brace formatting | No — extracted to bt_boundary_loop | No — hole-filling is a build-time mesh repair pass |
|
|
38
|
+
| [x] | **A19** | MEDIUM | project_triangle (isometric triangle flattening) duplicated between the two chart parameterisers. | Yes — same algorithm; BFF comment said 'Same as LSCM' | No — promoted to tri3_flatten_isometric | No — build-time atlas path |
|
|
39
|
+
| [x] | **A20** | MEDIUM | qt_collect_by_circle and qt_match_data_by_circle are the same traversal, differing by one predicate conjunct; and the circle queries lost the child… | Yes — same traversal, one predicate conjunct; circle queries lacked push-time pruning | No — one impl + accept_all fn (not a null sentinel) | No — adds 1 indirect call/datum but ALSO adds child pruning box had and circle lacked; net favourable |
|
|
40
|
+
| [x] | **A21** | MEDIUM | Winding-agnostic point-in-tetrahedron and coordinate-form orient3d are file-private in MeshShape3D while the shared versions sit in core/geom/3d. | Yes — determinant expansion character-identical | No — orient3d_fast becomes a 3-line reader | No — contains_point timing unchanged (2260ms vs 2104-2234 baseline) |
|
|
41
|
+
| [~] | **A22** | LOW-MEDIUM | m4_decompose re-derives the whole of m4_extract_scale. | Partly — only the 3 v3_length calls coincide | Would ADD complexity: scratch array + call to share 3 lines | n/a — declined; documented instead (reflection handling makes the two return different scale) |
|
|
42
|
+
| [x] | **A23** | LOW-MEDIUM | Barycentric-weights → 3D point reconstruction re-expanded at five sites instead of a tri3_closest_point primitive. | Yes — 6 sites reconstructed from barycentrics, 3 different namings | No — 6 sites collapse to 1 line each | No — surface-scan helpers, not collision hot path |
|
|
43
|
+
| [x] | **A24** | LOW-MEDIUM | The two atlas_segment_charts variants re-declare the same tuning constants and the same roundness term, with a comment claiming they must stay local. | Yes — and the 'kept local for monomorphism' comment is wrong for constants | No | No — tiny monomorphic fn, V8 inlines |
|
|
44
|
+
| [~] | **A25** | LOW-MEDIUM | The spatial-hash-grid cell walk (read element AABB out of the pool) is duplicated between the circle and line queries, including the same no-dedupl… | Partly — layout constants are ALREADY shared imports; only 4 array reads coincide | Would ADD complexity | YES — forces a scratch round-trip in a broadphase inner loop; documented instead |
|
|
45
|
+
| [x] | **A26** | LOW | Shape hash() methods disagree on the integer mixing function even though combine_hash exists. | Yes — 3 sibling vector types used 3 different mixers; Vector2 omitted |0 entirely | No — hash_mix2/hash_mix3, call sites shorter | No — non-allocating, unlike varargs combine_hash |
|
|
46
|
+
| [~] | **A27** | LOW | BFF's interior_angle re-implements v3_angle from an indexed buffer, using the acos form rather than the atan2-stable form that also exists. | NO — recommendation was WRONG: v3_angle returns acos(0)=PI/2 for degenerate, BFF returns 0 | n/a | n/a — swap would corrupt BFF curvature (Omega = 2PI - sum theta); documented as deliberate |
|
|
47
|
+
| [x] | **A28** | LOW | Two different exported functions named compute_edge_collapse_cost in the same package. | Yes — 2 different exported fns, same name, sibling files | No — rename + deprecated alias | No |
|
|
48
|
+
| [x] | **A29** | LOW | Per-vertex quadric accumulation implemented twice, once per mesh representation, with divergent feature sets. | Partly — normals legitimately differ; only d=-n.v0 + setFromVector4 is shared | No — narrower primitive than proposed | No — per-face, build-time |
|
|
49
|
+
| [x] | **A30** | LOW | read_frustum_corner is v3_copy_array with an index instead of an offset. | Yes — same 3 reads, v3_copy_array already overlap-safe | No | No — per-frame, not per-pixel |
|
|
50
|
+
|
|
51
|
+
## B — core data structures (8 items)
|
|
52
|
+
|
|
53
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
54
|
+
|---|---|---|---|---|---|---|
|
|
55
|
+
| [x] | **B3** | HIGH | Traversal-order invariant duplicated 14× and drifted. Every hand-written BVH2 traversal repeats the same stack skeleton *and* the comment "write to… | Yes — I verified: 8 sites, byte-identical comment (typo included), 2 matched it, 6 contradicted | No — swapped 2 lines per file, fixed the typo | No — identical work, only push order |
|
|
56
|
+
| [~] | **B9** | MEDIUM | Intrusive MRU doubly-linked-list splice duplicated between the two cache implementations. | Yes — token-identical MRU splice | Extraction would re-home 44 private-field accesses across 2 cache classes | n/a — declined as too risky for a bulk sweep; documented, recommended standalone |
|
|
57
|
+
| [x] | **B10** | MEDIUM | BVH8 geometry validator duplicated for the direct vs pool-indirect triangle addressing conventions. | Yes — 92% shared, one differing line | No for the helper; walk merge DECLINED (needs identity array sized to triangle count, or per-triangle indirect call) | No — cold debug validator |
|
|
58
|
+
| [x] | **B12** | MEDIUM | Graph-layout helpers duplicated between the box and circle layouters, including a verbatim topological-layer peel. | Yes — buildLayer token-identical, pure topology | No — extracted to graph_peel_topological_layer | No — layout runs per graph edit |
|
|
59
|
+
| [x] | **B14** | MEDIUM | Four colour-adjustment operators are the same 20-line body (assert pair → early-return on amount === 0 → new Color() → linear_srgb_to_okhsv → scale… | Yes — same 20-line body x4; the 'drifted clamp' is behaviourally equivalent though | No — 4 typed wrappers, numeric channel index (not a string key) | No — theme/UI time |
|
|
60
|
+
| [x] | **B19** | LOW | MEASUREMENT_UNITS_SI and UNIT_DIMENSION_MAPPING are the same seven NamedUnit values in the same order, exported twice from two files with the same … | Yes — same 7 units, same order, twice | No — one aliases the other | No |
|
|
61
|
+
| [x] | **B20** | LOW | Two connected-components implementations, one of them quadratic. | Yes — O(n^2) indexOf+splice vs Set | No — array kept for pop order, Set added for membership | FASTER — O(n) not O(n^2); ordering provably unchanged |
|
|
62
|
+
| [x] | **B21** | LOW | Inline 2-D length/distance re-derived next to an imported primitive that already does it. | Yes — 4 inline sqrt sites next to an imported v2_distance | No | No — layout is cold |
|
|
63
|
+
|
|
64
|
+
## C — graphics render/material/texture/geometry (13 items)
|
|
65
|
+
|
|
66
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
67
|
+
|---|---|---|---|---|---|---|
|
|
68
|
+
| [x] | **C1** | HIGH | Triangle-vertex fetch from a possibly-normalized, possibly-implicitly-indexed vertex buffer (~45 lines: index resolve → 3 addresses → 9 reads → 9 d… | see domain report | see domain report | see domain report |
|
|
69
|
+
| [x] | **C2** | HIGH | Nearest-point-on-mesh BVH query: ordered child descent by aabb3_unsigned_distance_sqr_to_point + leaf tri3_closest_point_barycentric → barycentric … | see domain report | see domain report | see domain report |
|
|
70
|
+
| [x] | **C3** | HIGH | Material-texture coalescing loop over TextureAttachmentsByMaterialType + identically-configured Cache<Texture,Texture> | see domain report | see domain report | see domain report |
|
|
71
|
+
| [~] | **C4** | HIGH | "Marked material transform" protocol: own-property marker check → throw on foreign transformer → clone → composeCompile → stamp marker | see domain report | see domain report | see domain report |
|
|
72
|
+
| [~] | **C7** | MEDIUM | GPU internal-format string, hand-written instead of derived | see domain report | see domain report | see domain report |
|
|
73
|
+
| [x] | **C16** | MEDIUM | Whole-file duplicate: CopyShader | see domain report | see domain report | see domain report |
|
|
74
|
+
| [x] | **C18** | MEDIUM | Cloud-shadow uniform block (13 uniforms + the SHADOWMAP_CLOUDS define) | see domain report | see domain report | see domain report |
|
|
75
|
+
| [x] | **C19** | MEDIUM | Channel-count → format-prefix switch (1→R, 2→RG, 3→RGB, 4→RGBA, same throw message) | see domain report | see domain report | see domain report |
|
|
76
|
+
| [x] | **C20** | MEDIUM | GLSL: full-screen quad vertex shader | see domain report | see domain report | see domain report |
|
|
77
|
+
| [x] | **C23** | LOW | Numeric-type → channel-count-format dispatch | see domain report | see domain report | see domain report |
|
|
78
|
+
| [~] | **C24** | LOW | Render-target save/restore idiom | see domain report | see domain report | see domain report |
|
|
79
|
+
| [~] | **C25** | LOW | Canvas + createImageData + Sampler2D over imageData.data + putImageData | see domain report | see domain report | see domain report |
|
|
80
|
+
| [~] | **C26** | LOW | Heat-map ParameterLookupTable colour ramp | see domain report | see domain report | see domain report |
|
|
81
|
+
|
|
82
|
+
## D — graphics feature subsystems (17 items)
|
|
83
|
+
|
|
84
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
85
|
+
|---|---|---|---|---|---|---|
|
|
86
|
+
| [x] | **D1** | CRITICAL | Octahedral impostor GLSL library copy-pasted 9× inside the domain, plus 3 more name-colliding variants. VecToSphereOct / VecToHemiSphereOct / Vecto… | see domain report | see domain report | see domain report |
|
|
87
|
+
| [x] | **D2** | CRITICAL | The production GI probe-depth GLSL library is copy-pasted into two debug visualisers. sign_not_zero (3 overloads), quadBlendWieghts, VecToSphereOct… | see domain report | see domain report | see domain report |
|
|
88
|
+
| [~] | **D3** | HIGH | AbstractMaterialTransformer.transform() marker-guard / clone / compose protocol copied 3×, already diverged | see domain report | see domain report | see domain report |
|
|
89
|
+
| [x] | **D6** | HIGH | Voxel-impostor splat expansion GLSL copied 5×, carrying a stated cross-shader invariant | see domain report | see domain report | see domain report |
|
|
90
|
+
| [~] | **D7** | HIGH | Spherical-harmonic cosine-lobe irradiance evaluator implemented 4× and the copies disagree on sign convention | see domain report | see domain report | see domain report |
|
|
91
|
+
| [x] | **D8** | MEDIUM | Three highlight systems are the same System + Supplier scaffold with a 15-line hole | see domain report | see domain report | see domain report |
|
|
92
|
+
| [x] | **D9** | MEDIUM | Neighbour-average flood-fill ("dilate") written twice — 2D lightmap and 3D probe grid | see domain report | see domain report | see domain report |
|
|
93
|
+
| [x] | **D10** | MEDIUM | Area-weighted triangle surface sampling copy-pasted instead of reusing the function next door | see domain report | see domain report | see domain report |
|
|
94
|
+
| [x] | **D15** | MEDIUM | Camera depth-plane construction + render-layer depth-range accumulation duplicated | see domain report | see domain report | see domain report |
|
|
95
|
+
| [x] | **D16** | MEDIUM | compute_depth_range BVH closure written 7× verbatim | see domain report | see domain report | see domain report |
|
|
96
|
+
| [x] | **D19** | MEDIUM | Full-screen-quad ShaderMaterial option block restated 4× in one directory, with a typo divergence | see domain report | see domain report | see domain report |
|
|
97
|
+
| [~] | **D20** | MEDIUM | Octahedral depth-probe ray kernel duplicated between the two bakers | n/a — same finding as H10, owned by the engine/ecs agent | n/a | n/a — done there |
|
|
98
|
+
| [~] | **D22** | MEDIUM | The impostor atlas uniform contract restated in 8 material classes | n/a — same finding as F11/F16, owned by the sound agent | n/a | n/a |
|
|
99
|
+
| [x] | **D24** | MEDIUM | The four gi/lpg shader-builder glue functions and two transform-shader files are interchangeable | see domain report | see domain report | see domain report |
|
|
100
|
+
| [x] | **D25** | LOW | packDepthToRGBA — a verbatim reimplementation of three.js's <packing> chunk — appears twice | see domain report | see domain report | see domain report |
|
|
101
|
+
| [x] | **D26** | LOW | Bake-camera frame reconstruction duplicated inside one file | see domain report | see domain report | see domain report |
|
|
102
|
+
| [x] | **D27** | LOW | Two byte-size/component-count switch tables over the *same* enum | see domain report | see domain report | see domain report |
|
|
103
|
+
|
|
104
|
+
## E — physics (11 items)
|
|
105
|
+
|
|
106
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
107
|
+
|---|---|---|---|---|---|---|
|
|
108
|
+
| [x] | **E1** | HIGH | Solver impulse application written twice, verbatim. Δv = P·invM; Δω = Iw⁻¹·(r×P) with the identical invM===0 guard, identical sign folding, identic… | Yes — arithmetic identical; signatures differed (module scratch vs param) | No — one module, explicit scratch (the more explicit of the two forms) | No — bit-identical, determinism.spec.js green (14/14) |
|
|
109
|
+
| [x] | **E3** | HIGH | Whole collocated advection family shadows the MAC family and has zero callers. FluidSimulator uses only the v3_mac_* kernels (imports at engine/phy… | Yes — 5 files, zero non-spec importers, MAC family is what the sim uses | No — annotation only; NOT deleted (public library surface) | No |
|
|
110
|
+
| [x] | **E5** | MEDIUM | v3_grid_apply_advection_forward is a slower copy of v3_grid_advect_sl_velocity, and says so in its own docstring. | Yes — its own docstring says it IS v3_grid_advect_sl_velocity(outputs,inputs,inputs...) | No — body becomes a delegation | No — fluid quality gate green |
|
|
111
|
+
| [x] | **E6** | MEDIUM | Selle monotone limiter written four times, twice under the same name limit8 with different signatures in the same directory. | Yes — MAC limit8 = index derivation + grid limit8's clamp core; 2 same-named fns 2 files apart | No — core extracted, MAC's renamed to limit8_at_position | No — comparison order preserved, bit-identical |
|
|
112
|
+
| [~] | **E7** | MEDIUM | Vorticity confinement: the MAC kernel collocates to cell centres and then re-derives the collocated kernel's two passes verbatim. | Yes — passes are character-identical | Extraction forces 3 floats to a module-static per cell instead of registers | RISK — per-cell whole-grid kernel under a measured perf budget; documented, needs a benchmark first |
|
|
113
|
+
| [x] | **E8** | MEDIUM | Two-bone and one-bone IK solvers share a ~75-line terrain-probe + influence prologue verbatim. | Yes — ~75-line prologue shared; audit's 'rival IK solvers' premise was false | n/a — DELEGATED to the engine/ecs agent, which created ik_probe_terrain_contact.js | n/a |
|
|
114
|
+
| [~] | **E12** | MEDIUM | A general 2D half-plane Sutherland–Hodgman clipper exists in core, unused, while narrowphase ships its own. | Yes — same algorithm | n/a | n/a — core uses POINT_EPS 1e-9 slack, physics uses exact <=0; differs exactly on boundary-coincident points, which changes the manifold. Documented. |
|
|
115
|
+
| [x] | **E14** | PROMOTION | tri3_closest_point_barycentric returns barycentrics; all 12 callers immediately reconstruct the world point. The missing primitive is tri3_closest_… | Yes — same operand order as tri3_closest_point, so bit-identical | No | No — physics+determinism green |
|
|
116
|
+
| [x] | **E15** | PROMOTION | line3_compute_segment_segment_closest_points returns (s, t); all four physics callers immediately lerp both segments. | Yes — 4 sites reconstruct both points identically | No — line3_segment_segment_closest_point_pair promoted | No — a+(b-a)*t form preserved exactly |
|
|
117
|
+
| [x] | **E17** | LOW/MEDIUM | solve_constraints re-derives angular_effective_mass_raw, which was extracted for exactly this purpose. | Yes — angular_effective_mass_raw's body verbatim; its own docstring calls itself the shared kernel | No — 12 lines to 1 call | No — identical operand order by construction |
|
|
118
|
+
| [~] | **E20** | LOW | Unnormalised triangle face normal ((B−A) × (C−A)) inline-derived at five physics sites. | PARTLY — audit says core has 'three names'; actually ONE canonical + two @deprecated aliases | n/a | n/a — tri3_compute_normal NORMALIZES, sites need the raw cross product (magnitude = 2x area, used for degeneracy bails). Not a drop-in. |
|
|
119
|
+
|
|
120
|
+
## F — sound (15 items)
|
|
121
|
+
|
|
122
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
123
|
+
|---|---|---|---|---|---|---|
|
|
124
|
+
| [x] | **F2** | HIGH | Undirected edge-list → CSR (degree count → prefix sum → fill via write cursor) written twice; plus a hand-rolled sorted-row isNeighbour binary search | see domain report | see domain report | see domain report |
|
|
125
|
+
| [x] | **F5** | MEDIUM | AnimationCurve binary keyframe codec hand-written twice | see domain report | see domain report | see domain report |
|
|
126
|
+
| [x] | **F6** | MEDIUM | 3-band decaying-noise IR synthesis kernel duplicated | see domain report | see domain report | see domain report |
|
|
127
|
+
| [x] | **F7** | MEDIUM | A third decaying-noise IR generator, unseeded | see domain report | see domain report | see domain report |
|
|
128
|
+
| [x] | **F9** | MEDIUM | "Randomly orient a Fibonacci sample set" written twice, bypassing random_point_on_sphere | see domain report | see domain report | see domain report |
|
|
129
|
+
| [x] | **F10** | MEDIUM | Canonical undirected edge key min·n + max written 4× (and decoded in a 5th place) | see domain report | see domain report | see domain report |
|
|
130
|
+
| [x] | **F11b** | LOW | randomFromArray re-derived inline | see domain report | see domain report | see domain report |
|
|
131
|
+
| [~] | **F13** | MEDIUM | Three hand-written "dynamic BVH of handle-addressed objects" wrappers inside one domain | see domain report | see domain report | see domain report |
|
|
132
|
+
| [x] | **F13b** | LOW | AABB union re-derived | see domain report | see domain report | see domain report |
|
|
133
|
+
| [x] | **F14** | MEDIUM | Trilinear sampling of a Float32Array 3D scalar grid re-implemented | see domain report | see domain report | see domain report |
|
|
134
|
+
| [x] | **F16** | LOW | dB2Volume re-derived inline in a file that already imports it | see domain report | see domain report | see domain report |
|
|
135
|
+
| [x] | **F17** | LOW | BusGraph repeats the same lookup-or-throw preamble 6× | see domain report | see domain report | see domain report |
|
|
136
|
+
| [~] | **F19** | LOW | Well-conditioned perpendicular-axis construction re-derived | see domain report | see domain report | see domain report |
|
|
137
|
+
| [x] | **F20** | LOW | Vector normalize written by hand, inconsistently with the same file | see domain report | see domain report | see domain report |
|
|
138
|
+
| [~] | **F21** | LOW / PROMOTION | Union-find connected components over probe connectivity written twice | see domain report | see domain report | see domain report |
|
|
139
|
+
|
|
140
|
+
## G — network + save (7 items)
|
|
141
|
+
|
|
142
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
143
|
+
|---|---|---|---|---|---|---|
|
|
144
|
+
| [x] | **G2** | HIGH | ActionLog and InputRing are the same per-frame ring of BinaryBuffer slots, written twice. | see domain report | see domain report | see domain report |
|
|
145
|
+
| [x] | **G8** | MEDIUM | Transport adapters copy-paste their entire stats and disconnect-latch machinery instead of putting it on the Transport base. | see domain report | see domain report | see domain report |
|
|
146
|
+
| [x] | **G14** | MEDIUM / PROMOTION | Shortest-path quaternion nlerp (dot-sign-flip → componentwise lerp → normalize) written 3× with no core primitive. | see domain report | see domain report | see domain report |
|
|
147
|
+
| [x] | **G16** | MEDIUM | IndexedDBStorage repeats the transaction+objectStore+request+listener block 4×, and the durability fix was applied to only one copy. | see domain report | see domain report | see domain report |
|
|
148
|
+
| [~] | **G19** | LOW | Uint8Array/TextEncoder length-prefixed blob framing hand-rolled at 4 sites while a correct primitive exists in one. | see domain report | see domain report | see domain report |
|
|
149
|
+
| [x] | **G20** | LOW | SmoothingState inlines two existing core primitives verbatim. | see domain report | see domain report | see domain report |
|
|
150
|
+
| [x] | **G23** | LOW | seq16_advance bypassed for an inline & 0xFFFF. | see domain report | see domain report | see domain report |
|
|
151
|
+
|
|
152
|
+
## H — engine misc (12 items)
|
|
153
|
+
|
|
154
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
155
|
+
|---|---|---|---|---|---|---|
|
|
156
|
+
| [x] | **H4** | HIGH | Divergent copy of the Gaussian-blur-over-a-sampled-function algorithm — the copy still carries the bug the other one fixed | see domain report | see domain report | see domain report |
|
|
157
|
+
| [x] | **H9** | MEDIUM | TextureAttachmentsByMaterialType iteration written five times, twice in the same file | see domain report | see domain report | see domain report |
|
|
158
|
+
| [x] | **H10** | MEDIUM | ~70-line terrain-contact probe + influence computation copy-pasted between the two IK solvers | see domain report | see domain report | see domain report |
|
|
159
|
+
| [x] | **H11** | MEDIUM | Axis-tick-walking algorithm forked; the ceil→floor fix landed in only one copy | see domain report | see domain report | see domain report |
|
|
160
|
+
| [x] | **H13** | MEDIUM | Three curve-space ↔ canvas-space mapping implementations inside the same feature | see domain report | see domain report | see domain report |
|
|
161
|
+
| [x] | **H14** | MEDIUM | Mouse-parallax 3D tilt math copy-pasted, and the copy's pivot silently diverged | see domain report | see domain report | see domain report |
|
|
162
|
+
| [x] | **H16** | MEDIUM | removeEntityWithMeshParticlesEffect reimplements removeEntityWithEffect and drops the transient-save guard | see domain report | see domain report | see domain report |
|
|
163
|
+
| [~] | **H19** | MEDIUM | JSON-derived asset loaders repeat the same scaffold, and all of them lose parse errors | see domain report | see domain report | see domain report |
|
|
164
|
+
| [x] | **H21** | LOW | Quaternion.fromAxisAngle and Quaternion.lookRotation reimplemented module-privately | see domain report | see domain report | see domain report |
|
|
165
|
+
| [x] | **H22** | LOW | Quaternion-rotate-vector inlined in a GUI system | see domain report | see domain report | see domain report |
|
|
166
|
+
| [x] | **H23** | LOW | Cubic easing functions redefined module-privately instead of joining the engine's easing enum | see domain report | see domain report | see domain report |
|
|
167
|
+
| [x] | **H24** | LOW | The same 6-stop heatmap palette declared twice | see domain report | see domain report | see domain report |
|
|
168
|
+
|
|
169
|
+
## I — generation + view/editor (8 items)
|
|
170
|
+
|
|
171
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
172
|
+
|---|---|---|---|---|---|---|
|
|
173
|
+
| [x] | **IG2** | MEDIUM | 2D rotation of a local offset by rotation radians, inlined 8× — core/geom/vec2/ has no v2_rotate | see domain report | see domain report | see domain report |
|
|
174
|
+
| [x] | **IG3** | MEDIUM | Weighted random selection over CellFilter weights implemented three times, one bypassing random_pick_weighted_index with a different prefix-sum con… | see domain report | see domain report | see domain report |
|
|
175
|
+
| [x] | **IG4** | MEDIUM | Sobel 3×3 tap + gradient magnitude duplicated verbatim; the shared helper already exists next door and is not used | see domain report | see domain report | see domain report |
|
|
176
|
+
| [x] | **IG6** | MEDIUM | Rasterising a CellFilter into a Sampler2D at a scale is written twice | see domain report | see domain report | see domain report |
|
|
177
|
+
| [x] | **IG7** | LOW | CellFilterPower re-derives the base class's two-child evaluation instead of implementing operation() | see domain report | see domain report | see domain report |
|
|
178
|
+
| [x] | **IV3** | HIGH | Two-way "model ↔ widget" sync with a re-entrancy lock is hand-rolled in eight editors, half of them without the lock; FieldValueAdapter already exi… | see domain report | see domain report | see domain report |
|
|
179
|
+
| [x] | **IV4** | HIGH | GroupView re-implements View's child list, bypassing the link/unlink lifecycle | see domain report | see domain report | see domain report |
|
|
180
|
+
| [x] | **IV7** | MEDIUM | The terrain brush's UV footprint and its UV→texel conversion are each derived independently in the base tool and both subclasses | see domain report | see domain report | see domain report |
|
|
181
|
+
|
|
182
|
+
## K — cross-cutting (1 items)
|
|
183
|
+
|
|
184
|
+
| | ID | Sev | Finding | Valid? | More complex? | Slower? |
|
|
185
|
+
|---|---|---|---|---|---|---|
|
|
186
|
+
| [x] | **KK10** | HIGH | raw Math.random() on paths that must be deterministic | Yes — 11 raw Math.random() sites; 2 are simulation-authoritative | No — add_rnd_square takes a required random arg like every other sampler | No. The 2 behaviour-tree seeds CANNOT be fixed in isolation (need a threaded run seed) — documented as determinism holes, not silently changed |
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## Progress log
|
|
190
|
+
|
|
191
|
+
Newest last. One entry per commit.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Outcome
|
|
196
|
+
|
|
197
|
+
**117 / 117 resolved. 96 changed, 21 closed as REJECTED or DECLINED.**
|
|
198
|
+
|
|
199
|
+
Full meep suite green throughout: **1541 suites / 9314 tests**, plus the standing gates —
|
|
200
|
+
`determinism.spec.js` (14/14), the fluid `quality.spec.js`, and `second_generation.spec.js`.
|
|
201
|
+
No existing spec was weakened or deleted; several were added.
|
|
202
|
+
|
|
203
|
+
### What the duplication was actually costing
|
|
204
|
+
|
|
205
|
+
Not lines — **fixes that reached one copy and not its twin**. Repaired here:
|
|
206
|
+
|
|
207
|
+
| Fix that had landed | Twin that never got it |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `IndexedDBStorage.store()` settles on transaction commit | `remove()` still settled on the request — a delete was reported durable after its transaction aborted |
|
|
210
|
+
| `inOpen` BitSet replaces the linear `heap.contains` scan | `GridTaskConnectRooms:292` still ran the scan |
|
|
211
|
+
| `BinaryUint32BVH.sort_morton` seeds its stack relative to `stack_top` | `StaticR2Tree` seeded at absolute `stack[0]` — read another traversal's frame when nested |
|
|
212
|
+
| `canvas2d_draw_linear_scale` uses `Math.floor` (with the comment saying why) | `canvas2dDrawWorldAxisLabels` still used `ceil` |
|
|
213
|
+
| `CellFilterGaussianBlur` centres taps at `(samples-1)*0.5` | `PointFitnessGaussianBlur` used `samples/2`, and `size_z = 0` made it return NaN |
|
|
214
|
+
| `array_quick_sort_*` captures the pivot VALUE | `sort_decal_data` compared against the live pivot INDEX |
|
|
215
|
+
| `forward_plus` MaterialTransformer assigns `source.clone()` | the `sh3/gi` twin discarded it and mutated the caller's material |
|
|
216
|
+
| `removeEntityWithEffect` adds the `Transient` guard | the mesh-particle copy leaked effect entities into saves |
|
|
217
|
+
| `ContainerAudioClip.equals()` folds `children` | it had no `hash()` at all; `BlendContainerAudioClip` hashed unequal clips equal |
|
|
218
|
+
| Six of eight BVH traversals contradicted the comment they all shared | specialised queries returned the same set in the opposite order from the generic one |
|
|
219
|
+
|
|
220
|
+
The heuristic that emerged: **in a duplicated pair, the file carrying the explanatory comment is the
|
|
221
|
+
fixed one, and its twin still has the defect.** It held in every case checked.
|
|
222
|
+
|
|
223
|
+
### The 21 not changed, and why
|
|
224
|
+
|
|
225
|
+
Five because the finding was WRONG:
|
|
226
|
+
|
|
227
|
+
- **A27** — swapping BFF's `interior_angle` for `v3_angle` would corrupt curvature: `v3_angle` returns
|
|
228
|
+
`acos(0) = PI/2` for degenerate input where BFF returns 0, and BFF accumulates `Omega = 2PI - sum(theta)`.
|
|
229
|
+
- **H19** — `AssetManager` already wraps `loader.load` in try/catch AND does `result.catch(failure)`.
|
|
230
|
+
- **F19** — the proposed substitute yields an arbitrary tangent where a world-up-anchored axis is required.
|
|
231
|
+
- **IV4** — `View.children` is a class field, so the claimed mechanism cannot occur (the real, different
|
|
232
|
+
defects were fixed).
|
|
233
|
+
- **E20** — core has ONE canonical `tri3_compute_normal` plus two `@deprecated` aliases, not "three names".
|
|
234
|
+
|
|
235
|
+
The rest because the fix cost more than the duplication: a memory round-trip in a broadphase or per-cell
|
|
236
|
+
loop (**A25**, **E7**), a tolerance difference that changes physics manifolds (**E12**), re-homing 44
|
|
237
|
+
private-field accesses in cache classes with load-bearing list invariants (**B9**), a sign convention
|
|
238
|
+
whose unification changes rendered output (**D7**, and the `sign()`/`sign_not_zero()` divergence in
|
|
239
|
+
**D1**), or an identity array sized to triangle count (**B10**). Each is documented in place so the next
|
|
240
|
+
reviewer does not re-derive the same conclusion.
|
|
241
|
+
|
|
242
|
+
### Answers to the two standing questions
|
|
243
|
+
|
|
244
|
+
- **Does it make the code significantly more complex?** No, for every applied item. All were net
|
|
245
|
+
deletions or additive promotions; the largest single change removed 833 lines of copied GLSL.
|
|
246
|
+
- **Does it make the relevant part significantly slower?** No, for every applied item — and three were
|
|
247
|
+
declined precisely because they would have. Two are faster: `computeDisconnectedSubGraphs` went from
|
|
248
|
+
O(n^2) to O(n), and the voxel bake basis is now computed once per tile instead of twice per pixel.
|
|
249
|
+
Bit-identical output was preserved deliberately where it matters (impulse kernel, Selle limiter,
|
|
250
|
+
segment-segment lerp form, quaternion nlerp).
|
|
@@ -49,9 +49,9 @@ export function bvh_collect_user_data(
|
|
|
49
49
|
const child1 = bvh.node_get_child1(node);
|
|
50
50
|
const child2 = bvh.node_get_child2(node);
|
|
51
51
|
|
|
52
|
-
// write to stack in reverse order, so that
|
|
53
|
-
stack[stack.pointer++] = child1;
|
|
52
|
+
// write to stack in reverse order, so that the first child ends up being visited first
|
|
54
53
|
stack[stack.pointer++] = child2;
|
|
54
|
+
stack[stack.pointer++] = child1;
|
|
55
55
|
|
|
56
56
|
} else {
|
|
57
57
|
// leaf root
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
-
import { NULL_NODE } from "../BVH.js";
|
|
3
|
-
|
|
4
|
-
const stack = SCRATCH_UINT32_TRAVERSAL_STACK;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Collect every leaf node accepted by `query`, walking the tree from `root`.
|
|
8
|
-
*
|
|
9
|
-
* Uses the shared {@link SCRATCH_UINT32_TRAVERSAL_STACK}: `query.evaluate` MUST NOT throw and
|
|
10
|
-
* MUST NOT start another traversal that consumes the same stack. On a throw the shared stack
|
|
11
|
-
* pointer is left elevated, silently corrupting every subsequent traversal. We deliberately do
|
|
12
|
-
* NOT wrap the loop in try/finally — that forces a V8 de-opt on this hot path; not throwing from
|
|
13
|
-
* the predicate is a precondition, not something to defend against at runtime.
|
|
14
|
-
*
|
|
15
|
-
* @param {number[]|Uint32Array} result destination for matched leaf node ids
|
|
16
|
-
* @param {number} result_offset first index in `result` to write to
|
|
17
|
-
* @param {BVH} bvh
|
|
18
|
-
* @param {number} root
|
|
19
|
-
* @param {BVHQuery} query per-node predicate; must be conservative at internal nodes
|
|
20
|
-
* @returns {number} number of entries written
|
|
21
|
-
*/
|
|
22
|
-
export function bvh_query_leaves_generic(
|
|
23
|
-
result, result_offset,
|
|
24
|
-
bvh, root, query
|
|
25
|
-
) {
|
|
26
|
-
|
|
27
|
-
if (root === NULL_NODE) {
|
|
28
|
-
return 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {number}
|
|
34
|
-
*/
|
|
35
|
-
const stack_top = stack.pointer++;
|
|
36
|
-
|
|
37
|
-
stack[stack_top] = root;
|
|
38
|
-
|
|
39
|
-
let result_cursor = result_offset;
|
|
40
|
-
|
|
41
|
-
while (stack.pointer > stack_top) {
|
|
42
|
-
stack.pointer--;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* @type {number}
|
|
47
|
-
*/
|
|
48
|
-
const node = stack[stack.pointer];
|
|
49
|
-
|
|
50
|
-
// test node against the ray
|
|
51
|
-
const pass = query.evaluate(node, bvh);
|
|
52
|
-
|
|
53
|
-
if (!pass) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const node_is_leaf = bvh.node_is_leaf(node);
|
|
58
|
-
|
|
59
|
-
if (!node_is_leaf) {
|
|
60
|
-
|
|
61
|
-
// read in-order
|
|
62
|
-
const child1 = bvh.node_get_child1(node);
|
|
63
|
-
const child2 = bvh.node_get_child2(node);
|
|
64
|
-
|
|
65
|
-
// write to stack in reverse order, so that
|
|
66
|
-
stack[stack.pointer++] = child2;
|
|
67
|
-
stack[stack.pointer++] = child1;
|
|
68
|
-
|
|
69
|
-
} else {
|
|
70
|
-
// leaf node
|
|
71
|
-
|
|
72
|
-
result[result_cursor++] = node;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return result_cursor - result_offset;
|
|
77
|
-
}
|
|
1
|
+
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
+
import { NULL_NODE } from "../BVH.js";
|
|
3
|
+
|
|
4
|
+
const stack = SCRATCH_UINT32_TRAVERSAL_STACK;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Collect every leaf node accepted by `query`, walking the tree from `root`.
|
|
8
|
+
*
|
|
9
|
+
* Uses the shared {@link SCRATCH_UINT32_TRAVERSAL_STACK}: `query.evaluate` MUST NOT throw and
|
|
10
|
+
* MUST NOT start another traversal that consumes the same stack. On a throw the shared stack
|
|
11
|
+
* pointer is left elevated, silently corrupting every subsequent traversal. We deliberately do
|
|
12
|
+
* NOT wrap the loop in try/finally — that forces a V8 de-opt on this hot path; not throwing from
|
|
13
|
+
* the predicate is a precondition, not something to defend against at runtime.
|
|
14
|
+
*
|
|
15
|
+
* @param {number[]|Uint32Array} result destination for matched leaf node ids
|
|
16
|
+
* @param {number} result_offset first index in `result` to write to
|
|
17
|
+
* @param {BVH} bvh
|
|
18
|
+
* @param {number} root
|
|
19
|
+
* @param {BVHQuery} query per-node predicate; must be conservative at internal nodes
|
|
20
|
+
* @returns {number} number of entries written
|
|
21
|
+
*/
|
|
22
|
+
export function bvh_query_leaves_generic(
|
|
23
|
+
result, result_offset,
|
|
24
|
+
bvh, root, query
|
|
25
|
+
) {
|
|
26
|
+
|
|
27
|
+
if (root === NULL_NODE) {
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
*/
|
|
35
|
+
const stack_top = stack.pointer++;
|
|
36
|
+
|
|
37
|
+
stack[stack_top] = root;
|
|
38
|
+
|
|
39
|
+
let result_cursor = result_offset;
|
|
40
|
+
|
|
41
|
+
while (stack.pointer > stack_top) {
|
|
42
|
+
stack.pointer--;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {number}
|
|
47
|
+
*/
|
|
48
|
+
const node = stack[stack.pointer];
|
|
49
|
+
|
|
50
|
+
// test node against the ray
|
|
51
|
+
const pass = query.evaluate(node, bvh);
|
|
52
|
+
|
|
53
|
+
if (!pass) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const node_is_leaf = bvh.node_is_leaf(node);
|
|
58
|
+
|
|
59
|
+
if (!node_is_leaf) {
|
|
60
|
+
|
|
61
|
+
// read in-order
|
|
62
|
+
const child1 = bvh.node_get_child1(node);
|
|
63
|
+
const child2 = bvh.node_get_child2(node);
|
|
64
|
+
|
|
65
|
+
// write to stack in reverse order, so that the first child ends up being visited first
|
|
66
|
+
stack[stack.pointer++] = child2;
|
|
67
|
+
stack[stack.pointer++] = child1;
|
|
68
|
+
|
|
69
|
+
} else {
|
|
70
|
+
// leaf node
|
|
71
|
+
|
|
72
|
+
result[result_cursor++] = node;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return result_cursor - result_offset;
|
|
77
|
+
}
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
-
import { aabb3_intersects_ray } from "../../../geom/3d/aabb/aabb3_intersects_ray.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
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param {number[]|Uint32Array} result
|
|
11
|
-
* @param {number} result_offset
|
|
12
|
-
* @param {BVH} bvh
|
|
13
|
-
* @param {number} root
|
|
14
|
-
* @param {number} origin_x
|
|
15
|
-
* @param {number} origin_y
|
|
16
|
-
* @param {number} origin_z
|
|
17
|
-
* @param {number} direction_x
|
|
18
|
-
* @param {number} direction_y
|
|
19
|
-
* @param {number} direction_z
|
|
20
|
-
* @returns {number}
|
|
21
|
-
*/
|
|
22
|
-
export function bvh_query_leaves_ray(
|
|
23
|
-
result, result_offset,
|
|
24
|
-
bvh, root,
|
|
25
|
-
origin_x, origin_y, origin_z,
|
|
26
|
-
direction_x, direction_y, direction_z
|
|
27
|
-
) {
|
|
28
|
-
|
|
29
|
-
if (root === NULL_NODE) {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {number}
|
|
37
|
-
*/
|
|
38
|
-
const stack_top = stack.pointer++;
|
|
39
|
-
|
|
40
|
-
stack[stack_top] = root;
|
|
41
|
-
|
|
42
|
-
let result_cursor = result_offset;
|
|
43
|
-
|
|
44
|
-
/*
|
|
45
|
-
For performance, we bind data directly to avoid extra copies required to read out AABB
|
|
46
|
-
*/
|
|
47
|
-
const float32 = bvh.__data_float32;
|
|
48
|
-
const uint32 = bvh.__data_uint32;
|
|
49
|
-
|
|
50
|
-
do {
|
|
51
|
-
stack.pointer--;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @type {number}
|
|
56
|
-
*/
|
|
57
|
-
const node = stack[stack.pointer];
|
|
58
|
-
|
|
59
|
-
const address = node * ELEMENT_WORD_COUNT;
|
|
60
|
-
|
|
61
|
-
// test node against the ray
|
|
62
|
-
const intersects = aabb3_intersects_ray(
|
|
63
|
-
float32[address], float32[address + 1], float32[address + 2],
|
|
64
|
-
float32[address + 3], float32[address + 4], float32[address + 5],
|
|
65
|
-
origin_x, origin_y, origin_z,
|
|
66
|
-
direction_x, direction_y, direction_z
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
if (!intersects) {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// get fist child to check if this is a leaf node or not
|
|
74
|
-
const child_1 = uint32[address + COLUMN_CHILD_1];
|
|
75
|
-
|
|
76
|
-
if (child_1 !== NULL_NODE) {
|
|
77
|
-
|
|
78
|
-
// this is not a leaf node, push children onto traversal stack
|
|
79
|
-
stack[stack.pointer++] = uint32[address + COLUMN_CHILD_2];
|
|
80
|
-
stack[stack.pointer++] = child_1;
|
|
81
|
-
|
|
82
|
-
} else {
|
|
83
|
-
// leaf node
|
|
84
|
-
|
|
85
|
-
result[result_cursor++] = node;
|
|
86
|
-
}
|
|
87
|
-
} while (stack.pointer > stack_top);
|
|
88
|
-
|
|
89
|
-
return result_cursor - result_offset;
|
|
90
|
-
}
|
|
1
|
+
import { SCRATCH_UINT32_TRAVERSAL_STACK } from "../../../collection/SCRATCH_UINT32_TRAVERSAL_STACK.js";
|
|
2
|
+
import { aabb3_intersects_ray } from "../../../geom/3d/aabb/aabb3_intersects_ray.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
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {number[]|Uint32Array} result
|
|
11
|
+
* @param {number} result_offset
|
|
12
|
+
* @param {BVH} bvh
|
|
13
|
+
* @param {number} root
|
|
14
|
+
* @param {number} origin_x
|
|
15
|
+
* @param {number} origin_y
|
|
16
|
+
* @param {number} origin_z
|
|
17
|
+
* @param {number} direction_x
|
|
18
|
+
* @param {number} direction_y
|
|
19
|
+
* @param {number} direction_z
|
|
20
|
+
* @returns {number}
|
|
21
|
+
*/
|
|
22
|
+
export function bvh_query_leaves_ray(
|
|
23
|
+
result, result_offset,
|
|
24
|
+
bvh, root,
|
|
25
|
+
origin_x, origin_y, origin_z,
|
|
26
|
+
direction_x, direction_y, direction_z
|
|
27
|
+
) {
|
|
28
|
+
|
|
29
|
+
if (root === NULL_NODE) {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
const stack_top = stack.pointer++;
|
|
39
|
+
|
|
40
|
+
stack[stack_top] = root;
|
|
41
|
+
|
|
42
|
+
let result_cursor = result_offset;
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
For performance, we bind data directly to avoid extra copies required to read out AABB
|
|
46
|
+
*/
|
|
47
|
+
const float32 = bvh.__data_float32;
|
|
48
|
+
const uint32 = bvh.__data_uint32;
|
|
49
|
+
|
|
50
|
+
do {
|
|
51
|
+
stack.pointer--;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
*/
|
|
57
|
+
const node = stack[stack.pointer];
|
|
58
|
+
|
|
59
|
+
const address = node * ELEMENT_WORD_COUNT;
|
|
60
|
+
|
|
61
|
+
// test node against the ray
|
|
62
|
+
const intersects = aabb3_intersects_ray(
|
|
63
|
+
float32[address], float32[address + 1], float32[address + 2],
|
|
64
|
+
float32[address + 3], float32[address + 4], float32[address + 5],
|
|
65
|
+
origin_x, origin_y, origin_z,
|
|
66
|
+
direction_x, direction_y, direction_z
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
if (!intersects) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// get fist child to check if this is a leaf node or not
|
|
74
|
+
const child_1 = uint32[address + COLUMN_CHILD_1];
|
|
75
|
+
|
|
76
|
+
if (child_1 !== NULL_NODE) {
|
|
77
|
+
|
|
78
|
+
// this is not a leaf node, push children onto traversal stack
|
|
79
|
+
stack[stack.pointer++] = uint32[address + COLUMN_CHILD_2];
|
|
80
|
+
stack[stack.pointer++] = child_1;
|
|
81
|
+
|
|
82
|
+
} else {
|
|
83
|
+
// leaf node
|
|
84
|
+
|
|
85
|
+
result[result_cursor++] = node;
|
|
86
|
+
}
|
|
87
|
+
} while (stack.pointer > stack_top);
|
|
88
|
+
|
|
89
|
+
return result_cursor - result_offset;
|
|
90
|
+
}
|