@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,227 @@
|
|
|
1
|
+
import { assert } from "../../../../../../assert.js";
|
|
2
|
+
import { BVH, NULL_NODE } from "../../../../../../bvh2/bvh3/BVH.js";
|
|
3
|
+
import { bvh_query_user_data_ray } from "../../../../../../bvh2/bvh3/query/bvh_query_user_data_ray.js";
|
|
4
|
+
import { seededRandom } from "../../../../../../math/random/seededRandom.js";
|
|
5
|
+
import { SurfacePoint3 } from "../../../../SurfacePoint3.js";
|
|
6
|
+
import { computeTriangleRayIntersection } from "../../../../triangle/computeTriangleRayIntersection.js";
|
|
7
|
+
|
|
8
|
+
// Three irrational, mutually unrelated ray directions for parity ray-cast
|
|
9
|
+
// majority vote. Same scheme as tetrahedral_mesh_carve_outside_surface — a
|
|
10
|
+
// single ray is fragile at grazing edges, three independent rays settle the
|
|
11
|
+
// vote correctly except in vanishingly improbable configurations.
|
|
12
|
+
const RAY_DIRECTIONS = [
|
|
13
|
+
0.97123, 0.18927, 0.14431,
|
|
14
|
+
0.34219, 0.91283, -0.22971,
|
|
15
|
+
-0.51237, 0.27894, 0.81235,
|
|
16
|
+
];
|
|
17
|
+
const RAY_COUNT = RAY_DIRECTIONS.length / 3;
|
|
18
|
+
|
|
19
|
+
// Stratification offset cap (as a fraction of a cell). 0 = perfect grid
|
|
20
|
+
// (worst case for Delaunay sliver count), 0.5 = candidates can sit anywhere
|
|
21
|
+
// in the cell. 0.35 is the usual sweet spot: enough jitter to break all
|
|
22
|
+
// face/edge alignments without losing the locality benefits of the grid.
|
|
23
|
+
const JITTER = 0.35;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Build a BVH whose leaves are the surface's triangle faces. User data on
|
|
27
|
+
* each leaf is the source face ID.
|
|
28
|
+
*/
|
|
29
|
+
function build_surface_bvh(bvh, mesh) {
|
|
30
|
+
bvh.release_all();
|
|
31
|
+
|
|
32
|
+
const face_count = mesh.faces.size;
|
|
33
|
+
const v = [0, 0, 0];
|
|
34
|
+
|
|
35
|
+
for (let f = 0; f < face_count; f++) {
|
|
36
|
+
if (!mesh.faces.is_allocated(f)) continue;
|
|
37
|
+
|
|
38
|
+
const l0 = mesh.face_read_loop(f);
|
|
39
|
+
const l1 = mesh.loop_read_next(l0);
|
|
40
|
+
const l2 = mesh.loop_read_next(l1);
|
|
41
|
+
|
|
42
|
+
const v0 = mesh.loop_read_vertex(l0);
|
|
43
|
+
const v1 = mesh.loop_read_vertex(l1);
|
|
44
|
+
const v2 = mesh.loop_read_vertex(l2);
|
|
45
|
+
|
|
46
|
+
mesh.vertex_read_coordinate(v, 0, v0);
|
|
47
|
+
let minx = v[0], miny = v[1], minz = v[2];
|
|
48
|
+
let maxx = v[0], maxy = v[1], maxz = v[2];
|
|
49
|
+
|
|
50
|
+
mesh.vertex_read_coordinate(v, 0, v1);
|
|
51
|
+
if (v[0] < minx) minx = v[0]; else if (v[0] > maxx) maxx = v[0];
|
|
52
|
+
if (v[1] < miny) miny = v[1]; else if (v[1] > maxy) maxy = v[1];
|
|
53
|
+
if (v[2] < minz) minz = v[2]; else if (v[2] > maxz) maxz = v[2];
|
|
54
|
+
|
|
55
|
+
mesh.vertex_read_coordinate(v, 0, v2);
|
|
56
|
+
if (v[0] < minx) minx = v[0]; else if (v[0] > maxx) maxx = v[0];
|
|
57
|
+
if (v[1] < miny) miny = v[1]; else if (v[1] > maxy) maxy = v[1];
|
|
58
|
+
if (v[2] < minz) minz = v[2]; else if (v[2] > maxz) maxz = v[2];
|
|
59
|
+
|
|
60
|
+
const node = bvh.allocate_node();
|
|
61
|
+
bvh.node_set_user_data(node, f);
|
|
62
|
+
bvh.node_set_aabb_primitive(node, minx, miny, minz, maxx, maxy, maxz);
|
|
63
|
+
bvh.insert_leaf(node);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const ray_hit = new SurfacePoint3();
|
|
68
|
+
const ray_candidates = [];
|
|
69
|
+
const va = [0, 0, 0];
|
|
70
|
+
const vb = [0, 0, 0];
|
|
71
|
+
const vc = [0, 0, 0];
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Parity ray-cast across `RAY_COUNT` directions; majority decides
|
|
75
|
+
* inside/outside. Returns true if (strict majority of) rays cross the
|
|
76
|
+
* surface an odd number of times.
|
|
77
|
+
*/
|
|
78
|
+
function point_is_inside(mesh, bvh, ox, oy, oz) {
|
|
79
|
+
const root = bvh.root;
|
|
80
|
+
if (root === NULL_NODE) return false;
|
|
81
|
+
|
|
82
|
+
let inside_votes = 0;
|
|
83
|
+
|
|
84
|
+
for (let r = 0; r < RAY_COUNT; r++) {
|
|
85
|
+
const dx = RAY_DIRECTIONS[r * 3];
|
|
86
|
+
const dy = RAY_DIRECTIONS[r * 3 + 1];
|
|
87
|
+
const dz = RAY_DIRECTIONS[r * 3 + 2];
|
|
88
|
+
|
|
89
|
+
const candidate_count = bvh_query_user_data_ray(
|
|
90
|
+
bvh, root,
|
|
91
|
+
ray_candidates, 0,
|
|
92
|
+
ox, oy, oz,
|
|
93
|
+
dx, dy, dz
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
let hits = 0;
|
|
97
|
+
for (let i = 0; i < candidate_count; i++) {
|
|
98
|
+
const f = ray_candidates[i];
|
|
99
|
+
const l0 = mesh.face_read_loop(f);
|
|
100
|
+
const l1 = mesh.loop_read_next(l0);
|
|
101
|
+
const l2 = mesh.loop_read_next(l1);
|
|
102
|
+
|
|
103
|
+
mesh.vertex_read_coordinate(va, 0, mesh.loop_read_vertex(l0));
|
|
104
|
+
mesh.vertex_read_coordinate(vb, 0, mesh.loop_read_vertex(l1));
|
|
105
|
+
mesh.vertex_read_coordinate(vc, 0, mesh.loop_read_vertex(l2));
|
|
106
|
+
|
|
107
|
+
const hit = computeTriangleRayIntersection(
|
|
108
|
+
ray_hit,
|
|
109
|
+
ox, oy, oz,
|
|
110
|
+
dx, dy, dz,
|
|
111
|
+
va[0], va[1], va[2],
|
|
112
|
+
vb[0], vb[1], vb[2],
|
|
113
|
+
vc[0], vc[1], vc[2]
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
if (hit) hits++;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if ((hits & 1) === 1) inside_votes++;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return inside_votes * 2 > RAY_COUNT;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Sample interior Steiner points for the volume enclosed by a closed
|
|
127
|
+
* triangle surface, on a jittered axis-aligned grid sized by
|
|
128
|
+
* `cells_per_dim`. Points outside the surface are discarded; what remains
|
|
129
|
+
* is a Float32Array of (x, y, z) tuples that lies strictly inside the
|
|
130
|
+
* surface (modulo classification noise on near-surface samples).
|
|
131
|
+
*
|
|
132
|
+
* Intended as input to `compute_delaunay_tetrahedral_mesh` alongside the
|
|
133
|
+
* surface vertices, so the Delaunay tet mesh has interior detail rather
|
|
134
|
+
* than being made entirely of surface-bound tets. Without these Steiner
|
|
135
|
+
* points, every tet of a non-trivial volume straddles or touches the
|
|
136
|
+
* surface, blowing up centroid-classification discretization error in
|
|
137
|
+
* the carving step.
|
|
138
|
+
*
|
|
139
|
+
* Grid cells are scaled so the longest bounding-box axis gets
|
|
140
|
+
* `cells_per_dim` cells; other axes get a proportional share rounded to
|
|
141
|
+
* the nearest integer (minimum 1). Each cell contributes one candidate
|
|
142
|
+
* point at its center, perturbed by a deterministic seeded jitter of up
|
|
143
|
+
* to ±0.35 cell widths — enough to break Delaunay-pathological
|
|
144
|
+
* alignments without losing the grid's spatial uniformity.
|
|
145
|
+
*
|
|
146
|
+
* @param {BinaryTopology} mesh closed surface
|
|
147
|
+
* @param {number} cells_per_dim grid resolution along the longest bbox axis
|
|
148
|
+
* @param {number} [seed] seed for the jitter RNG; same seed → same points
|
|
149
|
+
* @returns {Float32Array} flat (x, y, z) interior point positions
|
|
150
|
+
*/
|
|
151
|
+
export function bt_mesh_sample_interior_grid_points(mesh, cells_per_dim, seed = 0) {
|
|
152
|
+
assert.defined(mesh, 'mesh');
|
|
153
|
+
assert.equal(mesh.isBinaryTopology, true, 'mesh.isBinaryTopology !== true');
|
|
154
|
+
assert.isPositiveInteger(cells_per_dim, 'cells_per_dim');
|
|
155
|
+
|
|
156
|
+
// Compute bounding box from vertex pool.
|
|
157
|
+
const vertices = mesh.vertices;
|
|
158
|
+
const vertex_count = vertices.size;
|
|
159
|
+
const coord = [0, 0, 0];
|
|
160
|
+
|
|
161
|
+
let min_x = Infinity, min_y = Infinity, min_z = Infinity;
|
|
162
|
+
let max_x = -Infinity, max_y = -Infinity, max_z = -Infinity;
|
|
163
|
+
|
|
164
|
+
for (let v = 0; v < vertex_count; v++) {
|
|
165
|
+
if (!vertices.is_allocated(v)) continue;
|
|
166
|
+
mesh.vertex_read_coordinate(coord, 0, v);
|
|
167
|
+
if (coord[0] < min_x) min_x = coord[0]; if (coord[0] > max_x) max_x = coord[0];
|
|
168
|
+
if (coord[1] < min_y) min_y = coord[1]; if (coord[1] > max_y) max_y = coord[1];
|
|
169
|
+
if (coord[2] < min_z) min_z = coord[2]; if (coord[2] > max_z) max_z = coord[2];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!isFinite(min_x)) {
|
|
173
|
+
// Empty mesh.
|
|
174
|
+
return new Float32Array(0);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const dx = max_x - min_x;
|
|
178
|
+
const dy = max_y - min_y;
|
|
179
|
+
const dz = max_z - min_z;
|
|
180
|
+
const longest = Math.max(dx, dy, dz);
|
|
181
|
+
|
|
182
|
+
if (longest === 0) {
|
|
183
|
+
// Degenerate: all vertices coincide. No interior to sample.
|
|
184
|
+
return new Float32Array(0);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Per-axis cell count, rounded so cells are roughly cubical.
|
|
188
|
+
const cells_x = Math.max(1, Math.round((cells_per_dim * dx) / longest));
|
|
189
|
+
const cells_y = Math.max(1, Math.round((cells_per_dim * dy) / longest));
|
|
190
|
+
const cells_z = Math.max(1, Math.round((cells_per_dim * dz) / longest));
|
|
191
|
+
|
|
192
|
+
const cell_w = dx / cells_x;
|
|
193
|
+
const cell_h = dy / cells_y;
|
|
194
|
+
const cell_d = dz / cells_z;
|
|
195
|
+
|
|
196
|
+
// Build BVH over surface triangles for the inside-test.
|
|
197
|
+
const bvh = new BVH();
|
|
198
|
+
build_surface_bvh(bvh, mesh);
|
|
199
|
+
|
|
200
|
+
const rng = seededRandom(seed);
|
|
201
|
+
const out = []; // grow dynamically; copy to Float32Array at the end
|
|
202
|
+
|
|
203
|
+
for (let iz = 0; iz < cells_z; iz++) {
|
|
204
|
+
const cz0 = min_z + (iz + 0.5) * cell_d;
|
|
205
|
+
for (let iy = 0; iy < cells_y; iy++) {
|
|
206
|
+
const cy0 = min_y + (iy + 0.5) * cell_h;
|
|
207
|
+
for (let ix = 0; ix < cells_x; ix++) {
|
|
208
|
+
const cx0 = min_x + (ix + 0.5) * cell_w;
|
|
209
|
+
|
|
210
|
+
// Jitter each axis independently within ±JITTER cells.
|
|
211
|
+
const jx = (rng() * 2 - 1) * JITTER * cell_w;
|
|
212
|
+
const jy = (rng() * 2 - 1) * JITTER * cell_h;
|
|
213
|
+
const jz = (rng() * 2 - 1) * JITTER * cell_d;
|
|
214
|
+
|
|
215
|
+
const px = cx0 + jx;
|
|
216
|
+
const py = cy0 + jy;
|
|
217
|
+
const pz = cz0 + jz;
|
|
218
|
+
|
|
219
|
+
if (point_is_inside(mesh, bvh, px, py, pz)) {
|
|
220
|
+
out.push(px, py, pz);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return new Float32Array(out);
|
|
227
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumerate the boundary edge cycles of a BinaryTopology mesh as ordered
|
|
3
|
+
* sequences of edge IDs. Each cycle traces a single hole in the surface, in
|
|
4
|
+
* the order the edges appear along the boundary.
|
|
5
|
+
*
|
|
6
|
+
* Throws if any boundary vertex has more than two boundary edges (figure-8 /
|
|
7
|
+
* bridged loops are not supported in this pass — repair the mesh first).
|
|
8
|
+
*
|
|
9
|
+
* @param {BinaryTopology} mesh
|
|
10
|
+
* @returns {number[][]} array of cycles; each cycle is an array of boundary edge IDs
|
|
11
|
+
*/
|
|
12
|
+
export function bt_mesh_walk_boundary_loops(mesh: BinaryTopology): number[][];
|
|
13
|
+
//# sourceMappingURL=bt_mesh_walk_boundary_loops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_mesh_walk_boundary_loops.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/query/bt_mesh_walk_boundary_loops.js"],"names":[],"mappings":"AAwDA;;;;;;;;;;GAUG;AACH,mEAFa,MAAM,EAAE,EAAE,CA0CtB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { NULL_POINTER } from "../BinaryTopology.js";
|
|
2
|
+
import { bt_query_edge_is_boundary } from "./bt_query_edge_is_boundary.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Step one position around the disk cycle of `vertex`, starting from `edge`.
|
|
6
|
+
* @param {BinaryTopology} mesh
|
|
7
|
+
* @param {number} edge
|
|
8
|
+
* @param {number} vertex
|
|
9
|
+
* @returns {number} next edge in the disk cycle around `vertex`
|
|
10
|
+
*/
|
|
11
|
+
function disk_next(mesh, edge, vertex) {
|
|
12
|
+
if (mesh.edge_read_vertex1(edge) === vertex) {
|
|
13
|
+
return mesh.edge_read_v1_disk_next(edge);
|
|
14
|
+
}
|
|
15
|
+
return mesh.edge_read_v2_disk_next(edge);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Find the unique boundary edge incident to `vertex` other than `from_edge`.
|
|
20
|
+
* Throws if the vertex does not have exactly 2 boundary edges (a 2-manifold
|
|
21
|
+
* boundary vertex must have exactly 2; fewer or more means the boundary is
|
|
22
|
+
* not a simple cycle — e.g., a figure-8 / bridged pinch).
|
|
23
|
+
*
|
|
24
|
+
* @param {BinaryTopology} mesh
|
|
25
|
+
* @param {number} vertex
|
|
26
|
+
* @param {number} from_edge
|
|
27
|
+
* @returns {number}
|
|
28
|
+
*/
|
|
29
|
+
function next_boundary_edge_at_vertex(mesh, vertex, from_edge) {
|
|
30
|
+
const first_edge = mesh.vertex_read_edge(vertex);
|
|
31
|
+
|
|
32
|
+
let found = NULL_POINTER;
|
|
33
|
+
let extras = 0;
|
|
34
|
+
|
|
35
|
+
let edge = first_edge;
|
|
36
|
+
do {
|
|
37
|
+
if (edge !== from_edge && bt_query_edge_is_boundary(mesh, edge)) {
|
|
38
|
+
if (found === NULL_POINTER) {
|
|
39
|
+
found = edge;
|
|
40
|
+
} else {
|
|
41
|
+
extras++;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
edge = disk_next(mesh, edge, vertex);
|
|
45
|
+
} while (edge !== first_edge);
|
|
46
|
+
|
|
47
|
+
if (found === NULL_POINTER) {
|
|
48
|
+
throw new Error(`boundary at vertex ${vertex} is malformed: only one boundary edge attached (dead-end)`);
|
|
49
|
+
}
|
|
50
|
+
if (extras > 0) {
|
|
51
|
+
throw new Error(`boundary at vertex ${vertex} is malformed: ${extras + 2} boundary edges attached (pinch / figure-8 loops are not supported)`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return found;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Enumerate the boundary edge cycles of a BinaryTopology mesh as ordered
|
|
59
|
+
* sequences of edge IDs. Each cycle traces a single hole in the surface, in
|
|
60
|
+
* the order the edges appear along the boundary.
|
|
61
|
+
*
|
|
62
|
+
* Throws if any boundary vertex has more than two boundary edges (figure-8 /
|
|
63
|
+
* bridged loops are not supported in this pass — repair the mesh first).
|
|
64
|
+
*
|
|
65
|
+
* @param {BinaryTopology} mesh
|
|
66
|
+
* @returns {number[][]} array of cycles; each cycle is an array of boundary edge IDs
|
|
67
|
+
*/
|
|
68
|
+
export function bt_mesh_walk_boundary_loops(mesh) {
|
|
69
|
+
const cycles = [];
|
|
70
|
+
const edges = mesh.edges;
|
|
71
|
+
const edge_count = edges.size;
|
|
72
|
+
|
|
73
|
+
const visited = new Uint8Array(edge_count);
|
|
74
|
+
|
|
75
|
+
for (let seed = 0; seed < edge_count; seed++) {
|
|
76
|
+
if (visited[seed]) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (!edges.is_allocated(seed)) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (!bt_query_edge_is_boundary(mesh, seed)) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const cycle = [];
|
|
87
|
+
let edge = seed;
|
|
88
|
+
let from_vertex = mesh.edge_read_vertex1(edge);
|
|
89
|
+
|
|
90
|
+
do {
|
|
91
|
+
visited[edge] = 1;
|
|
92
|
+
cycle.push(edge);
|
|
93
|
+
|
|
94
|
+
const v1 = mesh.edge_read_vertex1(edge);
|
|
95
|
+
const v2 = mesh.edge_read_vertex2(edge);
|
|
96
|
+
const next_vertex = (v1 === from_vertex) ? v2 : v1;
|
|
97
|
+
|
|
98
|
+
const next_edge = next_boundary_edge_at_vertex(mesh, next_vertex, edge);
|
|
99
|
+
|
|
100
|
+
edge = next_edge;
|
|
101
|
+
from_vertex = next_vertex;
|
|
102
|
+
} while (edge !== seed);
|
|
103
|
+
|
|
104
|
+
cycles.push(cycle);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return cycles;
|
|
108
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An edge is a boundary edge when exactly one face uses it — i.e., its radial
|
|
3
|
+
* cycle contains a single loop. Wire edges (no loops on the radial cycle) and
|
|
4
|
+
* manifold edges (two loops) return false.
|
|
5
|
+
*
|
|
6
|
+
* @param {BinaryTopology} mesh
|
|
7
|
+
* @param {number} edge_id
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export function bt_query_edge_is_boundary(mesh: BinaryTopology, edge_id: number): boolean;
|
|
11
|
+
//# sourceMappingURL=bt_query_edge_is_boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bt_query_edge_is_boundary.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/core/geom/3d/topology/struct/binary/query/bt_query_edge_is_boundary.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,yEAHW,MAAM,GACJ,OAAO,CAUnB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NULL_POINTER } from "../BinaryTopology.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An edge is a boundary edge when exactly one face uses it — i.e., its radial
|
|
5
|
+
* cycle contains a single loop. Wire edges (no loops on the radial cycle) and
|
|
6
|
+
* manifold edges (two loops) return false.
|
|
7
|
+
*
|
|
8
|
+
* @param {BinaryTopology} mesh
|
|
9
|
+
* @param {number} edge_id
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export function bt_query_edge_is_boundary(mesh, edge_id) {
|
|
13
|
+
const loop = mesh.edge_read_loop(edge_id);
|
|
14
|
+
|
|
15
|
+
if (loop === NULL_POINTER) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return mesh.loop_read_radial_next(loop) === loop;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the signed volume enclosed by a triangle surface mesh given as
|
|
3
|
+
* flat positions + indices, via the divergence theorem.
|
|
4
|
+
*
|
|
5
|
+
* For every triangle (a, b, c) this sums the signed volume of the
|
|
6
|
+
* tetrahedron (origin, a, b, c); when the mesh is closed and consistently
|
|
7
|
+
* wound (CCW from outside → positive volume), the per-triangle contributions
|
|
8
|
+
* cancel everywhere except inside the surface, leaving the enclosed volume.
|
|
9
|
+
*
|
|
10
|
+
* Useful as a ground truth for validating volumetric mesh generation: the
|
|
11
|
+
* tetrahedralized version of the same closed surface should have a total tet
|
|
12
|
+
* volume close to this value (small discretization gap aside).
|
|
13
|
+
*
|
|
14
|
+
* @param {ArrayLike<number>} positions flat (x,y,z,…) array
|
|
15
|
+
* @param {ArrayLike<number>} indices 3 entries per triangle
|
|
16
|
+
* @returns {number} signed volume — positive for CCW-from-outside winding,
|
|
17
|
+
* negative if flipped, zero for an open or self-cancelling mesh
|
|
18
|
+
*/
|
|
19
|
+
export function triangle_mesh_compute_signed_volume(positions: ArrayLike<number>, indices: ArrayLike<number>): number;
|
|
20
|
+
//# sourceMappingURL=triangle_mesh_compute_signed_volume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triangle_mesh_compute_signed_volume.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/triangle_mesh_compute_signed_volume.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,+DALW,UAAU,MAAM,CAAC,WACjB,UAAU,MAAM,CAAC,GACf,MAAM,CAoBlB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { triangle_compute_signed_volume } from "./triangle_compute_signed_volume.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compute the signed volume enclosed by a triangle surface mesh given as
|
|
5
|
+
* flat positions + indices, via the divergence theorem.
|
|
6
|
+
*
|
|
7
|
+
* For every triangle (a, b, c) this sums the signed volume of the
|
|
8
|
+
* tetrahedron (origin, a, b, c); when the mesh is closed and consistently
|
|
9
|
+
* wound (CCW from outside → positive volume), the per-triangle contributions
|
|
10
|
+
* cancel everywhere except inside the surface, leaving the enclosed volume.
|
|
11
|
+
*
|
|
12
|
+
* Useful as a ground truth for validating volumetric mesh generation: the
|
|
13
|
+
* tetrahedralized version of the same closed surface should have a total tet
|
|
14
|
+
* volume close to this value (small discretization gap aside).
|
|
15
|
+
*
|
|
16
|
+
* @param {ArrayLike<number>} positions flat (x,y,z,…) array
|
|
17
|
+
* @param {ArrayLike<number>} indices 3 entries per triangle
|
|
18
|
+
* @returns {number} signed volume — positive for CCW-from-outside winding,
|
|
19
|
+
* negative if flipped, zero for an open or self-cancelling mesh
|
|
20
|
+
*/
|
|
21
|
+
export function triangle_mesh_compute_signed_volume(positions, indices) {
|
|
22
|
+
let total = 0;
|
|
23
|
+
|
|
24
|
+
const n = indices.length;
|
|
25
|
+
for (let i = 0; i < n; i += 3) {
|
|
26
|
+
const a3 = indices[i] * 3;
|
|
27
|
+
const b3 = indices[i + 1] * 3;
|
|
28
|
+
const c3 = indices[i + 2] * 3;
|
|
29
|
+
|
|
30
|
+
total += triangle_compute_signed_volume(
|
|
31
|
+
positions[a3], positions[a3 + 1], positions[a3 + 2],
|
|
32
|
+
positions[b3], positions[b3 + 1], positions[b3 + 2],
|
|
33
|
+
positions[c3], positions[c3 + 1], positions[c3 + 2],
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return total;
|
|
38
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compute face normal for a triangle
|
|
3
|
-
* @param {number[]|Float32Array} result X,Y,Z normalized vector is written here
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} result X,Y,Z normalized vector is written here
|
|
4
4
|
* @param {number} result_offset offset into result array where to start writing
|
|
5
5
|
* @param {number} a_x
|
|
6
6
|
* @param {number} a_y
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* @param {number} c_y
|
|
13
13
|
* @param {number} c_z
|
|
14
14
|
*/
|
|
15
|
-
export function v3_compute_triangle_normal(result: number[] | Float32Array, result_offset: number, a_x: number, a_y: number, a_z: number, b_x: number, b_y: number, b_z: number, c_x: number, c_y: number, c_z: number): void;
|
|
15
|
+
export function v3_compute_triangle_normal(result: number[] | Float32Array | Float64Array, result_offset: number, a_x: number, a_y: number, a_z: number, b_x: number, b_y: number, b_z: number, c_x: number, c_y: number, c_z: number): void;
|
|
16
16
|
//# sourceMappingURL=v3_compute_triangle_normal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_compute_triangle_normal.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/v3_compute_triangle_normal.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,mDAZW,MAAM,EAAE,GAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"v3_compute_triangle_normal.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/v3_compute_triangle_normal.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,mDAZW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,QA0ChB"}
|
|
@@ -2,7 +2,7 @@ import { v3_length_sqr } from "../../vec3/v3_length_sqr.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Compute face normal for a triangle
|
|
5
|
-
* @param {number[]|Float32Array} result X,Y,Z normalized vector is written here
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} result X,Y,Z normalized vector is written here
|
|
6
6
|
* @param {number} result_offset offset into result array where to start writing
|
|
7
7
|
* @param {number} a_x
|
|
8
8
|
* @param {number} a_y
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number[]|Float32Array} a
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} a
|
|
4
4
|
* @param {number} a_offset
|
|
5
|
-
* @param {number[]|Float32Array} b
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} b
|
|
6
6
|
* @param {number} b_offset
|
|
7
7
|
* @returns {number}
|
|
8
8
|
*/
|
|
9
|
-
export function v3_dot_array_array(a: number[] | Float32Array, a_offset: number, b: number[] | Float32Array, b_offset: number): number;
|
|
9
|
+
export function v3_dot_array_array(a: number[] | Float32Array | Float64Array, a_offset: number, b: number[] | Float32Array | Float64Array, b_offset: number): number;
|
|
10
10
|
//# sourceMappingURL=v3_dot_array_array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_dot_array_array.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_dot_array_array.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,sCANW,MAAM,EAAE,GAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"v3_dot_array_array.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_dot_array_array.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,sCANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,YAClC,MAAM,KACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,YAClC,MAAM,GACJ,MAAM,CAgBlB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number[]|Float32Array} a
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} a
|
|
4
4
|
* @param {number} a_offset
|
|
5
|
-
* @param {number[]|Float32Array} b
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} b
|
|
6
6
|
* @param {number} b_offset
|
|
7
7
|
* @returns {number}
|
|
8
8
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number[]|Float32Array} result
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
4
4
|
* @param {number} result_offset
|
|
5
|
-
* @param {number[]|Float32Array} input
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} input
|
|
6
6
|
* @param {number} input_offset
|
|
7
7
|
*/
|
|
8
|
-
export function v3_negate_array(result: number[] | Float32Array, result_offset: number, input: number[] | Float32Array, input_offset: number): void;
|
|
8
|
+
export function v3_negate_array(result: number[] | Float32Array | Float64Array, result_offset: number, input: number[] | Float32Array | Float64Array, input_offset: number): void;
|
|
9
9
|
//# sourceMappingURL=v3_negate_array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_negate_array.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_negate_array.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wCALW,MAAM,EAAE,GAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"v3_negate_array.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_negate_array.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wCALW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,SACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,gBAClC,MAAM,QAUhB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number[]|Float32Array} result
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
4
4
|
* @param {number} result_offset
|
|
5
|
-
* @param {number[]|Float32Array} input
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} input
|
|
6
6
|
* @param {number} input_offset
|
|
7
7
|
*/
|
|
8
8
|
export function v3_negate_array(result, result_offset, input, input_offset) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rotate a 3-D vector by a unit quaternion: `result = q · v · q*`.
|
|
3
|
+
*
|
|
4
|
+
* The closed-form expansion below is the standard "two Hamilton
|
|
5
|
+
* products with a pure-quaternion v" derivation. We compute the
|
|
6
|
+
* intermediate `t = q · v` (treating v as a quaternion with `w = 0`),
|
|
7
|
+
* then `result = t · q*` (where `q* = (-qx, -qy, -qz, qw)`). Inline
|
|
8
|
+
* the sign of the conjugate so the final multiplies avoid temporary
|
|
9
|
+
* negations.
|
|
10
|
+
*
|
|
11
|
+
* Sign convention: `(qx, qy, qz, qw)` — `w` last, matching the
|
|
12
|
+
* project's existing {@link Quaternion} class and the rest of the
|
|
13
|
+
* `core/geom/3d/quaternion/` family.
|
|
14
|
+
*
|
|
15
|
+
* Companion to {@link v3_quat3_apply_inverse} (rotates by the
|
|
16
|
+
* conjugate, i.e. inverse rotation).
|
|
17
|
+
*
|
|
18
|
+
* @param {number[]|Float32Array|Float64Array} out
|
|
19
|
+
* @param {number} out_offset offset into `out`; receives 3 floats
|
|
20
|
+
* @param {number} vx
|
|
21
|
+
* @param {number} vy
|
|
22
|
+
* @param {number} vz
|
|
23
|
+
* @param {number} qx unit quaternion x
|
|
24
|
+
* @param {number} qy
|
|
25
|
+
* @param {number} qz
|
|
26
|
+
* @param {number} qw unit quaternion w (last)
|
|
27
|
+
*/
|
|
28
|
+
export function v3_quat3_apply(out: number[] | Float32Array | Float64Array, out_offset: number, vx: number, vy: number, vz: number, qx: number, qy: number, qz: number, qw: number): void;
|
|
29
|
+
//# sourceMappingURL=v3_quat3_apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3_quat3_apply.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_quat3_apply.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,oCAVW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,cAClC,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAahB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rotate a 3-D vector by a unit quaternion: `result = q · v · q*`.
|
|
3
|
+
*
|
|
4
|
+
* The closed-form expansion below is the standard "two Hamilton
|
|
5
|
+
* products with a pure-quaternion v" derivation. We compute the
|
|
6
|
+
* intermediate `t = q · v` (treating v as a quaternion with `w = 0`),
|
|
7
|
+
* then `result = t · q*` (where `q* = (-qx, -qy, -qz, qw)`). Inline
|
|
8
|
+
* the sign of the conjugate so the final multiplies avoid temporary
|
|
9
|
+
* negations.
|
|
10
|
+
*
|
|
11
|
+
* Sign convention: `(qx, qy, qz, qw)` — `w` last, matching the
|
|
12
|
+
* project's existing {@link Quaternion} class and the rest of the
|
|
13
|
+
* `core/geom/3d/quaternion/` family.
|
|
14
|
+
*
|
|
15
|
+
* Companion to {@link v3_quat3_apply_inverse} (rotates by the
|
|
16
|
+
* conjugate, i.e. inverse rotation).
|
|
17
|
+
*
|
|
18
|
+
* @param {number[]|Float32Array|Float64Array} out
|
|
19
|
+
* @param {number} out_offset offset into `out`; receives 3 floats
|
|
20
|
+
* @param {number} vx
|
|
21
|
+
* @param {number} vy
|
|
22
|
+
* @param {number} vz
|
|
23
|
+
* @param {number} qx unit quaternion x
|
|
24
|
+
* @param {number} qy
|
|
25
|
+
* @param {number} qz
|
|
26
|
+
* @param {number} qw unit quaternion w (last)
|
|
27
|
+
*/
|
|
28
|
+
export function v3_quat3_apply(out, out_offset, vx, vy, vz, qx, qy, qz, qw) {
|
|
29
|
+
// t = q · v (Hamilton product, v as pure quaternion w=0)
|
|
30
|
+
const tx = qw * vx + qy * vz - qz * vy;
|
|
31
|
+
const ty = qw * vy + qz * vx - qx * vz;
|
|
32
|
+
const tz = qw * vz + qx * vy - qy * vx;
|
|
33
|
+
const tw = -qx * vx - qy * vy - qz * vz;
|
|
34
|
+
|
|
35
|
+
// result = t · q* (q* = -qx, -qy, -qz, qw)
|
|
36
|
+
out[out_offset] = tx * qw - tw * qx - ty * qz + tz * qy;
|
|
37
|
+
out[out_offset + 1] = ty * qw - tw * qy - tz * qx + tx * qz;
|
|
38
|
+
out[out_offset + 2] = tz * qw - tw * qz - tx * qy + ty * qx;
|
|
39
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inverse-rotate a 3-D vector by a unit quaternion: `result = q* · v · q`,
|
|
3
|
+
* where `q* = (-qx, -qy, -qz, qw)` is the conjugate.
|
|
4
|
+
*
|
|
5
|
+
* Geometrically: if {@link v3_quat3_apply} rotates a body-local vector
|
|
6
|
+
* into world space (`v_world = q · v_local · q*`), this is the inverse —
|
|
7
|
+
* it takes a world-space vector and writes it in body-local coordinates.
|
|
8
|
+
* For unit quaternions the conjugate IS the inverse, so the two
|
|
9
|
+
* functions are exact inverses of each other.
|
|
10
|
+
*
|
|
11
|
+
* Implementation: the conjugate's `xyz` are negated relative to `q`.
|
|
12
|
+
* Expanding `c · v · c*` with `(cx, cy, cz, cw) = (-qx, -qy, -qz, qw)`
|
|
13
|
+
* and simplifying produces the closed form below — different sign
|
|
14
|
+
* pattern than {@link v3_quat3_apply}, NOT just a call with negated
|
|
15
|
+
* components (the optimisation matters for hot-path callers such as
|
|
16
|
+
* `PosedShape.support` and the per-triangle concave dispatch in
|
|
17
|
+
* `narrowphase_step`).
|
|
18
|
+
*
|
|
19
|
+
* @param {number[]|Float32Array|Float64Array} out
|
|
20
|
+
* @param {number} out_offset offset into `out`; receives 3 floats
|
|
21
|
+
* @param {number} vx
|
|
22
|
+
* @param {number} vy
|
|
23
|
+
* @param {number} vz
|
|
24
|
+
* @param {number} qx unit quaternion x
|
|
25
|
+
* @param {number} qy
|
|
26
|
+
* @param {number} qz
|
|
27
|
+
* @param {number} qw unit quaternion w (last)
|
|
28
|
+
*/
|
|
29
|
+
export function v3_quat3_apply_inverse(out: number[] | Float32Array | Float64Array, out_offset: number, vx: number, vy: number, vz: number, qx: number, qy: number, qz: number, qw: number): void;
|
|
30
|
+
//# sourceMappingURL=v3_quat3_apply_inverse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3_quat3_apply_inverse.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_quat3_apply_inverse.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,4CAVW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,cAClC,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAchB"}
|