@woosh/meep-engine 2.138.20 → 2.139.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/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/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/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/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/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 +673 -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 +365 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_smooth_vertex.d.ts +31 -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 +112 -0
- package/src/core/geom/3d/tetrahedra/tetrahedral_mesh_vertex_is_boundary.d.ts +22 -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 +55 -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 +22 -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 +49 -0
- 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/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 +102 -9
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerController.js +38 -3
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +533 -4
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +315 -6
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +220 -22
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +858 -241
- package/src/engine/control/first-person/TODO.md +127 -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 +158 -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 +550 -119
- 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 +28 -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/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/PLAN.md +236 -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/aabb_transform_oriented.d.ts +30 -0
- package/src/engine/physics/broadphase/aabb_transform_oriented.d.ts.map +1 -0
- package/src/engine/physics/broadphase/aabb_transform_oriented.js +93 -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 +226 -0
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -0
- package/src/engine/physics/contact/ManifoldStore.js +499 -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 +520 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -0
- package/src/engine/physics/ecs/PhysicsSystem.js +1159 -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 +455 -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_solve_pressure_unmasked_legacy.d.ts +20 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_unmasked_legacy.d.ts.map +1 -0
- package/src/engine/physics/fluid/solver/v3_grid_solve_pressure_unmasked_legacy.js +83 -0
- package/src/engine/physics/fluid/solver/v3_grid_subtract_pressure_gradient.d.ts +26 -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 +70 -0
- package/src/engine/physics/gjk/expanding_polytope_algorithm.d.ts.map +1 -1
- package/src/engine/physics/gjk/expanding_polytope_algorithm.js +8 -10
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts +29 -0
- package/src/engine/physics/inertia/world_inverse_inertia.d.ts.map +1 -0
- package/src/engine/physics/inertia/world_inverse_inertia.js +79 -0
- package/src/engine/physics/integration/integrate_position.d.ts +16 -0
- package/src/engine/physics/integration/integrate_position.d.ts.map +1 -0
- package/src/engine/physics/integration/integrate_position.js +48 -0
- package/src/engine/physics/integration/integrate_velocity.d.ts +25 -0
- package/src/engine/physics/integration/integrate_velocity.d.ts.map +1 -0
- package/src/engine/physics/integration/integrate_velocity.js +79 -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 +59 -0
- package/src/engine/physics/narrowphase/PosedShape.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/PosedShape.js +110 -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 +543 -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 +508 -0
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts +11 -0
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -0
- package/src/engine/physics/narrowphase/narrowphase_step.js +382 -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 +130 -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/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/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/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 +36 -0
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -0
- package/src/engine/physics/solver/solve_contacts.js +598 -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
|
@@ -11,11 +11,28 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
11
11
|
/** Standing eye height, meters above body origin. */
|
|
12
12
|
height: 1.80,
|
|
13
13
|
/** Crouched eye height. */
|
|
14
|
-
crouchHeight:
|
|
14
|
+
crouchHeight: 0.8,
|
|
15
|
+
/** Prone eye height (used by slide). Body is horizontal — eye
|
|
16
|
+
* just above ground level, head turned toward the direction
|
|
17
|
+
* of travel. */
|
|
18
|
+
proneHeight: 0.4,
|
|
15
19
|
/** Capsule radius, for downstream physics. */
|
|
16
|
-
radius: 0.
|
|
17
|
-
/** Kilograms —
|
|
20
|
+
radius: 0.34,
|
|
21
|
+
/** Kilograms — affects bob, jump, landing, accel, and exertion via massRatio. */
|
|
18
22
|
mass: 80,
|
|
23
|
+
/** Reference mass against which `mass` is normalized (massRatio = mass/refMass). */
|
|
24
|
+
referenceMass: 80,
|
|
25
|
+
/**
|
|
26
|
+
* How strongly `mass` couples into derived effects. 0 = mass is
|
|
27
|
+
* cosmetic; 1.0 = full coupling (heavier ⇒ lower jump, lower accel,
|
|
28
|
+
* harder landing, faster exhaustion). At 1.0 a 25% mass increase
|
|
29
|
+
* yields:
|
|
30
|
+
* jump peak ≈ 0.83× (∝ 1/√massRatio — kinematically motivated)
|
|
31
|
+
* ground accel ≈ 0.80× (∝ 1/massRatio — F = ma at fixed force)
|
|
32
|
+
* landing dip ≈ 1.25× (∝ massRatio — higher momentum to absorb)
|
|
33
|
+
* exertion rise ≈ 1.25× (∝ massRatio — more body to move)
|
|
34
|
+
*/
|
|
35
|
+
massCouplingStrength: 1.0,
|
|
19
36
|
};
|
|
20
37
|
|
|
21
38
|
// Defaults are tuned toward an "athlete with juice" feel — plausible
|
|
@@ -34,6 +51,19 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
34
51
|
groundDecel: 75, // crisp stops, no skating
|
|
35
52
|
/** m/s^2 horizontal acceleration while airborne. */
|
|
36
53
|
airAccel: 14, // mid-air agility for course-correction
|
|
54
|
+
/**
|
|
55
|
+
* Top-speed multiplier applied while the move intent has a backward
|
|
56
|
+
* component (intent.move.y < 0). Backpedaling is mechanically slower
|
|
57
|
+
* than running forward — this also enforces a hard cap rather than
|
|
58
|
+
* letting "backward sprint" reach the same speed as forward sprint.
|
|
59
|
+
*/
|
|
60
|
+
backwardSpeedFactor: 0.65,
|
|
61
|
+
/**
|
|
62
|
+
* Acceleration multiplier while moving backward. Body has worse
|
|
63
|
+
* mechanical advantage when reversing — slower to start, slower to
|
|
64
|
+
* stop, sells the "fighting the gait" feel.
|
|
65
|
+
*/
|
|
66
|
+
backwardAccelFactor: 0.65,
|
|
37
67
|
};
|
|
38
68
|
|
|
39
69
|
jump = {
|
|
@@ -78,6 +108,123 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
78
108
|
mode: "hold",
|
|
79
109
|
};
|
|
80
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Wall-run ability — airborne + lateral wall + speed → run along the
|
|
113
|
+
* wall with reduced gravity. Camera tilts into the wall via the
|
|
114
|
+
* shared lean spring (consistent with the rest of the camera).
|
|
115
|
+
* Fields here are consumed by the {@link WallRun} ability when
|
|
116
|
+
* registered.
|
|
117
|
+
*/
|
|
118
|
+
wallRun = {
|
|
119
|
+
/** Minimum horizontal speed (m/s) to engage wall-run. */
|
|
120
|
+
minSpeed: 4.0,
|
|
121
|
+
/** Player must be airborne at least this long before wall-run can
|
|
122
|
+
* engage — prevents wall-run triggering off a jump's first frames. */
|
|
123
|
+
minAirborneTime: 0.1,
|
|
124
|
+
/** Maximum wall-run duration (s). Auto-exits at the end. */
|
|
125
|
+
maxDuration: 2.0,
|
|
126
|
+
/** Multiplier on base gravity while wall-running. Lower = longer hang. */
|
|
127
|
+
gravityFactor: 0.25,
|
|
128
|
+
/** Camera tilt magnitude (deg) into the wall. Disabled by the
|
|
129
|
+
* motion-sickness toggle alongside the standard lean. */
|
|
130
|
+
cameraRollDeg: 12,
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Wall-jump ability — instantaneous off-wall impulse. Fires from
|
|
135
|
+
* either an active wall-run state or from near-wall airborne (a
|
|
136
|
+
* short window where the player is close enough to push off).
|
|
137
|
+
*/
|
|
138
|
+
wallJump = {
|
|
139
|
+
/** Impulse magnitude away from the wall (m/s, applied along wall normal). */
|
|
140
|
+
outwardImpulse: 6.0,
|
|
141
|
+
/** Upward component multiplier on jumpInitialVy. */
|
|
142
|
+
upFactor: 0.9,
|
|
143
|
+
/** Max distance to wall (m) at which a near-wall-airborne wall-jump
|
|
144
|
+
* is allowed (when not already wall-running). */
|
|
145
|
+
nearWallMaxDistance: 0.6,
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Ledge-grab ability — snap to a forward ledge while descending and
|
|
150
|
+
* hang from it until the player releases. Climbing fatigue is
|
|
151
|
+
* modelled via the shared exertion channel: hang too long and you
|
|
152
|
+
* slip. Fields here are consumed by the {@link LedgeGrab} ability
|
|
153
|
+
* if registered; ignored otherwise.
|
|
154
|
+
*/
|
|
155
|
+
ledgeGrab = {
|
|
156
|
+
/** Body Y offset from ledge top while hanging (negative — feet
|
|
157
|
+
* below the ledge so the body looks like it's gripping the
|
|
158
|
+
* edge). */
|
|
159
|
+
hangOffsetY: -1.4,
|
|
160
|
+
/** Forward offset from the ledge edge (negative = pulled BACK
|
|
161
|
+
* from the edge so the body is against the wall under the
|
|
162
|
+
* ledge). */
|
|
163
|
+
hangOffsetForward: -0.2,
|
|
164
|
+
/** Exertion rise per second while hanging — drives slip-by-
|
|
165
|
+
* fatigue. The base exertion rise scale (massRatios) applies. */
|
|
166
|
+
exertionRiseRate: 0.15,
|
|
167
|
+
/** Player must be airborne at least this long before a ledge-
|
|
168
|
+
* grab can engage — prevents auto-catching mid-jump. */
|
|
169
|
+
minAirborneTime: 0.3,
|
|
170
|
+
/** Vertical kick (multiplier on jumpInitialVy) given on a
|
|
171
|
+
* mantle-up release. Just enough to put the body above the
|
|
172
|
+
* ledge so mantle's ledgeAhead probe still resolves correctly
|
|
173
|
+
* on the next tick. */
|
|
174
|
+
mantleUpUpFactor: 0.3,
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Mantle ability — auto-triggers when the player approaches a
|
|
179
|
+
* reachable obstacle with forward intent. The body follows a scripted
|
|
180
|
+
* path (horizontal + vertical eases) onto the surface; player input
|
|
181
|
+
* is suspended for the path's duration. Fields here are consumed by
|
|
182
|
+
* the {@link Mantle} ability if registered; ignored otherwise.
|
|
183
|
+
*/
|
|
184
|
+
mantle = {
|
|
185
|
+
/** Below this height (m above feet), the obstacle is just a step
|
|
186
|
+
* the player can walk over — no mantle. */
|
|
187
|
+
minHeight: 0.4,
|
|
188
|
+
/** Above this, the surface is out of reach — no mantle. ~1.4m
|
|
189
|
+
* is chest height for a 1.8m body, which is the canonical
|
|
190
|
+
* "obstacle you can climb on but not over without help". */
|
|
191
|
+
maxHeight: 1.4,
|
|
192
|
+
/** Total scripted-path duration (seconds). Short enough that the
|
|
193
|
+
* brief loss of player control isn't frustrating. */
|
|
194
|
+
duration: 0.5,
|
|
195
|
+
/** How far past the obstacle edge the player lands (m). Slight
|
|
196
|
+
* forward bias so the player ends on top of the surface, not
|
|
197
|
+
* on the edge. */
|
|
198
|
+
forwardOffsetOnLand: 0.4,
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Slide ability — activates from sprint+crouch when grounded. The
|
|
203
|
+
* fields here are read by the {@link Slide} ability if it's registered
|
|
204
|
+
* on the controller; unused if Slide is not in use.
|
|
205
|
+
*/
|
|
206
|
+
slide = {
|
|
207
|
+
/** Required horizontal speed to start a slide. Below this, crouch+
|
|
208
|
+
* sprint just transitions to a normal crouched walk. */
|
|
209
|
+
minEntrySpeed: 5.0,
|
|
210
|
+
/** Auto-exit threshold — slide ends when speed drops below this. */
|
|
211
|
+
endSpeed: 2.0,
|
|
212
|
+
/** Horizontal deceleration (m/s²) while sliding. Lower than the
|
|
213
|
+
* normal groundDecel so slides preserve momentum longer. */
|
|
214
|
+
friction: 3.0,
|
|
215
|
+
/** Non-interruptible window (seconds) after slide start — higher-
|
|
216
|
+
* priority abilities can't preempt during this window so the
|
|
217
|
+
* player isn't yanked out the instant they commit to a slide. */
|
|
218
|
+
startupWindow: 0.15,
|
|
219
|
+
/** Multiplier on the jump initial Vy for slide-jump. 1.0 = same
|
|
220
|
+
* height as a standing jump; >1 gives slide-jump some extra
|
|
221
|
+
* reward for chaining the input. */
|
|
222
|
+
slideJumpUpFactor: 1.05,
|
|
223
|
+
/** Vertical-impact-spring kick (m/s) at slide entry — the
|
|
224
|
+
* satisfying "thud" of dropping into the slide. */
|
|
225
|
+
entryImpactVelocity: 0.6,
|
|
226
|
+
};
|
|
227
|
+
|
|
81
228
|
bob = {
|
|
82
229
|
stepFreqAtWalk: 1.8,
|
|
83
230
|
stepFreqExp: 0.75, // sub-linear so sprint isn't frantic
|
|
@@ -88,6 +235,60 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
88
235
|
rollAtWalkDeg: 0.8, // a touch more visible head sway
|
|
89
236
|
/** Speeds below this don't tick the stride at all. */
|
|
90
237
|
minStepSpeed: 0.2,
|
|
238
|
+
/**
|
|
239
|
+
* Half-life of the bob-amplitude envelope (seconds). When the player
|
|
240
|
+
* starts/stops moving, the bob amplitude springs toward its natural
|
|
241
|
+
* value rather than cutting on/off — so releasing a movement key
|
|
242
|
+
* doesn't whiplash the head from full sway back to neutral. The
|
|
243
|
+
* stride phase itself still freezes when stationary; only the
|
|
244
|
+
* AMPLITUDE is temporally smoothed.
|
|
245
|
+
*/
|
|
246
|
+
intensityHalfLife: 0.22,
|
|
247
|
+
/**
|
|
248
|
+
* Vertical impact spring — kicked downward at each footfall. The
|
|
249
|
+
* spring's response shapes the actual vertical motion of the head:
|
|
250
|
+
* a sharp dip (foot arresting the head's fall), recovery through
|
|
251
|
+
* neutral, and a slight overshoot above neutral as the standing
|
|
252
|
+
* leg injects energy into the body (the "push" phase). Models the
|
|
253
|
+
* gait COM trajectory more accurately than a smooth sinusoid.
|
|
254
|
+
*/
|
|
255
|
+
impactSpringHalfLife: 0.14,
|
|
256
|
+
/** zeta < 1 → spring overshoots after impact, sells the leg-push. */
|
|
257
|
+
impactSpringZeta: 0.50,
|
|
258
|
+
/**
|
|
259
|
+
* Multiplier converting "desired peak dip" (verticalAmpAtWalk + mass
|
|
260
|
+
* boost, scaled by intensity and back-pedal factor) into the actual
|
|
261
|
+
* velocity impulse delivered at footfall. Empirical — tuned so the
|
|
262
|
+
* default verticalAmpAtWalk produces the expected peak dip with the
|
|
263
|
+
* spring params above.
|
|
264
|
+
*/
|
|
265
|
+
impactKickMultiplier: 30,
|
|
266
|
+
/**
|
|
267
|
+
* Multipliers applied to bob amplitude when the player is moving
|
|
268
|
+
* backward (interpolated by "backwardness" — the negative dot of
|
|
269
|
+
* velocity onto screen-forward, normalized to sprint speed). At
|
|
270
|
+
* full back-pedal these are fully applied; at rest they have no
|
|
271
|
+
* effect.
|
|
272
|
+
*
|
|
273
|
+
* Lateral is intentionally larger than vertical: real back-gait
|
|
274
|
+
* has worse side-to-side balance than vertical compression, so
|
|
275
|
+
* the visual wobble should track that. Roll boosts each footfall's
|
|
276
|
+
* head-tilt for the same reason — sells "unstable footing".
|
|
277
|
+
*/
|
|
278
|
+
backwardVerticalAmpFactor: 1.2,
|
|
279
|
+
backwardLateralAmpFactor: 1.4,
|
|
280
|
+
backwardRollFactor: 1.3,
|
|
281
|
+
/**
|
|
282
|
+
* Bob roll × lean coupling: when the body is leaning into a turn
|
|
283
|
+
* (lean spring displaced), the per-stride head roll is biased
|
|
284
|
+
* toward the lean direction. At 0 the bob roll is symmetric
|
|
285
|
+
* regardless of lean. At 1.0 the bob roll excursions in the lean
|
|
286
|
+
* direction are doubled and the opposite-direction excursions go to
|
|
287
|
+
* zero. Typical 0.3–0.6 reads as a cohesive "leaning while running"
|
|
288
|
+
* gait. Normalized against cfg.lean.maxRollDeg so the coupling
|
|
289
|
+
* stays proportional regardless of how aggressive lean is tuned.
|
|
290
|
+
*/
|
|
291
|
+
leanCouplingFactor: 0.45,
|
|
91
292
|
};
|
|
92
293
|
|
|
93
294
|
breath = {
|
|
@@ -99,14 +300,70 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
99
300
|
pitchAmpMaxDeg: 0.55,
|
|
100
301
|
/** ±20% amplitude noise rides on the sine. */
|
|
101
302
|
noiseAmount: 0.20,
|
|
303
|
+
/**
|
|
304
|
+
* Locomotor-respiratory coupling strength at full exertion. The
|
|
305
|
+
* breath-rate target is blended between purely metabolic (driven by
|
|
306
|
+
* exertion) and stride-aligned (an integer N strides per breath
|
|
307
|
+
* cycle). At 0 no coupling; at 1 breath rate is fully pulled toward
|
|
308
|
+
* the stride-aligned target.
|
|
309
|
+
*
|
|
310
|
+
* Coupling is SCALED by exertion — low exertion means the breath is
|
|
311
|
+
* dictated by metabolic demand alone, high sustained effort lets
|
|
312
|
+
* the diaphragm couple to gait impacts (mechanistically: heavier
|
|
313
|
+
* breathing means deeper chest excursions, which the gait's
|
|
314
|
+
* vertical accelerations bias toward integer ratios). Matches
|
|
315
|
+
* empirical findings in dynamic activity (Bernasconi & Kohl 1993,
|
|
316
|
+
* Bramble & Carrier 1983) — much weaker than steady-state running.
|
|
317
|
+
*
|
|
318
|
+
* Frequency-coupled only, NOT phase-locked: breath rate matches a
|
|
319
|
+
* sub-multiple of stride rate, but phase drifts. Holds the "loose"
|
|
320
|
+
* character the user asked for.
|
|
321
|
+
*/
|
|
322
|
+
locomotorCouplingMax: 0.45,
|
|
323
|
+
/** Coupling does not engage below this stride frequency (Hz). At
|
|
324
|
+
* walking pace your gait is too slow to mechanically influence
|
|
325
|
+
* breath; coupling really shows up at jog+ pace. */
|
|
326
|
+
couplingMinStrideFreqHz: 1.5,
|
|
102
327
|
};
|
|
103
328
|
|
|
104
329
|
exertion = {
|
|
330
|
+
// -- Sustained drivers (continuous accumulation per second) ---
|
|
331
|
+
/** Per-second accumulation while sprinting (mass-scaled internally). */
|
|
105
332
|
sprintRiseRate: 0.20,
|
|
106
|
-
|
|
333
|
+
/** Per-second decay toward 0 when not under sustained load. */
|
|
107
334
|
idleDecayRate: 0.12,
|
|
335
|
+
|
|
336
|
+
// -- Impulse drivers (one-shot bumps on discrete events) ------
|
|
337
|
+
/** Bump on jump fire — the muscular impulse of pushing off. */
|
|
338
|
+
jumpRise: 0.08,
|
|
339
|
+
/** Bump on crouch-enter — the knee-grip on absorbing into a crouch.
|
|
340
|
+
* Small; we don't want crouch-spamming to instantly exhaust. */
|
|
341
|
+
crouchEnterRise: 0.03,
|
|
342
|
+
/**
|
|
343
|
+
* Per-(m/s) impulse on landing — proportional to vertical impact
|
|
344
|
+
* speed. A clean low-jump landing barely registers; a hard fall
|
|
345
|
+
* delivers a noticeable bump. Clamped internally so an impossible
|
|
346
|
+
* fall doesn't max out exertion in one tick.
|
|
347
|
+
*/
|
|
348
|
+
landImpulsePerVy: 0.012,
|
|
349
|
+
/** Max impulse magnitude added by any single landing. */
|
|
350
|
+
landImpulseMax: 0.20,
|
|
351
|
+
|
|
352
|
+
// -- Breath coupling (existing — unchanged contract) ----------
|
|
353
|
+
/** How long after exertion subsides before breath rate normalizes. */
|
|
108
354
|
rateDecayHalfLife: 4.0,
|
|
355
|
+
/** How long after exertion subsides before breath amplitude normalizes. */
|
|
109
356
|
ampDecayHalfLife: 2.0,
|
|
357
|
+
|
|
358
|
+
// -- Output coupling: exertion affects how the body moves -----
|
|
359
|
+
/** At full exertion, bob lateral amp is multiplied by 1 + this.
|
|
360
|
+
* Sells "tired wobble" — modest effect (10–20% recommended). */
|
|
361
|
+
bobLateralBoostAtMax: 0.20,
|
|
362
|
+
/** At full exertion, the head droops forward by this many degrees.
|
|
363
|
+
* Sells visual fatigue without compromising aim. Subtle. */
|
|
364
|
+
headDroopAtMaxDeg: 1.5,
|
|
365
|
+
/** Spring half-life for the head-droop transition. */
|
|
366
|
+
headDroopHalfLife: 0.6,
|
|
110
367
|
};
|
|
111
368
|
|
|
112
369
|
lean = {
|
|
@@ -114,12 +371,35 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
114
371
|
/** Degrees of roll per (lateral m/s^2 / 9.81). */
|
|
115
372
|
maxRollDeg: 3.2, // more visible lean into turns — sells the athleticism
|
|
116
373
|
spring: { halfLife: 0.16, zeta: 1.0 },
|
|
374
|
+
/**
|
|
375
|
+
* Yaw-rate "look-lean": camera banks into mouse-driven turns even
|
|
376
|
+
* without strafe input. Disable for motion-sickness sensitivity.
|
|
377
|
+
*/
|
|
378
|
+
lookLeanEnabled: true,
|
|
379
|
+
/**
|
|
380
|
+
* Degrees of roll per rad/s of yaw rate. ~3 means a 180°/s turn
|
|
381
|
+
* (slow camera pan) gives ~16.5° of bank; a fast mouse flick at
|
|
382
|
+
* 5 rad/s (≈286°/s) would saturate against the clamp below.
|
|
383
|
+
*/
|
|
384
|
+
lookLeanDegPerRadPerSec: 3.0,
|
|
385
|
+
/** Yaw rate is clamped to ±this (rad/s) before scaling — prevents
|
|
386
|
+
* single-frame flicks from spiking the lean target. */
|
|
387
|
+
lookLeanYawRateClamp: 4.0,
|
|
388
|
+
/**
|
|
389
|
+
* Multiplier applied to look-lean (yaw-rate banking) when crouched.
|
|
390
|
+
* Crouched stance is low and stable; banking from a mouse turn
|
|
391
|
+
* reads as unmotivated. Default 0 fully disables; dial up to add
|
|
392
|
+
* a subtle tilt without it feeling like you're running. The lateral-
|
|
393
|
+
* acceleration lean is NOT affected by this — it scales naturally
|
|
394
|
+
* with crouch speeds since accel magnitudes drop.
|
|
395
|
+
*/
|
|
396
|
+
crouchLookLeanFactor: 0.0,
|
|
117
397
|
};
|
|
118
398
|
|
|
119
399
|
fov = {
|
|
120
400
|
base: 75, // wider baseline — more energetic
|
|
121
|
-
sprintAdd:
|
|
122
|
-
crouchAdd: -
|
|
401
|
+
sprintAdd: 7, // dramatic punch on sprint (Apex/Titanfall feel)
|
|
402
|
+
crouchAdd: -3,
|
|
123
403
|
smoothHalfLife: 0.18, // slightly snappier transitions
|
|
124
404
|
};
|
|
125
405
|
|
|
@@ -129,6 +409,23 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
129
409
|
invertY: false,
|
|
130
410
|
};
|
|
131
411
|
|
|
412
|
+
/**
|
|
413
|
+
* Postural shifts driven by intent — distinct from look (which is
|
|
414
|
+
* player-driven) and from bob (which is procedural). Models
|
|
415
|
+
* Mirror's Edge-style "commitment to motion": sprinting tilts the head
|
|
416
|
+
* forward as the body leans into the run. Slow spring so it builds up
|
|
417
|
+
* over a second or so rather than snapping — it's a *posture* change,
|
|
418
|
+
* not a flick.
|
|
419
|
+
*/
|
|
420
|
+
posture = {
|
|
421
|
+
/** Forward pitch (deg) applied to the eye at full sprint. Positive = look-down. */
|
|
422
|
+
sprintForwardPitchDeg: 4.0,
|
|
423
|
+
/** Spring half-life for the sprint pitch transition. */
|
|
424
|
+
sprintForwardPitchHalfLife: 0.32,
|
|
425
|
+
/** Small forward eye-position shift (m) at full sprint — head leads the hips. */
|
|
426
|
+
sprintForwardShiftM: 0.04,
|
|
427
|
+
};
|
|
428
|
+
|
|
132
429
|
gravity = {
|
|
133
430
|
/** Default gravity magnitude (m/s^2). Overridden by computeJumpFromApex once
|
|
134
431
|
* the jump tunables are resolved; kept here so non-jumping entities (NPCs,
|
|
@@ -149,12 +446,18 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
149
446
|
},
|
|
150
447
|
},
|
|
151
448
|
crouch: { ...this.crouch },
|
|
449
|
+
ledgeGrab: { ...this.ledgeGrab },
|
|
450
|
+
mantle: { ...this.mantle },
|
|
451
|
+
wallRun: { ...this.wallRun },
|
|
452
|
+
wallJump: { ...this.wallJump },
|
|
453
|
+
slide: { ...this.slide },
|
|
152
454
|
bob: { ...this.bob },
|
|
153
455
|
breath: { ...this.breath },
|
|
154
456
|
exertion: { ...this.exertion },
|
|
155
457
|
lean: { ...this.lean, spring: { ...this.lean.spring } },
|
|
156
458
|
fov: { ...this.fov },
|
|
157
459
|
look: { ...this.look },
|
|
460
|
+
posture: { ...this.posture },
|
|
158
461
|
gravity: { ...this.gravity },
|
|
159
462
|
};
|
|
160
463
|
}
|
|
@@ -177,6 +480,11 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
177
480
|
}
|
|
178
481
|
}
|
|
179
482
|
if (json.crouch) Object.assign(this.crouch, json.crouch);
|
|
483
|
+
if (json.ledgeGrab) Object.assign(this.ledgeGrab, json.ledgeGrab);
|
|
484
|
+
if (json.mantle) Object.assign(this.mantle, json.mantle);
|
|
485
|
+
if (json.wallRun) Object.assign(this.wallRun, json.wallRun);
|
|
486
|
+
if (json.wallJump) Object.assign(this.wallJump, json.wallJump);
|
|
487
|
+
if (json.slide) Object.assign(this.slide, json.slide);
|
|
180
488
|
if (json.bob) Object.assign(this.bob, json.bob);
|
|
181
489
|
if (json.breath) Object.assign(this.breath, json.breath);
|
|
182
490
|
if (json.exertion) Object.assign(this.exertion, json.exertion);
|
|
@@ -187,6 +495,7 @@ export class FirstPersonPlayerControllerConfig {
|
|
|
187
495
|
}
|
|
188
496
|
if (json.fov) Object.assign(this.fov, json.fov);
|
|
189
497
|
if (json.look) Object.assign(this.look, json.look);
|
|
498
|
+
if (json.posture) Object.assign(this.posture, json.posture);
|
|
190
499
|
if (json.gravity) Object.assign(this.gravity, json.gravity);
|
|
191
500
|
}
|
|
192
501
|
|