@woosh/meep-engine 2.138.20 → 2.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_aabb.d.ts +3 -3
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_aabb.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_aabb.js +4 -4
- package/src/core/collection/PairUint32Map.d.ts +100 -0
- package/src/core/collection/PairUint32Map.d.ts.map +1 -0
- package/src/core/collection/PairUint32Map.js +321 -0
- package/src/core/collection/Uint32Map.d.ts +119 -0
- package/src/core/collection/Uint32Map.d.ts.map +1 -0
- package/src/core/collection/Uint32Map.js +345 -0
- package/src/core/collection/array/array_shuffle.d.ts +10 -3
- package/src/core/collection/array/array_shuffle.d.ts.map +1 -1
- package/src/core/collection/array/array_shuffle.js +27 -22
- package/src/core/collection/heap/FibonacciHeap.d.ts +195 -0
- package/src/core/collection/heap/FibonacciHeap.d.ts.map +1 -0
- package/src/core/collection/heap/FibonacciHeap.js +586 -0
- package/src/core/collection/heap/Uint32Heap.js +1 -1
- package/src/core/collection/heap/Uint32Heap4.d.ts +169 -0
- package/src/core/collection/heap/Uint32Heap4.d.ts.map +1 -0
- package/src/core/collection/heap/Uint32Heap4.js +490 -0
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts +30 -0
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.d.ts.map +1 -0
- package/src/core/geom/3d/aabb/aabb3_transform_oriented.js +93 -0
- package/src/core/geom/3d/line/line3_closest_points_segment_segment.d.ts +27 -0
- package/src/core/geom/3d/line/line3_closest_points_segment_segment.d.ts.map +1 -0
- package/src/core/geom/3d/line/line3_closest_points_segment_segment.js +88 -0
- package/src/core/geom/3d/quaternion/quat3_to_matrix3.d.ts +54 -0
- package/src/core/geom/3d/quaternion/quat3_to_matrix3.d.ts.map +1 -0
- package/src/core/geom/3d/quaternion/quat3_to_matrix3.js +69 -0
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts +24 -2
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/AbstractShape3D.js +24 -1
- package/src/core/geom/3d/shape/BoxShape3D.d.ts +61 -0
- package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/BoxShape3D.js +158 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts +11 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CapsuleShape3D.js +12 -0
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts +148 -0
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/HeightMapShape3D.js +451 -0
- package/src/core/geom/3d/shape/MeshShape3D.d.ts +210 -0
- package/src/core/geom/3d/shape/MeshShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/MeshShape3D.js +593 -0
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +46 -2
- package/src/core/geom/3d/shape/Triangle3D.d.ts +95 -0
- package/src/core/geom/3d/shape/Triangle3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/Triangle3D.js +318 -0
- package/src/core/geom/3d/shape/UnionShape3D.js +13 -0
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts +37 -9
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitCubeShape3D.js +45 -98
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts +10 -0
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitSphereShape3D.js +11 -0
- package/src/core/geom/3d/shape/shape_mesh_from_geometry.d.ts +30 -0
- package/src/core/geom/3d/shape/shape_mesh_from_geometry.d.ts.map +1 -0
- package/src/core/geom/3d/shape/shape_mesh_from_geometry.js +64 -0
- package/src/core/geom/3d/shape/util/shape3d_voxelize_to_grid.d.ts +61 -0
- package/src/core/geom/3d/shape/util/shape3d_voxelize_to_grid.d.ts.map +1 -0
- package/src/core/geom/3d/shape/util/shape3d_voxelize_to_grid.js +148 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedral_mesh_from_surface.d.ts +39 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedral_mesh_from_surface.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedral_mesh_from_surface.js +147 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_quality.d.ts +15 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_quality.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/compute_tetrahedron_quality.js +22 -0
- package/src/core/geom/3d/tetrahedra/prototype_tetrahedrize_mesh.d.ts +2 -0
- package/src/core/geom/3d/tetrahedra/prototype_tetrahedrize_mesh.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/prototype_tetrahedrize_mesh.js +671 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_build_vertex_to_tets_map.d.ts +28 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_build_vertex_to_tets_map.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_build_vertex_to_tets_map.js +48 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_carve_outside_surface.d.ts +26 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_carve_outside_surface.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_carve_outside_surface.js +222 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_find_tets_around_edge.d.ts +34 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_find_tets_around_edge.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_find_tets_around_edge.js +146 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_23.d.ts +36 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_23.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_23.js +232 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_32.d.ts +33 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_32.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_flip_32.js +255 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_improve_quality.d.ts +68 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_improve_quality.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_improve_quality.js +387 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_smooth_vertex.d.ts +35 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_smooth_vertex.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_smooth_vertex.js +140 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_vertex_is_boundary.d.ts +31 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_vertex_is_boundary.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_vertex_is_boundary.js +97 -0
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_quality.d.ts +32 -0
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_quality.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_quality.js +66 -0
- package/src/core/geom/3d/topology/struct/binary/BinaryElementPool.d.ts +41 -0
- package/src/core/geom/3d/topology/struct/binary/BinaryElementPool.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/BinaryElementPool.js +124 -13
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.d.ts +134 -0
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/BinaryTopology.js +276 -3
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_close_boundary_holes.d.ts +17 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_close_boundary_holes.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_close_boundary_holes.js +135 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compact.d.ts +14 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compact.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_compact.js +177 -0
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_face_decouple.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_face_decouple.js +20 -4
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/bt_mesh_simplify.js +5 -3
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_create.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_create.js +9 -0
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_get_or_create.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_get_or_create.js +21 -45
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_kill.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_kill.js +7 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_kill_parallels.d.ts +8 -6
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_kill_parallels.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_edge_kill_parallels.js +8 -6
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_kill_short_edges.d.ts +22 -0
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_kill_short_edges.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_kill_short_edges.js +73 -0
- package/src/core/geom/3d/topology/struct/binary/io/vertex/bt_vertex_replace.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/vertex/bt_vertex_replace.js +51 -1
- package/src/core/geom/3d/topology/struct/binary/query/bt_edge_get.d.ts +10 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_edge_get.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_edge_get.js +42 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_sample_interior_grid_points.d.ts +28 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_sample_interior_grid_points.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_sample_interior_grid_points.js +227 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_walk_boundary_loops.d.ts +13 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_walk_boundary_loops.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_walk_boundary_loops.js +108 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_query_edge_is_boundary.d.ts +11 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_query_edge_is_boundary.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_query_edge_is_boundary.js +20 -0
- package/src/core/geom/3d/triangle/triangle_mesh_compute_signed_volume.d.ts +20 -0
- package/src/core/geom/3d/triangle/triangle_mesh_compute_signed_volume.d.ts.map +1 -0
- package/src/core/geom/3d/triangle/triangle_mesh_compute_signed_volume.js +38 -0
- package/src/core/geom/3d/triangle/v3_compute_triangle_normal.d.ts +2 -2
- package/src/core/geom/3d/triangle/v3_compute_triangle_normal.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/v3_compute_triangle_normal.js +1 -1
- package/src/core/geom/vec3/v3_dot_array_array.d.ts +3 -3
- package/src/core/geom/vec3/v3_dot_array_array.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_dot_array_array.js +2 -2
- package/src/core/geom/vec3/v3_negate_array.d.ts +3 -3
- package/src/core/geom/vec3/v3_negate_array.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_negate_array.js +2 -2
- package/src/core/geom/vec3/v3_quat3_apply.d.ts +29 -0
- package/src/core/geom/vec3/v3_quat3_apply.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_quat3_apply.js +39 -0
- package/src/core/geom/vec3/v3_quat3_apply_inverse.d.ts +30 -0
- package/src/core/geom/vec3/v3_quat3_apply_inverse.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_quat3_apply_inverse.js +41 -0
- package/src/core/geom/vec3/v3_triple_cross_product.d.ts +32 -0
- package/src/core/geom/vec3/v3_triple_cross_product.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_triple_cross_product.js +45 -0
- package/src/core/graph/csr/CSRGraph.d.ts +168 -0
- package/src/core/graph/csr/CSRGraph.d.ts.map +1 -0
- package/src/core/graph/csr/CSRGraph.js +319 -0
- package/src/core/graph/metis/cluster_mesh_metis.d.ts +12 -0
- package/src/core/graph/metis/cluster_mesh_metis.d.ts.map +1 -1
- package/src/core/graph/metis/cluster_mesh_metis.js +12 -0
- package/src/core/graph/metis/metis.d.ts +19 -0
- package/src/core/graph/metis/metis.d.ts.map +1 -1
- package/src/core/graph/metis/metis.js +20 -0
- package/src/core/graph/metis/metis_cluster_bs.d.ts +11 -0
- package/src/core/graph/metis/metis_cluster_bs.d.ts.map +1 -1
- package/src/core/graph/metis/metis_cluster_bs.js +11 -0
- package/src/core/graph/metis/metis_options.d.ts +17 -2
- package/src/core/graph/metis/metis_options.d.ts.map +1 -1
- package/src/core/graph/metis/metis_options.js +17 -2
- package/src/core/graph/metis/native/MetisGraph.d.ts +144 -0
- package/src/core/graph/metis/native/MetisGraph.d.ts.map +1 -0
- package/src/core/graph/metis/native/MetisGraph.js +212 -0
- package/src/core/graph/metis/native/bisection/BisectionScratch.d.ts +72 -0
- package/src/core/graph/metis/native/bisection/BisectionScratch.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/BisectionScratch.js +101 -0
- package/src/core/graph/metis/native/bisection/bisect_graph.d.ts +37 -0
- package/src/core/graph/metis/native/bisection/bisect_graph.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/bisect_graph.js +100 -0
- package/src/core/graph/metis/native/bisection/compute_2way_params.d.ts +15 -0
- package/src/core/graph/metis/native/bisection/compute_2way_params.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/compute_2way_params.js +84 -0
- package/src/core/graph/metis/native/bisection/fm_2way.d.ts +30 -0
- package/src/core/graph/metis/native/bisection/fm_2way.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/fm_2way.js +290 -0
- package/src/core/graph/metis/native/bisection/grow_bisection.d.ts +23 -0
- package/src/core/graph/metis/native/bisection/grow_bisection.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/grow_bisection.js +137 -0
- package/src/core/graph/metis/native/bisection/split_graph_two_way.d.ts +28 -0
- package/src/core/graph/metis/native/bisection/split_graph_two_way.d.ts.map +1 -0
- package/src/core/graph/metis/native/bisection/split_graph_two_way.js +119 -0
- package/src/core/graph/metis/native/coarsen/coarsen_graph.d.ts +20 -0
- package/src/core/graph/metis/native/coarsen/coarsen_graph.d.ts.map +1 -0
- package/src/core/graph/metis/native/coarsen/coarsen_graph.js +94 -0
- package/src/core/graph/metis/native/coarsen/create_coarse_graph.d.ts +24 -0
- package/src/core/graph/metis/native/coarsen/create_coarse_graph.d.ts.map +1 -0
- package/src/core/graph/metis/native/coarsen/create_coarse_graph.js +158 -0
- package/src/core/graph/metis/native/coarsen/match_shem.d.ts +41 -0
- package/src/core/graph/metis/native/coarsen/match_shem.d.ts.map +1 -0
- package/src/core/graph/metis/native/coarsen/match_shem.js +175 -0
- package/src/core/graph/metis/native/initial/initial_kway_bfs.d.ts +24 -0
- package/src/core/graph/metis/native/initial/initial_kway_bfs.d.ts.map +1 -0
- package/src/core/graph/metis/native/initial/initial_kway_bfs.js +122 -0
- package/src/core/graph/metis/native/initial/initial_kway_recursive_bisection.d.ts +29 -0
- package/src/core/graph/metis/native/initial/initial_kway_recursive_bisection.d.ts.map +1 -0
- package/src/core/graph/metis/native/initial/initial_kway_recursive_bisection.js +170 -0
- package/src/core/graph/metis/native/metis_partition_kway.d.ts +41 -0
- package/src/core/graph/metis/native/metis_partition_kway.d.ts.map +1 -0
- package/src/core/graph/metis/native/metis_partition_kway.js +126 -0
- package/src/core/graph/metis/native/refine/IndexedFloatMaxHeap.d.ts +62 -0
- package/src/core/graph/metis/native/refine/IndexedFloatMaxHeap.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/IndexedFloatMaxHeap.js +261 -0
- package/src/core/graph/metis/native/refine/RefinementScratch.d.ts +45 -0
- package/src/core/graph/metis/native/refine/RefinementScratch.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/RefinementScratch.js +53 -0
- package/src/core/graph/metis/native/refine/compute_kway_params.d.ts +18 -0
- package/src/core/graph/metis/native/refine/compute_kway_params.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/compute_kway_params.js +138 -0
- package/src/core/graph/metis/native/refine/fm_kway.d.ts +63 -0
- package/src/core/graph/metis/native/refine/fm_kway.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/fm_kway.js +462 -0
- package/src/core/graph/metis/native/refine/project_kway.d.ts +22 -0
- package/src/core/graph/metis/native/refine/project_kway.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/project_kway.js +43 -0
- package/src/core/graph/metis/native/refine/refine_kway.d.ts +34 -0
- package/src/core/graph/metis/native/refine/refine_kway.d.ts.map +1 -0
- package/src/core/graph/metis/native/refine/refine_kway.js +43 -0
- package/src/core/math/linalg/eigen/matrix_householder_in_place.d.ts +2 -2
- package/src/core/math/linalg/eigen/matrix_householder_in_place.js +2 -2
- package/src/core/math/linalg/eigen/matrix_qr_in_place.d.ts +6 -4
- package/src/core/math/linalg/eigen/matrix_qr_in_place.d.ts.map +1 -1
- package/src/core/math/linalg/eigen/matrix_qr_in_place.js +69 -23
- package/src/engine/EngineHarness.d.ts +3 -1
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +3 -0
- package/src/engine/control/first-person/DESIGN.md +30 -6
- package/src/engine/control/first-person/DESIGN_EXTENSIONS.md +563 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +115 -9
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerController.js +211 -176
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +601 -8
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +349 -8
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +319 -23
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +1789 -799
- package/src/engine/control/first-person/TODO.md +173 -0
- package/src/engine/control/first-person/abilities/Ability.d.ts +101 -0
- package/src/engine/control/first-person/abilities/Ability.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/Ability.js +119 -0
- package/src/engine/control/first-person/abilities/AbilitySet.d.ts +86 -0
- package/src/engine/control/first-person/abilities/AbilitySet.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/AbilitySet.js +185 -0
- package/src/engine/control/first-person/abilities/LedgeGrab.d.ts +62 -0
- package/src/engine/control/first-person/abilities/LedgeGrab.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/LedgeGrab.js +199 -0
- package/src/engine/control/first-person/abilities/Mantle.d.ts +45 -0
- package/src/engine/control/first-person/abilities/Mantle.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/Mantle.js +188 -0
- package/src/engine/control/first-person/abilities/Slide.d.ts +33 -0
- package/src/engine/control/first-person/abilities/Slide.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/Slide.js +166 -0
- package/src/engine/control/first-person/abilities/WallJump.d.ts +45 -0
- package/src/engine/control/first-person/abilities/WallJump.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/WallJump.js +131 -0
- package/src/engine/control/first-person/abilities/WallRun.d.ts +44 -0
- package/src/engine/control/first-person/abilities/WallRun.d.ts.map +1 -0
- package/src/engine/control/first-person/abilities/WallRun.js +180 -0
- package/src/engine/control/first-person/composer/EyeOffsetStack.d.ts +49 -0
- package/src/engine/control/first-person/composer/EyeOffsetStack.d.ts.map +1 -0
- package/src/engine/control/first-person/composer/EyeOffsetStack.js +60 -0
- package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.d.ts +100 -0
- package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/BreathRhythmEvaluator.js +133 -0
- package/src/engine/control/first-person/mastery/DecisionPoint.d.ts +10 -0
- package/src/engine/control/first-person/mastery/DecisionPoint.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/DecisionPoint.js +30 -0
- package/src/engine/control/first-person/mastery/FootAsymmetryTurnEvaluator.d.ts +61 -0
- package/src/engine/control/first-person/mastery/FootAsymmetryTurnEvaluator.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/FootAsymmetryTurnEvaluator.js +109 -0
- package/src/engine/control/first-person/mastery/MasteryEvaluator.d.ts +40 -0
- package/src/engine/control/first-person/mastery/MasteryEvaluator.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/MasteryEvaluator.js +45 -0
- package/src/engine/control/first-person/mastery/MasteryScore.d.ts +68 -0
- package/src/engine/control/first-person/mastery/MasteryScore.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/MasteryScore.js +100 -0
- package/src/engine/control/first-person/mastery/MasterySet.d.ts +60 -0
- package/src/engine/control/first-person/mastery/MasterySet.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/MasterySet.js +86 -0
- package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.d.ts +58 -0
- package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/SlideInitiationTimingEvaluator.js +83 -0
- package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.d.ts +69 -0
- package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.d.ts.map +1 -0
- package/src/engine/control/first-person/mastery/StrideTimingJumpEvaluator.js +109 -0
- package/src/engine/control/first-person/math/Spring.d.ts +56 -0
- package/src/engine/control/first-person/math/Spring.d.ts.map +1 -0
- package/src/engine/control/first-person/math/Spring.js +71 -0
- package/src/engine/control/first-person/math/computeLRCBreathRate.d.ts +26 -0
- package/src/engine/control/first-person/math/computeLRCBreathRate.d.ts.map +1 -0
- package/src/engine/control/first-person/math/computeLRCBreathRate.js +41 -0
- package/src/engine/control/first-person/math/computeMassRatios.d.ts +35 -0
- package/src/engine/control/first-person/math/computeMassRatios.d.ts.map +1 -0
- package/src/engine/control/first-person/math/computeMassRatios.js +44 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts +31 -1
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts.map +1 -1
- package/src/engine/control/first-person/pose/FirstPersonPose.js +49 -3
- package/src/engine/control/first-person/pose/FirstPersonPosture.d.ts +7 -0
- package/src/engine/control/first-person/pose/FirstPersonPosture.d.ts.map +1 -0
- package/src/engine/control/first-person/pose/FirstPersonPosture.js +27 -0
- package/src/engine/control/first-person/prototype_first_person_controller.js +637 -120
- package/src/engine/control/first-person/sensors/FirstPersonSensors.d.ts +58 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensors.d.ts.map +1 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensors.js +77 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts +80 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +196 -0
- package/src/engine/control/first-person/test/buildTestPlayer.d.ts +20 -0
- package/src/engine/control/first-person/test/buildTestPlayer.d.ts.map +1 -0
- package/src/engine/control/first-person/test/buildTestPlayer.js +36 -0
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +0 -2
- package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/Light.js +27 -0
- package/src/engine/graphics/ecs/light/LightSystem.js +1 -1
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +0 -2
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +0 -2
- package/src/engine/graphics/geometry/CapsuleGeometry.d.ts +42 -0
- package/src/engine/graphics/geometry/CapsuleGeometry.d.ts.map +1 -0
- package/src/engine/graphics/geometry/CapsuleGeometry.js +171 -0
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +0 -2
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +0 -2
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +0 -2
- package/src/engine/navigation/grid/find_path_on_grid_astar.d.ts.map +1 -1
- package/src/engine/navigation/grid/find_path_on_grid_astar.js +11 -2
- package/src/engine/navigation/mesh/bt_mesh_face_find_path.d.ts.map +1 -1
- package/src/engine/navigation/mesh/bt_mesh_face_find_path.js +11 -1
- package/src/engine/physics/BULLET_REVIEW.md +945 -0
- package/src/engine/physics/CANNON_REVIEW.md +1300 -0
- package/src/engine/physics/JOLT_REVIEW.md +913 -0
- package/src/engine/physics/PLAN.md +461 -0
- package/src/engine/physics/RAPIER_REVIEW.md +934 -0
- package/src/engine/physics/REVIEW_001_ACTION_PLAN.md +642 -0
- package/src/engine/physics/body/BodyStorage.d.ts +187 -0
- package/src/engine/physics/body/BodyStorage.d.ts.map +1 -0
- package/src/engine/physics/body/BodyStorage.js +427 -0
- package/src/engine/physics/broadphase/PairList.d.ts +62 -0
- package/src/engine/physics/broadphase/PairList.d.ts.map +1 -0
- package/src/engine/physics/broadphase/PairList.js +97 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts +16 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.d.ts.map +1 -0
- package/src/engine/physics/broadphase/compute_fat_world_aabb.js +61 -0
- package/src/engine/physics/broadphase/generate_pairs.d.ts +38 -0
- package/src/engine/physics/broadphase/generate_pairs.d.ts.map +1 -0
- package/src/engine/physics/broadphase/generate_pairs.js +101 -0
- package/src/engine/physics/contact/ManifoldStore.d.ts +299 -0
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -0
- package/src/engine/physics/contact/ManifoldStore.js +608 -0
- package/src/engine/physics/ecs/BodyKind.d.ts +23 -0
- package/src/engine/physics/ecs/BodyKind.d.ts.map +1 -0
- package/src/engine/physics/ecs/BodyKind.js +24 -0
- package/src/engine/physics/ecs/Collider.d.ts +98 -0
- package/src/engine/physics/ecs/Collider.d.ts.map +1 -0
- package/src/engine/physics/ecs/Collider.js +136 -0
- package/src/engine/physics/ecs/ColliderFlags.d.ts +14 -0
- package/src/engine/physics/ecs/ColliderFlags.d.ts.map +1 -0
- package/src/engine/physics/ecs/ColliderFlags.js +15 -0
- package/src/engine/physics/ecs/ColliderObserverSystem.d.ts +58 -0
- package/src/engine/physics/ecs/ColliderObserverSystem.d.ts.map +1 -0
- package/src/engine/physics/ecs/ColliderObserverSystem.js +103 -0
- package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts +25 -0
- package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/ecs/ColliderSerializationAdapter.js +37 -0
- package/src/engine/physics/ecs/PhysicsEvents.d.ts +15 -0
- package/src/engine/physics/ecs/PhysicsEvents.d.ts.map +1 -0
- package/src/engine/physics/ecs/PhysicsEvents.js +16 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +628 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -0
- package/src/engine/physics/ecs/PhysicsSystem.js +1301 -0
- package/src/engine/physics/ecs/RigidBody.d.ts +197 -0
- package/src/engine/physics/ecs/RigidBody.d.ts.map +1 -0
- package/src/engine/physics/ecs/RigidBody.js +240 -0
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts +21 -0
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts.map +1 -0
- package/src/engine/physics/ecs/RigidBodyFlags.js +22 -0
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts +28 -0
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.js +81 -0
- package/src/engine/physics/ecs/SleepState.d.ts +11 -0
- package/src/engine/physics/ecs/SleepState.d.ts.map +1 -0
- package/src/engine/physics/ecs/SleepState.js +12 -0
- package/src/engine/physics/events/ContactEventBuffer.d.ts +46 -0
- package/src/engine/physics/events/ContactEventBuffer.d.ts.map +1 -0
- package/src/engine/physics/events/ContactEventBuffer.js +83 -0
- package/src/engine/physics/events/diff_manifolds.d.ts +25 -0
- package/src/engine/physics/events/diff_manifolds.d.ts.map +1 -0
- package/src/engine/physics/events/diff_manifolds.js +50 -0
- package/src/engine/physics/fluid/FluidField.d.ts +294 -16
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +510 -66
- package/src/engine/physics/fluid/FluidSimulator.d.ts +188 -5
- package/src/engine/physics/fluid/FluidSimulator.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidSimulator.js +456 -95
- package/src/engine/physics/fluid/SliceVisualiser.d.ts +29 -6
- package/src/engine/physics/fluid/SliceVisualiser.d.ts.map +1 -1
- package/src/engine/physics/fluid/SliceVisualiser.js +190 -165
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts +154 -0
- package/src/engine/physics/fluid/ecs/FluidComponent.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/FluidComponent.js +238 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.d.ts +45 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.js +89 -0
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +107 -0
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/FluidSystem.js +278 -0
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +62 -1
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +81 -6
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts +17 -4
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +105 -12
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts +43 -0
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +210 -0
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts +62 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +302 -8
- package/src/engine/physics/fluid/prototype.js +102 -91
- package/src/engine/physics/fluid/solver/optimal_sor_omega.d.ts +33 -0
- package/src/engine/physics/fluid/solver/optimal_sor_omega.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/optimal_sor_omega.js +41 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_forward.d.ts +20 -5
- 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 +60 -38
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.d.ts +25 -4
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.d.ts.map +1 -1
- package/src/engine/physics/fluid/solver/v3_grid_apply_diffusion.js +93 -73
- package/src/engine/physics/fluid/solver/v3_grid_apply_scalar_advection.d.ts +23 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_scalar_advection.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_apply_scalar_advection.js +60 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_divergence.d.ts +23 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_divergence.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_divergence.js +68 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.d.ts +30 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_compute_solid_neighbour_mask.js +66 -0
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_uniform.d.ts +26 -0
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_uniform.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_patch_edges_uniform.js +113 -0
- package/src/engine/physics/fluid/solver/v3_grid_shift_in_place.d.ts +30 -0
- package/src/engine/physics/fluid/solver/v3_grid_shift_in_place.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_shift_in_place.js +107 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.d.ts +49 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure.js +126 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.d.ts +93 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_pcg.js +424 -0
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.d.ts +48 -0
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.js +92 -0
- package/src/engine/physics/gjk/expanding_polytope_algorithm.d.ts +6 -6
- package/src/engine/physics/gjk/expanding_polytope_algorithm.d.ts.map +1 -1
- package/src/engine/physics/gjk/expanding_polytope_algorithm.js +76 -32
- package/src/engine/physics/gjk/gjk.d.ts +28 -2
- package/src/engine/physics/gjk/gjk.d.ts.map +1 -1
- package/src/engine/physics/gjk/gjk.js +421 -378
- package/src/engine/physics/gjk/minkowski_support.d.ts +37 -0
- package/src/engine/physics/gjk/minkowski_support.d.ts.map +1 -0
- package/src/engine/physics/gjk/minkowski_support.js +75 -0
- package/src/engine/physics/gjk/mpr.d.ts +56 -0
- package/src/engine/physics/gjk/mpr.d.ts.map +1 -0
- package/src/engine/physics/gjk/mpr.js +344 -0
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts +44 -0
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts.map +1 -0
- package/src/engine/physics/inertia/world_inverse_inertia.js +77 -0
- package/src/engine/physics/integration/integrate_position.d.ts +34 -0
- package/src/engine/physics/integration/integrate_position.d.ts.map +1 -0
- package/src/engine/physics/integration/integrate_position.js +79 -0
- package/src/engine/physics/integration/integrate_velocity.d.ts +55 -0
- package/src/engine/physics/integration/integrate_velocity.d.ts.map +1 -0
- package/src/engine/physics/integration/integrate_velocity.js +160 -0
- package/src/engine/physics/integration/quat_integrate.d.ts +27 -0
- package/src/engine/physics/integration/quat_integrate.d.ts.map +1 -0
- package/src/engine/physics/integration/quat_integrate.js +62 -0
- package/src/engine/physics/island/IslandBuilder.d.ts +167 -0
- package/src/engine/physics/island/IslandBuilder.d.ts.map +1 -0
- package/src/engine/physics/island/IslandBuilder.js +411 -0
- package/src/engine/physics/island/union_find.d.ts +51 -0
- package/src/engine/physics/island/union_find.d.ts.map +1 -0
- package/src/engine/physics/island/union_find.js +76 -0
- package/src/engine/physics/narrowphase/PosedShape.d.ts +51 -0
- package/src/engine/physics/narrowphase/PosedShape.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/PosedShape.js +108 -0
- package/src/engine/physics/narrowphase/box_box_manifold.d.ts +32 -0
- package/src/engine/physics/narrowphase/box_box_manifold.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/box_box_manifold.js +639 -0
- package/src/engine/physics/narrowphase/box_triangle_contact.d.ts +30 -0
- package/src/engine/physics/narrowphase/box_triangle_contact.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/box_triangle_contact.js +811 -0
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts +122 -0
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/capsule_contacts.js +462 -0
- package/src/engine/physics/narrowphase/capsule_triangle_contact.d.ts +71 -0
- package/src/engine/physics/narrowphase/capsule_triangle_contact.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/capsule_triangle_contact.js +375 -0
- package/src/engine/physics/narrowphase/compute_penetration.d.ts +91 -0
- package/src/engine/physics/narrowphase/compute_penetration.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/compute_penetration.js +396 -0
- package/src/engine/physics/narrowphase/decomposition/aabb_world_to_local.d.ts +35 -0
- package/src/engine/physics/narrowphase/decomposition/aabb_world_to_local.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/decomposition/aabb_world_to_local.js +80 -0
- package/src/engine/physics/narrowphase/decomposition/decompose_to_triangles.d.ts +31 -0
- package/src/engine/physics/narrowphase/decomposition/decompose_to_triangles.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/decomposition/decompose_to_triangles.js +55 -0
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts +42 -0
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.js +204 -0
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts +42 -0
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/decomposition/mesh_enumerate_triangles.js +94 -0
- package/src/engine/physics/narrowphase/decomposition/triangle_buffer_layout.d.ts +37 -0
- package/src/engine/physics/narrowphase/decomposition/triangle_buffer_layout.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/decomposition/triangle_buffer_layout.js +37 -0
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts +17 -0
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/narrowphase_step.js +1422 -0
- package/src/engine/physics/narrowphase/sphere_box_contact.d.ts +38 -0
- package/src/engine/physics/narrowphase/sphere_box_contact.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/sphere_box_contact.js +123 -0
- package/src/engine/physics/narrowphase/sphere_sphere_contact.d.ts +26 -0
- package/src/engine/physics/narrowphase/sphere_sphere_contact.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/sphere_sphere_contact.js +51 -0
- package/src/engine/physics/narrowphase/sphere_triangle_contact.d.ts +48 -0
- package/src/engine/physics/narrowphase/sphere_triangle_contact.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/sphere_triangle_contact.js +143 -0
- package/src/engine/physics/queries/PhysicsSurfacePoint.d.ts +83 -0
- package/src/engine/physics/queries/PhysicsSurfacePoint.d.ts.map +1 -0
- package/src/engine/physics/queries/PhysicsSurfacePoint.js +100 -0
- package/src/engine/physics/queries/overlap_shape.d.ts +51 -0
- package/src/engine/physics/queries/overlap_shape.d.ts.map +1 -0
- package/src/engine/physics/queries/overlap_shape.js +183 -0
- package/src/engine/physics/queries/raycast.d.ts +20 -0
- package/src/engine/physics/queries/raycast.d.ts.map +1 -0
- package/src/engine/physics/queries/raycast.js +249 -0
- package/src/engine/physics/queries/shape_cast.d.ts +56 -0
- package/src/engine/physics/queries/shape_cast.d.ts.map +1 -0
- package/src/engine/physics/queries/shape_cast.js +387 -0
- package/src/engine/physics/solver/friction_cone.d.ts +16 -0
- package/src/engine/physics/solver/friction_cone.d.ts.map +1 -0
- package/src/engine/physics/solver/friction_cone.js +37 -0
- package/src/engine/physics/solver/solve_contacts.d.ts +122 -0
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -0
- package/src/engine/physics/solver/solve_contacts.js +1016 -0
- package/src/core/geom/3d/topology/struct/binary/io/edge/OrderedEdge.d.ts +0 -34
- package/src/core/geom/3d/topology/struct/binary/io/edge/OrderedEdge.d.ts.map +0 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/OrderedEdge.js +0 -66
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_calc_edges.d.ts +0 -2
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_calc_edges.d.ts.map +0 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/bt_mesh_calc_edges.js +0 -54
- package/src/core/geom/3d/topology/struct/binary/io/edge/get_or_create_edge_map.d.ts +0 -2
- package/src/core/geom/3d/topology/struct/binary/io/edge/get_or_create_edge_map.d.ts.map +0 -1
- package/src/core/geom/3d/topology/struct/binary/io/edge/get_or_create_edge_map.js +0 -26
- package/src/engine/ecs/components/Motion.d.ts +0 -21
- package/src/engine/ecs/components/Motion.d.ts.map +0 -1
- package/src/engine/ecs/components/Motion.js +0 -27
- package/src/engine/ecs/components/MotionSerializationAdapter.d.ts +0 -20
- package/src/engine/ecs/components/MotionSerializationAdapter.d.ts.map +0 -1
- package/src/engine/ecs/components/MotionSerializationAdapter.js +0 -26
- package/src/engine/ecs/systems/MotionSystem.d.ts +0 -9
- package/src/engine/ecs/systems/MotionSystem.d.ts.map +0 -1
- package/src/engine/ecs/systems/MotionSystem.js +0 -29
- package/src/engine/physics/fluid/Fluid.d.ts +0 -26
- package/src/engine/physics/fluid/Fluid.d.ts.map +0 -1
- package/src/engine/physics/fluid/Fluid.js +0 -221
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_reverse.d.ts +0 -7
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_reverse.d.ts.map +0 -1
- package/src/engine/physics/fluid/solver/v3_grid_apply_advection_reverse.js +0 -8
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buffer-backed flyweight triangle shape.
|
|
3
|
+
*
|
|
4
|
+
* Vertex data is NOT stored on the instance — instead the triangle binds
|
|
5
|
+
* to a region of an external Float64 buffer via {@link bind}, reading
|
|
6
|
+
* 9 consecutive floats (vA.xyz, vB.xyz, vC.xyz) at the bound offset.
|
|
7
|
+
*
|
|
8
|
+
* Pattern: the narrowphase keeps one persistent `Triangle3D` per side of
|
|
9
|
+
* a contact pair and rebinds its offset while iterating decomposed
|
|
10
|
+
* triangles from a non-convex shape's enumerator. Zero allocations per
|
|
11
|
+
* iteration step — the cost of "another triangle" is a single integer
|
|
12
|
+
* offset change.
|
|
13
|
+
*
|
|
14
|
+
* The shape is convex (a triangle is the canonical 2-simplex in 3D, and
|
|
15
|
+
* GJK handles 2-simplices natively). It's degenerate in the sense that
|
|
16
|
+
* `volume = 0` and `contains_point` is always false — a triangle is a
|
|
17
|
+
* 2D surface in 3D space, no interior.
|
|
18
|
+
*
|
|
19
|
+
* @author Alex Goldring
|
|
20
|
+
* @copyright Company Named Limited (c) 2026
|
|
21
|
+
*/
|
|
22
|
+
export class Triangle3D extends AbstractShape3D {
|
|
23
|
+
/**
|
|
24
|
+
* Convenience constructor for tests and one-off triangles.
|
|
25
|
+
* Allocates a private 9-float buffer; for hot paths use {@link bind}
|
|
26
|
+
* against a shared buffer instead.
|
|
27
|
+
*
|
|
28
|
+
* @param {number} ax
|
|
29
|
+
* @param {number} ay
|
|
30
|
+
* @param {number} az
|
|
31
|
+
* @param {number} bx
|
|
32
|
+
* @param {number} by
|
|
33
|
+
* @param {number} bz
|
|
34
|
+
* @param {number} cx
|
|
35
|
+
* @param {number} cy
|
|
36
|
+
* @param {number} cz
|
|
37
|
+
* @returns {Triangle3D}
|
|
38
|
+
*/
|
|
39
|
+
static from(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number): Triangle3D;
|
|
40
|
+
/**
|
|
41
|
+
* External buffer holding vertex data.
|
|
42
|
+
* @type {Float64Array | null}
|
|
43
|
+
*/
|
|
44
|
+
buffer: Float64Array | null;
|
|
45
|
+
/**
|
|
46
|
+
* Float-index of vA.x in {@link buffer}. The other 8 floats
|
|
47
|
+
* (vA.yz, vB.xyz, vC.xyz) follow consecutively.
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
offset: number;
|
|
51
|
+
/**
|
|
52
|
+
* Bind this triangle to a region of an external buffer. Reads 9
|
|
53
|
+
* consecutive floats starting at `offset`.
|
|
54
|
+
*
|
|
55
|
+
* @param {Float64Array} buffer
|
|
56
|
+
* @param {number} offset float-index of vA.x in the buffer
|
|
57
|
+
* @returns {Triangle3D} this (for chaining)
|
|
58
|
+
*/
|
|
59
|
+
bind(buffer: Float64Array, offset: number): Triangle3D;
|
|
60
|
+
support(result: any, result_offset: any, direction_x: any, direction_y: any, direction_z: any): void;
|
|
61
|
+
compute_bounding_box(result: any): void;
|
|
62
|
+
/**
|
|
63
|
+
* A triangle has zero interior volume.
|
|
64
|
+
*/
|
|
65
|
+
contains_point(_point: any): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Signed distance has a well-defined sign relative to the triangle's
|
|
68
|
+
* face plane: positive on the side that the face normal points to
|
|
69
|
+
* (normal = (B-A) × (C-A), CCW convention), negative on the other.
|
|
70
|
+
*
|
|
71
|
+
* Magnitude is the true point-to-triangle distance (handles vertex,
|
|
72
|
+
* edge, and face Voronoi regions correctly via
|
|
73
|
+
* {@link computeTriangleClosestPointToPointBarycentric}).
|
|
74
|
+
*/
|
|
75
|
+
signed_distance_at_point(point: any): number;
|
|
76
|
+
nearest_point_on_surface(result: any, reference: any): void;
|
|
77
|
+
/**
|
|
78
|
+
* Uniform random barycentric sample within the triangle.
|
|
79
|
+
* Triangles have no interior, so the sample lies on the surface.
|
|
80
|
+
*/
|
|
81
|
+
sample_random_point_in_volume(result: any, result_offset: any, random: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* @param {Triangle3D} other
|
|
84
|
+
* @returns {boolean}
|
|
85
|
+
*/
|
|
86
|
+
equals(other: Triangle3D): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Fast type-check marker.
|
|
89
|
+
* @readonly
|
|
90
|
+
* @type {boolean}
|
|
91
|
+
*/
|
|
92
|
+
readonly isTriangle3D: boolean;
|
|
93
|
+
}
|
|
94
|
+
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
95
|
+
//# sourceMappingURL=Triangle3D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Triangle3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/Triangle3D.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAmCI;;;;;;;;;;;;;;;OAeG;IACH,gBAXW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,UAAU,CAWtB;IAxDG;;;OAGG;IACH,QAFU,YAAY,GAAG,IAAI,CAEX;IAElB;;;;OAIG;IACH,QAFU,MAAM,CAED;IAGnB;;;;;;;OAOG;IACH,aAJW,YAAY,UACZ,MAAM,GACJ,UAAU,CAStB;IA6BD,qGAyBC;IAED,wCAeC;IAED;;OAEG;IACH,qCAEC;IAED;;;;;;;;OAQG;IACH,6CA4CC;IAED,4DAwBC;IAED;;;OAGG;IACH,kFAsBC;IAwBD;;;OAGG;IACH,cAHW,UAAU,GACR,OAAO,CAenB;IAgBL;;;;OAIG;IACH,uBAFU,OAAO,CAEgB;CAPhC;gCA1S+B,sBAAsB"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
import { computeHashFloat } from "../../../primitives/numbers/computeHashFloat.js";
|
|
3
|
+
import { v3_length } from "../../vec3/v3_length.js";
|
|
4
|
+
import { computeTriangleClosestPointToPointBarycentric } from "../triangle/computeTriangleClosestPointToPointBarycentric.js";
|
|
5
|
+
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Buffer-backed flyweight triangle shape.
|
|
9
|
+
*
|
|
10
|
+
* Vertex data is NOT stored on the instance — instead the triangle binds
|
|
11
|
+
* to a region of an external Float64 buffer via {@link bind}, reading
|
|
12
|
+
* 9 consecutive floats (vA.xyz, vB.xyz, vC.xyz) at the bound offset.
|
|
13
|
+
*
|
|
14
|
+
* Pattern: the narrowphase keeps one persistent `Triangle3D` per side of
|
|
15
|
+
* a contact pair and rebinds its offset while iterating decomposed
|
|
16
|
+
* triangles from a non-convex shape's enumerator. Zero allocations per
|
|
17
|
+
* iteration step — the cost of "another triangle" is a single integer
|
|
18
|
+
* offset change.
|
|
19
|
+
*
|
|
20
|
+
* The shape is convex (a triangle is the canonical 2-simplex in 3D, and
|
|
21
|
+
* GJK handles 2-simplices natively). It's degenerate in the sense that
|
|
22
|
+
* `volume = 0` and `contains_point` is always false — a triangle is a
|
|
23
|
+
* 2D surface in 3D space, no interior.
|
|
24
|
+
*
|
|
25
|
+
* @author Alex Goldring
|
|
26
|
+
* @copyright Company Named Limited (c) 2026
|
|
27
|
+
*/
|
|
28
|
+
export class Triangle3D extends AbstractShape3D {
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* External buffer holding vertex data.
|
|
34
|
+
* @type {Float64Array | null}
|
|
35
|
+
*/
|
|
36
|
+
this.buffer = null;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Float-index of vA.x in {@link buffer}. The other 8 floats
|
|
40
|
+
* (vA.yz, vB.xyz, vC.xyz) follow consecutively.
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
43
|
+
this.offset = 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Bind this triangle to a region of an external buffer. Reads 9
|
|
48
|
+
* consecutive floats starting at `offset`.
|
|
49
|
+
*
|
|
50
|
+
* @param {Float64Array} buffer
|
|
51
|
+
* @param {number} offset float-index of vA.x in the buffer
|
|
52
|
+
* @returns {Triangle3D} this (for chaining)
|
|
53
|
+
*/
|
|
54
|
+
bind(buffer, offset) {
|
|
55
|
+
assert.isNonNegativeInteger(offset, "offset");
|
|
56
|
+
|
|
57
|
+
this.buffer = buffer;
|
|
58
|
+
this.offset = offset;
|
|
59
|
+
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Convenience constructor for tests and one-off triangles.
|
|
65
|
+
* Allocates a private 9-float buffer; for hot paths use {@link bind}
|
|
66
|
+
* against a shared buffer instead.
|
|
67
|
+
*
|
|
68
|
+
* @param {number} ax
|
|
69
|
+
* @param {number} ay
|
|
70
|
+
* @param {number} az
|
|
71
|
+
* @param {number} bx
|
|
72
|
+
* @param {number} by
|
|
73
|
+
* @param {number} bz
|
|
74
|
+
* @param {number} cx
|
|
75
|
+
* @param {number} cy
|
|
76
|
+
* @param {number} cz
|
|
77
|
+
* @returns {Triangle3D}
|
|
78
|
+
*/
|
|
79
|
+
static from(ax, ay, az, bx, by, bz, cx, cy, cz) {
|
|
80
|
+
const buf = new Float64Array(9);
|
|
81
|
+
buf[0] = ax; buf[1] = ay; buf[2] = az;
|
|
82
|
+
buf[3] = bx; buf[4] = by; buf[5] = bz;
|
|
83
|
+
buf[6] = cx; buf[7] = cy; buf[8] = cz;
|
|
84
|
+
|
|
85
|
+
const t = new Triangle3D();
|
|
86
|
+
t.bind(buf, 0);
|
|
87
|
+
return t;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
support(result, result_offset, direction_x, direction_y, direction_z) {
|
|
91
|
+
const b = this.buffer;
|
|
92
|
+
const o = this.offset;
|
|
93
|
+
|
|
94
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
95
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
96
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
97
|
+
|
|
98
|
+
const da = ax * direction_x + ay * direction_y + az * direction_z;
|
|
99
|
+
const db = bx * direction_x + by * direction_y + bz * direction_z;
|
|
100
|
+
const dc = cx * direction_x + cy * direction_y + cz * direction_z;
|
|
101
|
+
|
|
102
|
+
if (da >= db && da >= dc) {
|
|
103
|
+
result[result_offset ] = ax;
|
|
104
|
+
result[result_offset + 1] = ay;
|
|
105
|
+
result[result_offset + 2] = az;
|
|
106
|
+
} else if (db >= dc) {
|
|
107
|
+
result[result_offset ] = bx;
|
|
108
|
+
result[result_offset + 1] = by;
|
|
109
|
+
result[result_offset + 2] = bz;
|
|
110
|
+
} else {
|
|
111
|
+
result[result_offset ] = cx;
|
|
112
|
+
result[result_offset + 1] = cy;
|
|
113
|
+
result[result_offset + 2] = cz;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
compute_bounding_box(result) {
|
|
118
|
+
const b = this.buffer;
|
|
119
|
+
const o = this.offset;
|
|
120
|
+
|
|
121
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
122
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
123
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
124
|
+
|
|
125
|
+
result[0] = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx);
|
|
126
|
+
result[1] = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy);
|
|
127
|
+
result[2] = az < bz ? (az < cz ? az : cz) : (bz < cz ? bz : cz);
|
|
128
|
+
|
|
129
|
+
result[3] = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx);
|
|
130
|
+
result[4] = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
|
|
131
|
+
result[5] = az > bz ? (az > cz ? az : cz) : (bz > cz ? bz : cz);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* A triangle has zero interior volume.
|
|
136
|
+
*/
|
|
137
|
+
contains_point(_point) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Signed distance has a well-defined sign relative to the triangle's
|
|
143
|
+
* face plane: positive on the side that the face normal points to
|
|
144
|
+
* (normal = (B-A) × (C-A), CCW convention), negative on the other.
|
|
145
|
+
*
|
|
146
|
+
* Magnitude is the true point-to-triangle distance (handles vertex,
|
|
147
|
+
* edge, and face Voronoi regions correctly via
|
|
148
|
+
* {@link computeTriangleClosestPointToPointBarycentric}).
|
|
149
|
+
*/
|
|
150
|
+
signed_distance_at_point(point) {
|
|
151
|
+
const b = this.buffer;
|
|
152
|
+
const o = this.offset;
|
|
153
|
+
|
|
154
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
155
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
156
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
157
|
+
|
|
158
|
+
const px = point[0]; const py = point[1]; const pz = point[2];
|
|
159
|
+
|
|
160
|
+
computeTriangleClosestPointToPointBarycentric(
|
|
161
|
+
scratch_bary, 0,
|
|
162
|
+
px, py, pz,
|
|
163
|
+
ax, ay, az,
|
|
164
|
+
bx, by, bz,
|
|
165
|
+
cx, cy, cz
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// result format: [alpha_A, alpha_B]; alpha_C = 1 - alpha_A - alpha_B
|
|
169
|
+
const alpha_a = scratch_bary[0];
|
|
170
|
+
const alpha_b = scratch_bary[1];
|
|
171
|
+
const alpha_c = 1 - alpha_a - alpha_b;
|
|
172
|
+
|
|
173
|
+
const closest_x = alpha_a * ax + alpha_b * bx + alpha_c * cx;
|
|
174
|
+
const closest_y = alpha_a * ay + alpha_b * by + alpha_c * cy;
|
|
175
|
+
const closest_z = alpha_a * az + alpha_b * bz + alpha_c * cz;
|
|
176
|
+
|
|
177
|
+
const dx = px - closest_x;
|
|
178
|
+
const dy = py - closest_y;
|
|
179
|
+
const dz = pz - closest_z;
|
|
180
|
+
|
|
181
|
+
const distance = v3_length(dx, dy, dz);
|
|
182
|
+
|
|
183
|
+
// face normal = (B - A) × (C - A) — CCW convention
|
|
184
|
+
const e1x = bx - ax; const e1y = by - ay; const e1z = bz - az;
|
|
185
|
+
const e2x = cx - ax; const e2y = cy - ay; const e2z = cz - az;
|
|
186
|
+
|
|
187
|
+
const nx = e1y * e2z - e1z * e2y;
|
|
188
|
+
const ny = e1z * e2x - e1x * e2z;
|
|
189
|
+
const nz = e1x * e2y - e1y * e2x;
|
|
190
|
+
|
|
191
|
+
const side = (px - ax) * nx + (py - ay) * ny + (pz - az) * nz;
|
|
192
|
+
|
|
193
|
+
return side >= 0 ? distance : -distance;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
nearest_point_on_surface(result, reference) {
|
|
197
|
+
const b = this.buffer;
|
|
198
|
+
const o = this.offset;
|
|
199
|
+
|
|
200
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
201
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
202
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
203
|
+
|
|
204
|
+
computeTriangleClosestPointToPointBarycentric(
|
|
205
|
+
scratch_bary, 0,
|
|
206
|
+
reference[0], reference[1], reference[2],
|
|
207
|
+
ax, ay, az,
|
|
208
|
+
bx, by, bz,
|
|
209
|
+
cx, cy, cz
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
// result format: [alpha_A, alpha_B]; alpha_C = 1 - alpha_A - alpha_B
|
|
213
|
+
const alpha_a = scratch_bary[0];
|
|
214
|
+
const alpha_b = scratch_bary[1];
|
|
215
|
+
const alpha_c = 1 - alpha_a - alpha_b;
|
|
216
|
+
|
|
217
|
+
result[0] = alpha_a * ax + alpha_b * bx + alpha_c * cx;
|
|
218
|
+
result[1] = alpha_a * ay + alpha_b * by + alpha_c * cy;
|
|
219
|
+
result[2] = alpha_a * az + alpha_b * bz + alpha_c * cz;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Uniform random barycentric sample within the triangle.
|
|
224
|
+
* Triangles have no interior, so the sample lies on the surface.
|
|
225
|
+
*/
|
|
226
|
+
sample_random_point_in_volume(result, result_offset, random) {
|
|
227
|
+
let r1 = random();
|
|
228
|
+
let r2 = random();
|
|
229
|
+
|
|
230
|
+
// unit-square reflection trick for uniform-barycentric sampling
|
|
231
|
+
if (r1 + r2 > 1) {
|
|
232
|
+
r1 = 1 - r1;
|
|
233
|
+
r2 = 1 - r2;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const r0 = 1 - r1 - r2;
|
|
237
|
+
|
|
238
|
+
const b = this.buffer;
|
|
239
|
+
const o = this.offset;
|
|
240
|
+
|
|
241
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
242
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
243
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
244
|
+
|
|
245
|
+
result[result_offset ] = r0 * ax + r1 * bx + r2 * cx;
|
|
246
|
+
result[result_offset + 1] = r0 * ay + r1 * by + r2 * cy;
|
|
247
|
+
result[result_offset + 2] = r0 * az + r1 * bz + r2 * cz;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
get volume() {
|
|
251
|
+
return 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
get surface_area() {
|
|
255
|
+
const b = this.buffer;
|
|
256
|
+
const o = this.offset;
|
|
257
|
+
|
|
258
|
+
const ax = b[o ]; const ay = b[o + 1]; const az = b[o + 2];
|
|
259
|
+
const bx = b[o + 3]; const by = b[o + 4]; const bz = b[o + 5];
|
|
260
|
+
const cx = b[o + 6]; const cy = b[o + 7]; const cz = b[o + 8];
|
|
261
|
+
|
|
262
|
+
const e1x = bx - ax; const e1y = by - ay; const e1z = bz - az;
|
|
263
|
+
const e2x = cx - ax; const e2y = cy - ay; const e2z = cz - az;
|
|
264
|
+
|
|
265
|
+
const nx = e1y * e2z - e1z * e2y;
|
|
266
|
+
const ny = e1z * e2x - e1x * e2z;
|
|
267
|
+
const nz = e1x * e2y - e1y * e2x;
|
|
268
|
+
|
|
269
|
+
return 0.5 * v3_length(nx, ny, nz);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @param {Triangle3D} other
|
|
274
|
+
* @returns {boolean}
|
|
275
|
+
*/
|
|
276
|
+
equals(other) {
|
|
277
|
+
if (!super.equals(other)) return false;
|
|
278
|
+
|
|
279
|
+
const a = this.buffer;
|
|
280
|
+
const ao = this.offset;
|
|
281
|
+
const b = other.buffer;
|
|
282
|
+
const bo = other.offset;
|
|
283
|
+
|
|
284
|
+
for (let i = 0; i < 9; i++) {
|
|
285
|
+
if (a[ao + i] !== b[bo + i]) return false;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
hash() {
|
|
292
|
+
const b = this.buffer;
|
|
293
|
+
const o = this.offset;
|
|
294
|
+
|
|
295
|
+
let h = 0;
|
|
296
|
+
|
|
297
|
+
for (let i = 0; i < 9; i++) {
|
|
298
|
+
h = ((h << 5) - h + computeHashFloat(b[o + i])) | 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return h;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Fast type-check marker.
|
|
307
|
+
* @readonly
|
|
308
|
+
* @type {boolean}
|
|
309
|
+
*/
|
|
310
|
+
Triangle3D.prototype.isTriangle3D = true;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Scratch for barycentric output from {@link computeTriangleClosestPointToPointBarycentric}.
|
|
314
|
+
* Module-scoped because every triangle method that needs barycentric
|
|
315
|
+
* coords does it strictly inline — no nested calls that could re-enter.
|
|
316
|
+
* @type {Float64Array}
|
|
317
|
+
*/
|
|
318
|
+
const scratch_bary = new Float64Array(2);
|
|
@@ -352,3 +352,16 @@ export class UnionShape3D extends AbstractShape3D {
|
|
|
352
352
|
return hash;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The set-union of convex shapes is convex only in the trivial cases (one
|
|
358
|
+
* child, or fully overlapping children). The general case is non-convex,
|
|
359
|
+
* so the narrowphase must decompose the union into its children and run
|
|
360
|
+
* per-child GJK against the other body, then merge the resulting contact
|
|
361
|
+
* manifolds. Treating the union as a single convex blob via GJK on a
|
|
362
|
+
* combined support would conflate distinct children into a fake hull.
|
|
363
|
+
*
|
|
364
|
+
* @readonly
|
|
365
|
+
* @type {boolean}
|
|
366
|
+
*/
|
|
367
|
+
UnionShape3D.prototype.is_convex = false;
|
|
@@ -1,12 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Unit cube centred at the origin, spanning `[-0.5, 0.5]` on every axis.
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Use {@link BoxShape3D} instead — UnitCubeShape3D is now a thin
|
|
5
|
+
* subclass that just pins `half_extents` to `(0.5, 0.5, 0.5)`. All geometry
|
|
6
|
+
* (`support`, `signed_distance_at_point`, `volume`, `surface_area`,
|
|
7
|
+
* `nearest_point_on_surface`, ...) is inherited from {@link BoxShape3D}.
|
|
8
|
+
*
|
|
9
|
+
* Kept only for:
|
|
10
|
+
* - the `UnitCubeShape3D.INSTANCE` shared singleton that scenes and tests
|
|
11
|
+
* embed by reference
|
|
12
|
+
* - the JSON `'cube'` type-tag round-trip in `shape_to_type` /
|
|
13
|
+
* `type_adapters` (an `instanceof` check, which is why we still need a
|
|
14
|
+
* distinct subclass rather than a constant `BoxShape3D` instance)
|
|
15
|
+
*
|
|
16
|
+
* For new code prefer:
|
|
17
|
+
* - `new BoxShape3D()` — also defaults to half-extents `(0.5, 0.5, 0.5)`
|
|
18
|
+
* - `BoxShape3D.from_size(w, h, d)` — express by full side lengths
|
|
19
|
+
* - `BoxShape3D.from(hx, hy, hz)` — express by half-extents
|
|
20
|
+
*/
|
|
21
|
+
export class UnitCubeShape3D extends BoxShape3D {
|
|
22
|
+
/**
|
|
23
|
+
* Shared singleton. Many call sites — JSON deserialisation, tests,
|
|
24
|
+
* `TransformedShape3D.from_translation(UnitCubeShape3D.INSTANCE, ...)`
|
|
25
|
+
* — embed this by reference rather than allocating a fresh cube.
|
|
26
|
+
* @type {UnitCubeShape3D}
|
|
27
|
+
*/
|
|
2
28
|
static INSTANCE: UnitCubeShape3D;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Prefer dispatching on `isBoxShape3D`, which is `true` for both
|
|
31
|
+
* UnitCubeShape3D (inherited via prototype chain) and {@link BoxShape3D}.
|
|
32
|
+
* Retained so any older external code that already narrowed via this marker
|
|
33
|
+
* keeps working.
|
|
34
|
+
* @readonly
|
|
35
|
+
* @type {boolean}
|
|
36
|
+
*/
|
|
37
|
+
readonly isUnitCubeShape3D: boolean;
|
|
10
38
|
}
|
|
11
|
-
import {
|
|
39
|
+
import { BoxShape3D } from "./BoxShape3D.js";
|
|
12
40
|
//# sourceMappingURL=UnitCubeShape3D.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnitCubeShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitCubeShape3D.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UnitCubeShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitCubeShape3D.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAKI;;;;;OAKG;IACH,iBAFU,eAAe,CAEe;IAG5C;;;;;;;OAOG;IACH,4BAFU,OAAO,CAE0B;CAV1C;2BAlC0B,iBAAiB"}
|
|
@@ -1,98 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
result[result_offset] = sign_not_zero(direction_x) * 0.5;
|
|
47
|
-
result[result_offset + 1] = sign_not_zero(direction_y) * 0.5;
|
|
48
|
-
result[result_offset + 2] = sign_not_zero(direction_z) * 0.5;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
signed_distance_gradient_at_point(result, point) {
|
|
52
|
-
return compute_signed_distance_gradient_by_sampling(result, this, point);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
signed_distance_at_point(point) {
|
|
56
|
-
/*
|
|
57
|
-
based on https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
|
|
58
|
-
original shader code:
|
|
59
|
-
------------
|
|
60
|
-
float sdBox( vec3 p, vec3 b )
|
|
61
|
-
{
|
|
62
|
-
vec3 q = abs(p) - b;
|
|
63
|
-
return length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0);
|
|
64
|
-
}
|
|
65
|
-
------------
|
|
66
|
-
*/
|
|
67
|
-
const q_x = Math.abs(point[0]) - 0.5;
|
|
68
|
-
const q_y = Math.abs(point[1]) - 0.5;
|
|
69
|
-
const q_z = Math.abs(point[2]) - 0.5;
|
|
70
|
-
|
|
71
|
-
return v3_length(
|
|
72
|
-
max2(q_x, 0),
|
|
73
|
-
max2(q_y, 0),
|
|
74
|
-
max2(q_z, 0)
|
|
75
|
-
) + min2(max3(q_x, q_y, q_z), 0);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
contains_point(point) {
|
|
79
|
-
const x = point[0];
|
|
80
|
-
const y = point[1];
|
|
81
|
-
const z = point[2];
|
|
82
|
-
|
|
83
|
-
return x > -0.5 && x < 0.5
|
|
84
|
-
&& y > -0.5 && y < 0.5
|
|
85
|
-
&& z > -0.5 && z < 0.5
|
|
86
|
-
;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
sample_random_point_in_volume(result, result_offset, random) {
|
|
90
|
-
randomPointInBox(random, result, result_offset);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
hash() {
|
|
94
|
-
return 1;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static INSTANCE = new UnitCubeShape3D();
|
|
98
|
-
}
|
|
1
|
+
import { BoxShape3D } from "./BoxShape3D.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Unit cube centred at the origin, spanning `[-0.5, 0.5]` on every axis.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Use {@link BoxShape3D} instead — UnitCubeShape3D is now a thin
|
|
7
|
+
* subclass that just pins `half_extents` to `(0.5, 0.5, 0.5)`. All geometry
|
|
8
|
+
* (`support`, `signed_distance_at_point`, `volume`, `surface_area`,
|
|
9
|
+
* `nearest_point_on_surface`, ...) is inherited from {@link BoxShape3D}.
|
|
10
|
+
*
|
|
11
|
+
* Kept only for:
|
|
12
|
+
* - the `UnitCubeShape3D.INSTANCE` shared singleton that scenes and tests
|
|
13
|
+
* embed by reference
|
|
14
|
+
* - the JSON `'cube'` type-tag round-trip in `shape_to_type` /
|
|
15
|
+
* `type_adapters` (an `instanceof` check, which is why we still need a
|
|
16
|
+
* distinct subclass rather than a constant `BoxShape3D` instance)
|
|
17
|
+
*
|
|
18
|
+
* For new code prefer:
|
|
19
|
+
* - `new BoxShape3D()` — also defaults to half-extents `(0.5, 0.5, 0.5)`
|
|
20
|
+
* - `BoxShape3D.from_size(w, h, d)` — express by full side lengths
|
|
21
|
+
* - `BoxShape3D.from(hx, hy, hz)` — express by half-extents
|
|
22
|
+
*/
|
|
23
|
+
export class UnitCubeShape3D extends BoxShape3D {
|
|
24
|
+
// No constructor / no method overrides on purpose. BoxShape3D's
|
|
25
|
+
// constructor already sets half_extents to (0.5, 0.5, 0.5), and every
|
|
26
|
+
// geometry method is correct for that case verbatim.
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Shared singleton. Many call sites — JSON deserialisation, tests,
|
|
30
|
+
* `TransformedShape3D.from_translation(UnitCubeShape3D.INSTANCE, ...)`
|
|
31
|
+
* — embed this by reference rather than allocating a fresh cube.
|
|
32
|
+
* @type {UnitCubeShape3D}
|
|
33
|
+
*/
|
|
34
|
+
static INSTANCE = new UnitCubeShape3D();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Prefer dispatching on `isBoxShape3D`, which is `true` for both
|
|
39
|
+
* UnitCubeShape3D (inherited via prototype chain) and {@link BoxShape3D}.
|
|
40
|
+
* Retained so any older external code that already narrowed via this marker
|
|
41
|
+
* keeps working.
|
|
42
|
+
* @readonly
|
|
43
|
+
* @type {boolean}
|
|
44
|
+
*/
|
|
45
|
+
UnitCubeShape3D.prototype.isUnitCubeShape3D = true;
|
|
@@ -9,6 +9,16 @@ export class UnitSphereShape3D extends AbstractShape3D {
|
|
|
9
9
|
signed_distance_at_point(point: any): number;
|
|
10
10
|
contains_point(point: any): boolean;
|
|
11
11
|
sample_random_point_in_volume(result: any, result_offset: any, random: any): void;
|
|
12
|
+
/**
|
|
13
|
+
* Fast type-check marker (mirrors {@link Transform.prototype.isTransform}). Lets
|
|
14
|
+
* downstream code dispatch on shape kind without instanceof / import coupling.
|
|
15
|
+
* Use case: physics narrowphase short-circuits sphere-sphere to a closed-form
|
|
16
|
+
* solution rather than running GJK+EPA on a smooth surface (which is the EPA
|
|
17
|
+
* degenerate case).
|
|
18
|
+
* @readonly
|
|
19
|
+
* @type {boolean}
|
|
20
|
+
*/
|
|
21
|
+
readonly isUnitSphereShape3D: boolean;
|
|
12
22
|
}
|
|
13
23
|
export namespace UnitSphereShape3D {
|
|
14
24
|
let INSTANCE: UnitSphereShape3D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnitSphereShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitSphereShape3D.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IASI,qGAQC;IAED,wCAQC;IAED,4DAYC;IAED,mEAEC;IAED,6CAMC;IAED,oCAMC;IAED,kFAEC;
|
|
1
|
+
{"version":3,"file":"UnitSphereShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitSphereShape3D.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IASI,qGAQC;IAED,wCAQC;IAED,4DAYC;IAED,mEAEC;IAED,6CAMC;IAED,oCAMC;IAED,kFAEC;IASL;;;;;;;;OAQG;IACH,8BAFU,OAAO,CAE8B;CAb9C;;;;gCA5E+B,sBAAsB"}
|
|
@@ -79,3 +79,14 @@ export class UnitSphereShape3D extends AbstractShape3D {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
UnitSphereShape3D.INSTANCE = new UnitSphereShape3D();
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Fast type-check marker (mirrors {@link Transform.prototype.isTransform}). Lets
|
|
85
|
+
* downstream code dispatch on shape kind without instanceof / import coupling.
|
|
86
|
+
* Use case: physics narrowphase short-circuits sphere-sphere to a closed-form
|
|
87
|
+
* solution rather than running GJK+EPA on a smooth surface (which is the EPA
|
|
88
|
+
* degenerate case).
|
|
89
|
+
* @readonly
|
|
90
|
+
* @type {boolean}
|
|
91
|
+
*/
|
|
92
|
+
UnitSphereShape3D.prototype.isUnitSphereShape3D = true;
|