@woosh/meep-engine 2.138.17 → 2.138.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/build/bundle-worker-image-decoder.js +1 -1
- package/editor/actions/concrete/ActionUpdateTexture.d.ts +12 -0
- package/editor/actions/concrete/ActionUpdateTexture.d.ts.map +1 -0
- package/editor/actions/concrete/ArrayCopyAction.d.ts +20 -0
- package/editor/actions/concrete/ArrayCopyAction.d.ts.map +1 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts +11 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +47 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts +38 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts +23 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +1 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +19 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +1 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts +10 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts +15 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts.map +1 -0
- package/editor/ecs/component/FieldDescriptor.d.ts +27 -0
- package/editor/ecs/component/FieldDescriptor.d.ts.map +1 -0
- package/editor/ecs/component/FieldValueAdapter.d.ts +7 -0
- package/editor/ecs/component/FieldValueAdapter.d.ts.map +1 -0
- package/editor/ecs/component/createFieldEditor.d.ts +9 -0
- package/editor/ecs/component/createFieldEditor.d.ts.map +1 -0
- package/editor/ecs/component/createObjectEditor.d.ts +14 -0
- package/editor/ecs/component/createObjectEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts.map +1 -1
- package/editor/ecs/component/findNearestRegisteredType.d.ts +8 -0
- package/editor/ecs/component/findNearestRegisteredType.d.ts.map +1 -0
- package/editor/process/ObstacleGridDisplayProcess.d.ts.map +1 -1
- package/editor/process/symbolic/makeGridPositionSymbolDisplay.d.ts.map +1 -1
- package/editor/tools/GridPaintTool.d.ts +17 -0
- package/editor/tools/GridPaintTool.d.ts.map +1 -0
- package/editor/tools/SelectionTool.d.ts +27 -0
- package/editor/tools/SelectionTool.d.ts.map +1 -0
- package/editor/tools/TopDownCameraControlTool.d.ts +13 -0
- package/editor/tools/TopDownCameraControlTool.d.ts.map +1 -0
- package/editor/view/ecs/ComponentControlFactory.d.ts.map +1 -0
- package/editor/view/ecs/ComponentControlView.d.ts.map +1 -1
- package/editor/view/ecs/EntityEditor.d.ts.map +1 -0
- package/editor/view/ecs/EntityList.d.ts.map +1 -0
- package/editor/view/ecs/HierarchicalEntityListView.d.ts.map +1 -0
- package/editor/view/node-graph/NodeGraphEditorView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeView.d.ts.map +1 -1
- package/editor/view/node-graph/PortView.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/binary/BinaryBuffer.d.ts +1 -1
- package/src/core/binary/BinaryBuffer.js +1 -1
- package/src/core/binary/BitSet.d.ts +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/cache/Cache.js +1 -1
- package/src/core/cache/LoadingCache.js +1 -1
- package/src/core/collection/list/List.js +1 -1
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/core/collection/table/RowFirstTable.d.ts +1 -1
- package/src/core/collection/table/RowFirstTable.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.d.ts +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +1 -1
- package/src/core/color/oklab/compute_max_saturation.d.ts +1 -1
- package/src/core/color/oklab/compute_max_saturation.js +1 -1
- package/src/core/color/oklab/find_cusp.d.ts +1 -1
- package/src/core/color/oklab/find_cusp.js +1 -1
- package/src/core/color/oklab/find_gamut_intersection.d.ts +1 -1
- package/src/core/color/oklab/find_gamut_intersection.js +1 -1
- package/src/core/color/oklab/okhsv_to_linear_srgb.d.ts +1 -1
- package/src/core/color/oklab/okhsv_to_linear_srgb.js +1 -1
- package/src/core/color/oklab/oklab_to_linear_srgb.d.ts +1 -1
- package/src/core/color/oklab/oklab_to_linear_srgb.js +1 -1
- package/src/core/color/oklab/oklab_to_xyz.d.ts +1 -1
- package/src/core/color/oklab/oklab_to_xyz.js +1 -1
- package/src/core/color/oklab/xyz_to_oklab.d.ts +1 -1
- package/src/core/color/oklab/xyz_to_oklab.js +1 -1
- package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.d.ts +1 -1
- package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_nearest_point_on_surface.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_nearest_point_on_surface.js +57 -65
- package/src/core/geom/3d/octahedra/octahedral_uv_wrap.d.ts +1 -1
- package/src/core/geom/3d/octahedra/octahedral_uv_wrap.js +1 -1
- package/src/core/geom/3d/quaternion/quat_decode_from_uint32.d.ts +1 -1
- package/src/core/geom/3d/quaternion/quat_decode_from_uint32.js +1 -1
- package/src/core/geom/3d/quaternion/quat_encode_to_uint32.d.ts +1 -1
- package/src/core/geom/3d/quaternion/quat_encode_to_uint32.js +1 -1
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts +74 -3
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts +37 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.js +210 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts +5 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PointShape3D.js +52 -14
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts +75 -12
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +12 -3
- package/src/core/geom/3d/shape/UnionShape3D.d.ts +47 -5
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts +12 -5
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts +17 -5
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.js +4 -1
- package/src/core/geom/3d/shape/json/type_adapters.d.ts +17 -2
- package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/type_adapters.js +18 -2
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.d.ts.map +1 -1
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.js +51 -48
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.d.ts +1 -1
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.js +1 -1
- package/src/core/geom/ConicRay.d.ts +1 -1
- package/src/core/geom/ConicRay.js +1 -1
- package/src/core/geom/Quaternion.d.ts +2 -2
- package/src/core/geom/Quaternion.js +2 -2
- package/src/core/geom/Vector1.d.ts +1 -1
- package/src/core/geom/Vector1.js +1 -1
- package/src/core/geom/Vector2.d.ts +1 -1
- package/src/core/geom/Vector2.js +1 -1
- package/src/core/geom/Vector3.d.ts +1 -1
- package/src/core/geom/Vector3.js +1 -1
- package/src/core/geom/packing/miniball/Miniball.d.ts +1 -1
- package/src/core/geom/packing/miniball/Miniball.js +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_decode.d.ts +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_decode.js +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_encode.d.ts +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_encode.js +1 -1
- package/src/core/math/spline/spline3_hermite.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite.js +1 -1
- package/src/core/math/spline/spline3_hermite_bounds.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_bounds.js +1 -1
- package/src/core/math/spline/spline3_hermite_bounds_t.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_bounds_t.js +1 -1
- package/src/core/math/spline/spline3_hermite_to_monomial.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_to_monomial.js +1 -1
- package/src/core/model/ObservedBoolean.d.ts +1 -1
- package/src/core/model/ObservedBoolean.js +1 -1
- package/src/core/model/ObservedString.d.ts +1 -1
- package/src/core/model/ObservedString.js +1 -1
- package/src/core/process/undo/Action.js +1 -1
- package/src/core/process/undo/ActionProcessor.js +1 -1
- package/src/engine/animation/curve/AnimationCurve.d.ts +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +1 -1
- package/src/engine/animation/curve/Keyframe.d.ts +1 -1
- package/src/engine/animation/curve/Keyframe.js +1 -1
- package/src/engine/animation/curve/animation_curve_compute_aabb.d.ts +1 -1
- package/src/engine/animation/curve/animation_curve_compute_aabb.js +1 -1
- package/src/engine/animation/curve/animation_curve_optimize.d.ts +1 -1
- package/src/engine/animation/curve/animation_curve_optimize.js +2 -2
- package/src/engine/asset/loaders/image/jpeg/JpegImage.js +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.js +27 -7
- package/src/engine/asset/loaders/image/png/crc32.d.ts +1 -1
- package/src/engine/asset/loaders/image/png/crc32.js +1 -1
- package/src/engine/control/first-person/DESIGN.md +616 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +229 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.js +176 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +251 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +205 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +151 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +799 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.d.ts +23 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.d.ts.map +1 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.js +23 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.d.ts +23 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.d.ts.map +1 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.js +34 -0
- package/src/engine/control/first-person/math/dampedSpringStep.d.ts +23 -0
- package/src/engine/control/first-person/math/dampedSpringStep.d.ts.map +1 -0
- package/src/engine/control/first-person/math/dampedSpringStep.js +72 -0
- package/src/engine/control/first-person/math/stepTowards.d.ts +12 -0
- package/src/engine/control/first-person/math/stepTowards.d.ts.map +1 -0
- package/src/engine/control/first-person/math/stepTowards.js +20 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts +69 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts.map +1 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.js +91 -0
- package/src/engine/control/first-person/prototype_first_person_controller.d.ts +2 -0
- package/src/engine/control/first-person/prototype_first_person_controller.d.ts.map +1 -0
- package/src/engine/control/first-person/prototype_first_person_controller.js +314 -0
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +1 -1
- package/src/engine/ecs/EntityManager.d.ts +1 -1
- package/src/engine/ecs/EntityManager.js +1 -1
- package/src/engine/ecs/EntityObserver.js +1 -1
- package/src/engine/ecs/EntityReference.d.ts +1 -1
- package/src/engine/ecs/EntityReference.js +1 -1
- package/src/engine/ecs/System.js +1 -1
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts +2 -2
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts.map +1 -1
- package/src/engine/ecs/grid/HeightMap2AOMap.d.ts.map +1 -1
- package/src/engine/ecs/grid/HeightMap2AOMap.js +3 -2
- package/src/engine/ecs/guid/UUID.d.ts +1 -1
- package/src/engine/ecs/guid/UUID.js +1 -1
- package/src/engine/ecs/name/Name.d.ts +1 -1
- package/src/engine/ecs/name/Name.js +1 -1
- package/src/engine/ecs/parent/ParentEntity.js +1 -1
- package/src/engine/ecs/storage/BinaryBufferDeSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/BinaryBufferDeSerializer.js +1 -1
- package/src/engine/ecs/storage/BinaryBufferSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/BinaryBufferSerializer.js +1 -1
- package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.js +1 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts +1 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +1 -1
- package/src/engine/ecs/transform/Transform.d.ts +1 -1
- package/src/engine/ecs/transform/Transform.js +1 -1
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +10 -1
- package/src/engine/graphics/impostors/voxel/README.md +149 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.d.ts +91 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.js +376 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.d.ts +128 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.js +141 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.d.ts +38 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.js +338 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.d.ts +43 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.js +192 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.d.ts +2 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.js +343 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.d.ts +13 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.js +99 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.d.ts +19 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.js +231 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.d.ts +5 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.js +70 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.d.ts +13 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.js +127 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.d.ts +5 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.js +68 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.d.ts +27 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.js +96 -0
- package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.d.ts +113 -29
- package/src/engine/graphics/render/forward_plus/SPECIFICATION.md +1 -1
- package/src/engine/graphics/shaders/AmbientOcclusionShader.d.ts.map +1 -1
- package/src/engine/graphics/shaders/AmbientOcclusionShader.js +20 -5
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.js +1 -1
- package/src/engine/graphics/util/build_max_height_pyramid.d.ts +21 -14
- package/src/engine/graphics/util/build_max_height_pyramid.d.ts.map +1 -1
- package/src/engine/graphics/util/build_max_height_pyramid.js +107 -70
- package/src/engine/input/devices/InputDeviceSwitch.js +1 -1
- package/src/engine/input/devices/KeyboardDevice.js +1 -1
- package/src/engine/input/devices/PointerDevice.js +1 -1
- package/src/engine/intelligence/behavior/Behavior.js +1 -1
- package/src/engine/intelligence/behavior/SelectorBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/SelectorBehavior.js +1 -1
- package/src/engine/intelligence/behavior/behavior_to_dot.d.ts +1 -1
- package/src/engine/intelligence/behavior/behavior_to_dot.js +1 -1
- package/src/engine/intelligence/behavior/composite/CompositeBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/CompositeBehavior.js +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.js +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.js +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.js +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/KillBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.js +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedElement.d.ts +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/BranchBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/DelayBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.js +1 -1
- package/src/engine/intelligence/blackboard/Blackboard.js +1 -1
- package/src/engine/intelligence/mcts/MonteCarlo.d.ts +1 -1
- package/src/engine/intelligence/mcts/MonteCarlo.js +1 -1
- package/src/engine/intelligence/mcts/MoveEdge.d.ts +1 -1
- package/src/engine/intelligence/mcts/MoveEdge.js +1 -1
- package/src/engine/intelligence/mcts/StateNode.d.ts +1 -1
- package/src/engine/intelligence/mcts/StateNode.js +1 -1
- package/src/engine/intelligence/resource/ActionSequence.d.ts +1 -1
- package/src/engine/intelligence/resource/ActionSequence.js +1 -1
- package/src/engine/intelligence/resource/Resource.d.ts +1 -1
- package/src/engine/intelligence/resource/Resource.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocation.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocation.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationBid.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationBid.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationSolver.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationSolver.js +1 -1
- package/src/engine/intelligence/resource/StrategicResourceAllocator.d.ts +1 -1
- package/src/engine/intelligence/resource/StrategicResourceAllocator.js +1 -1
- package/src/engine/intelligence/resource/TacticalModule.d.ts +1 -1
- package/src/engine/intelligence/resource/TacticalModule.js +1 -1
- package/src/engine/network/NetworkSession.d.ts +1 -1
- package/src/engine/network/NetworkSession.js +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.js +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.js +1 -1
- package/src/engine/network/core/quantize/quantize_float.d.ts +1 -1
- package/src/engine/network/core/quantize/quantize_float.js +1 -1
- package/src/engine/network/core/quantize/quantize_position.d.ts +1 -1
- package/src/engine/network/core/quantize/quantize_position.js +1 -1
- package/src/engine/network/core/sequence/ack_bitfield.d.ts +1 -1
- package/src/engine/network/core/sequence/ack_bitfield.js +1 -1
- package/src/engine/network/core/sequence/seq16.d.ts +1 -1
- package/src/engine/network/core/sequence/seq16.js +1 -1
- package/src/engine/network/core/sequence/seq32.d.ts +1 -1
- package/src/engine/network/core/sequence/seq32.js +1 -1
- package/src/engine/network/diagnostics/BandwidthMeter.d.ts +1 -1
- package/src/engine/network/diagnostics/BandwidthMeter.js +1 -1
- package/src/engine/network/diagnostics/ReplayLog.d.ts +1 -1
- package/src/engine/network/diagnostics/ReplayLog.js +1 -1
- package/src/engine/network/diagnostics/SyncTest.d.ts +1 -1
- package/src/engine/network/diagnostics/SyncTest.js +1 -1
- package/src/engine/network/ecs/NetworkSystem.d.ts +1 -1
- package/src/engine/network/ecs/NetworkSystem.js +1 -1
- package/src/engine/network/ecs/components/NetworkIdentity.d.ts +1 -1
- package/src/engine/network/ecs/components/NetworkIdentity.js +1 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts +1 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.js +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.d.ts +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +1 -1
- package/src/engine/network/replication/Replicator.d.ts +1 -1
- package/src/engine/network/replication/Replicator.js +1 -1
- package/src/engine/network/replication/ScopeFilter.d.ts +2 -2
- package/src/engine/network/replication/ScopeFilter.js +2 -2
- package/src/engine/network/sim/ActionLog.d.ts +1 -1
- package/src/engine/network/sim/ActionLog.js +1 -1
- package/src/engine/network/sim/BinaryInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/sim/BinaryInterpolationAdapter.js +1 -1
- package/src/engine/network/sim/InterpolationLog.d.ts +1 -1
- package/src/engine/network/sim/InterpolationLog.js +1 -1
- package/src/engine/network/sim/ReplicatedComponentRegistry.d.ts +1 -1
- package/src/engine/network/sim/ReplicatedComponentRegistry.js +1 -1
- package/src/engine/network/sim/RewindEngine.d.ts +1 -1
- package/src/engine/network/sim/RewindEngine.js +1 -1
- package/src/engine/network/sim/SimAction.d.ts +1 -1
- package/src/engine/network/sim/SimAction.js +1 -1
- package/src/engine/network/sim/SimActionExecutor.d.ts +1 -1
- package/src/engine/network/sim/SimActionExecutor.js +1 -1
- package/src/engine/network/sim/SimActionRegistry.d.ts +1 -1
- package/src/engine/network/sim/SimActionRegistry.js +1 -1
- package/src/engine/network/sim/SmoothingState.js +1 -1
- package/src/engine/network/sim/Snapshotter.d.ts +1 -1
- package/src/engine/network/sim/Snapshotter.js +1 -1
- package/src/engine/network/sim/SpeculationLog.d.ts +1 -1
- package/src/engine/network/sim/SpeculationLog.js +1 -1
- package/src/engine/network/state/Baseline.d.ts +1 -1
- package/src/engine/network/state/Baseline.js +1 -1
- package/src/engine/network/state/ChangedEntitySet.d.ts +1 -1
- package/src/engine/network/state/ChangedEntitySet.js +1 -1
- package/src/engine/network/state/InputRing.d.ts +1 -1
- package/src/engine/network/state/InputRing.js +1 -1
- package/src/engine/network/state/MutationLedger.d.ts +1 -1
- package/src/engine/network/state/MutationLedger.js +1 -1
- package/src/engine/network/state/PriorityAccumulator.d.ts +1 -1
- package/src/engine/network/state/PriorityAccumulator.js +1 -1
- package/src/engine/network/state/ReplicationSlotTable.d.ts +1 -1
- package/src/engine/network/state/ReplicationSlotTable.js +1 -1
- package/src/engine/network/time/AdaptiveRenderDelay.d.ts +1 -1
- package/src/engine/network/time/AdaptiveRenderDelay.js +1 -1
- package/src/engine/network/time/JitterBuffer.d.ts +1 -1
- package/src/engine/network/time/JitterBuffer.js +1 -1
- package/src/engine/network/time/TimeDilation.d.ts +1 -1
- package/src/engine/network/time/TimeDilation.js +1 -1
- package/src/engine/network/time/TimeSync.d.ts +1 -1
- package/src/engine/network/time/TimeSync.js +1 -1
- package/src/engine/network/transport/Channel.d.ts.map +1 -1
- package/src/engine/network/transport/Channel.js +3 -6
- package/src/engine/network/transport/LoopbackTransport.d.ts +1 -1
- package/src/engine/network/transport/LoopbackTransport.js +1 -1
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts +1 -1
- package/src/engine/network/transport/ReliableCommandPipeline.js +1 -1
- package/src/engine/network/transport/Transport.d.ts +1 -1
- package/src/engine/network/transport/Transport.js +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.js +2 -2
- package/src/engine/network/transport/adapters/SimulatedTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/SimulatedTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.js +1 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts +1 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.js +1 -1
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts +1 -1
- package/src/engine/network/transport/fragments/FragmentRetention.js +1 -1
- package/src/engine/network/transport/fragments/packet_size.d.ts +1 -1
- package/src/engine/network/transport/fragments/packet_size.js +1 -1
- package/src/engine/simulation/Ticker.d.ts +1 -1
- package/src/engine/simulation/Ticker.js +1 -1
- package/src/engine/sound/SoundEngine.js +1 -1
- package/src/engine/ui/DraggableAspect.d.ts +1 -1
- package/src/engine/ui/DraggableAspect.js +1 -1
- package/src/view/View.js +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert designer-friendly jump parameters (apex height in meters, time to
|
|
3
|
+
* reach apex in seconds) into the gravity and initial vertical velocity that
|
|
4
|
+
* produce that jump exactly.
|
|
5
|
+
*
|
|
6
|
+
* The standard ballistic equations:
|
|
7
|
+
* y(t) = v0 * t - 0.5 * g * t^2
|
|
8
|
+
* y'(t) = v0 - g * t
|
|
9
|
+
*
|
|
10
|
+
* At apex y'(t) = 0, so t_apex = v0 / g.
|
|
11
|
+
* Solving with the desired apex height h:
|
|
12
|
+
* g = 2h / t_apex^2
|
|
13
|
+
* v0 = 2h / t_apex
|
|
14
|
+
*
|
|
15
|
+
* @param {number} peakHeight desired apex height in meters (must be > 0)
|
|
16
|
+
* @param {number} timeToApex seconds to reach apex (must be > 0)
|
|
17
|
+
* @param {{gravity:number, initialVelocity:number}} out
|
|
18
|
+
*/
|
|
19
|
+
export function computeJumpFromApex(peakHeight: number, timeToApex: number, out: {
|
|
20
|
+
gravity: number;
|
|
21
|
+
initialVelocity: number;
|
|
22
|
+
}): void;
|
|
23
|
+
//# sourceMappingURL=computeJumpFromApex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeJumpFromApex.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/math/computeJumpFromApex.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,gDAJW,MAAM,cACN,MAAM,OACN;IAAC,OAAO,EAAC,MAAM,CAAC;IAAC,eAAe,EAAC,MAAM,CAAA;CAAC,QAMlD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert designer-friendly jump parameters (apex height in meters, time to
|
|
3
|
+
* reach apex in seconds) into the gravity and initial vertical velocity that
|
|
4
|
+
* produce that jump exactly.
|
|
5
|
+
*
|
|
6
|
+
* The standard ballistic equations:
|
|
7
|
+
* y(t) = v0 * t - 0.5 * g * t^2
|
|
8
|
+
* y'(t) = v0 - g * t
|
|
9
|
+
*
|
|
10
|
+
* At apex y'(t) = 0, so t_apex = v0 / g.
|
|
11
|
+
* Solving with the desired apex height h:
|
|
12
|
+
* g = 2h / t_apex^2
|
|
13
|
+
* v0 = 2h / t_apex
|
|
14
|
+
*
|
|
15
|
+
* @param {number} peakHeight desired apex height in meters (must be > 0)
|
|
16
|
+
* @param {number} timeToApex seconds to reach apex (must be > 0)
|
|
17
|
+
* @param {{gravity:number, initialVelocity:number}} out
|
|
18
|
+
*/
|
|
19
|
+
export function computeJumpFromApex(peakHeight, timeToApex, out) {
|
|
20
|
+
const t = timeToApex;
|
|
21
|
+
out.gravity = (2 * peakHeight) / (t * t);
|
|
22
|
+
out.initialVelocity = (2 * peakHeight) / t;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Critically damped spring step, parameterized by half-life rather than
|
|
3
|
+
* angular frequency. A critically damped spring reaches its goal as fast as
|
|
4
|
+
* possible without oscillation — ideal for FOV, crouch height, and lean.
|
|
5
|
+
*
|
|
6
|
+
* Form follows Daniel Holden, "Spring-It-On" — `theorangeduck.com/page/spring-roll-call`.
|
|
7
|
+
*
|
|
8
|
+
* y = ln(2) / halfLife
|
|
9
|
+
* eyt = exp(-y * dt)
|
|
10
|
+
* j1 = v + (x - target) * y
|
|
11
|
+
* x' = target + (x - target + j1 * dt) * eyt
|
|
12
|
+
* v' = (v - j1 * y * dt) * eyt
|
|
13
|
+
*
|
|
14
|
+
* @param {{value:number, velocity:number}} state mutated in place
|
|
15
|
+
* @param {number} target goal value
|
|
16
|
+
* @param {number} halfLife seconds for the gap to halve (smaller = snappier)
|
|
17
|
+
* @param {number} dt
|
|
18
|
+
*/
|
|
19
|
+
export function criticallyDampedSpringStep(state: {
|
|
20
|
+
value: number;
|
|
21
|
+
velocity: number;
|
|
22
|
+
}, target: number, halfLife: number, dt: number): void;
|
|
23
|
+
//# sourceMappingURL=criticallyDampedSpring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criticallyDampedSpring.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/math/criticallyDampedSpring.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,kDALW;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,QAAQ,EAAC,MAAM,CAAA;CAAC,UAC/B,MAAM,YACN,MAAM,MACN,MAAM,QAiBhB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Critically damped spring step, parameterized by half-life rather than
|
|
3
|
+
* angular frequency. A critically damped spring reaches its goal as fast as
|
|
4
|
+
* possible without oscillation — ideal for FOV, crouch height, and lean.
|
|
5
|
+
*
|
|
6
|
+
* Form follows Daniel Holden, "Spring-It-On" — `theorangeduck.com/page/spring-roll-call`.
|
|
7
|
+
*
|
|
8
|
+
* y = ln(2) / halfLife
|
|
9
|
+
* eyt = exp(-y * dt)
|
|
10
|
+
* j1 = v + (x - target) * y
|
|
11
|
+
* x' = target + (x - target + j1 * dt) * eyt
|
|
12
|
+
* v' = (v - j1 * y * dt) * eyt
|
|
13
|
+
*
|
|
14
|
+
* @param {{value:number, velocity:number}} state mutated in place
|
|
15
|
+
* @param {number} target goal value
|
|
16
|
+
* @param {number} halfLife seconds for the gap to halve (smaller = snappier)
|
|
17
|
+
* @param {number} dt
|
|
18
|
+
*/
|
|
19
|
+
export function criticallyDampedSpringStep(state, target, halfLife, dt) {
|
|
20
|
+
if (halfLife <= 0) {
|
|
21
|
+
state.value = target;
|
|
22
|
+
state.velocity = 0;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const y = 0.6931471805599453 / halfLife; // ln(2) / halfLife
|
|
27
|
+
const eyt = Math.exp(-y * dt);
|
|
28
|
+
|
|
29
|
+
const delta = state.value - target;
|
|
30
|
+
const j1 = state.velocity + delta * y;
|
|
31
|
+
|
|
32
|
+
state.value = target + (delta + j1 * dt) * eyt;
|
|
33
|
+
state.velocity = (state.velocity - j1 * y * dt) * eyt;
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General damped spring step (under/critically/over-damped), used for
|
|
3
|
+
* landing recovery where a small ring/overshoot is desirable.
|
|
4
|
+
*
|
|
5
|
+
* Uses the half-life form of natural frequency and an explicit damping
|
|
6
|
+
* ratio zeta. zeta=1 → critically damped (no ring), zeta<1 → under-damped
|
|
7
|
+
* (rings), zeta>1 → over-damped (sluggish).
|
|
8
|
+
*
|
|
9
|
+
* Numerically stable for any zeta via the closed-form solutions of the
|
|
10
|
+
* 2nd-order ODE. Reference: Allen Chou,
|
|
11
|
+
* `allenchou.net/2015/04/game-math-precise-control-over-numeric-springing/`.
|
|
12
|
+
*
|
|
13
|
+
* @param {{value:number, velocity:number}} state mutated in place
|
|
14
|
+
* @param {number} target
|
|
15
|
+
* @param {number} halfLife seconds for the *envelope* to halve
|
|
16
|
+
* @param {number} zeta damping ratio (e.g. 0.55 for a slight ring)
|
|
17
|
+
* @param {number} dt
|
|
18
|
+
*/
|
|
19
|
+
export function dampedSpringStep(state: {
|
|
20
|
+
value: number;
|
|
21
|
+
velocity: number;
|
|
22
|
+
}, target: number, halfLife: number, zeta: number, dt: number): void;
|
|
23
|
+
//# sourceMappingURL=dampedSpringStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dampedSpringStep.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/math/dampedSpringStep.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wCANW;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,QAAQ,EAAC,MAAM,CAAA;CAAC,UAC/B,MAAM,YACN,MAAM,QACN,MAAM,MACN,MAAM,QAuDhB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General damped spring step (under/critically/over-damped), used for
|
|
3
|
+
* landing recovery where a small ring/overshoot is desirable.
|
|
4
|
+
*
|
|
5
|
+
* Uses the half-life form of natural frequency and an explicit damping
|
|
6
|
+
* ratio zeta. zeta=1 → critically damped (no ring), zeta<1 → under-damped
|
|
7
|
+
* (rings), zeta>1 → over-damped (sluggish).
|
|
8
|
+
*
|
|
9
|
+
* Numerically stable for any zeta via the closed-form solutions of the
|
|
10
|
+
* 2nd-order ODE. Reference: Allen Chou,
|
|
11
|
+
* `allenchou.net/2015/04/game-math-precise-control-over-numeric-springing/`.
|
|
12
|
+
*
|
|
13
|
+
* @param {{value:number, velocity:number}} state mutated in place
|
|
14
|
+
* @param {number} target
|
|
15
|
+
* @param {number} halfLife seconds for the *envelope* to halve
|
|
16
|
+
* @param {number} zeta damping ratio (e.g. 0.55 for a slight ring)
|
|
17
|
+
* @param {number} dt
|
|
18
|
+
*/
|
|
19
|
+
export function dampedSpringStep(state, target, halfLife, zeta, dt) {
|
|
20
|
+
if (halfLife <= 0) {
|
|
21
|
+
state.value = target;
|
|
22
|
+
state.velocity = 0;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// omega such that the envelope decays by 1/2 in halfLife
|
|
27
|
+
// for the under-damped case the envelope is exp(-zeta * omega * t)
|
|
28
|
+
// → omega = ln(2) / (zeta * halfLife). For zeta=1 this matches the
|
|
29
|
+
// critically damped form.
|
|
30
|
+
const omega = 0.6931471805599453 / (Math.max(zeta, 1e-4) * halfLife);
|
|
31
|
+
|
|
32
|
+
const x = state.value - target;
|
|
33
|
+
const v = state.velocity;
|
|
34
|
+
|
|
35
|
+
if (zeta < 1.0) {
|
|
36
|
+
// Under-damped: rings
|
|
37
|
+
const omega_d = omega * Math.sqrt(1 - zeta * zeta);
|
|
38
|
+
const za = zeta * omega;
|
|
39
|
+
const exp_term = Math.exp(-za * dt);
|
|
40
|
+
const cos_term = Math.cos(omega_d * dt);
|
|
41
|
+
const sin_term = Math.sin(omega_d * dt);
|
|
42
|
+
const A = x;
|
|
43
|
+
const B = (v + za * x) / omega_d;
|
|
44
|
+
|
|
45
|
+
state.value = target + exp_term * (A * cos_term + B * sin_term);
|
|
46
|
+
state.velocity = exp_term * (
|
|
47
|
+
(-za) * (A * cos_term + B * sin_term)
|
|
48
|
+
+ omega_d * (-A * sin_term + B * cos_term)
|
|
49
|
+
);
|
|
50
|
+
} else if (zeta > 1.0) {
|
|
51
|
+
// Over-damped: two real roots
|
|
52
|
+
const za = zeta * omega;
|
|
53
|
+
const zb = omega * Math.sqrt(zeta * zeta - 1);
|
|
54
|
+
const r1 = -za + zb;
|
|
55
|
+
const r2 = -za - zb;
|
|
56
|
+
const c2 = (v - x * r1) / (r2 - r1);
|
|
57
|
+
const c1 = x - c2;
|
|
58
|
+
const e1 = Math.exp(r1 * dt);
|
|
59
|
+
const e2 = Math.exp(r2 * dt);
|
|
60
|
+
|
|
61
|
+
state.value = target + c1 * e1 + c2 * e2;
|
|
62
|
+
state.velocity = c1 * r1 * e1 + c2 * r2 * e2;
|
|
63
|
+
} else {
|
|
64
|
+
// Critically damped: shared root
|
|
65
|
+
const exp_term = Math.exp(-omega * dt);
|
|
66
|
+
const A = x;
|
|
67
|
+
const B = v + omega * x;
|
|
68
|
+
|
|
69
|
+
state.value = target + exp_term * (A + B * dt);
|
|
70
|
+
state.velocity = exp_term * (B - omega * (A + B * dt));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linearly step a scalar toward a target by at most `maxStep`. If the gap
|
|
3
|
+
* is smaller than the step, snaps to target. Used for accel/decel on
|
|
4
|
+
* horizontal velocity.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} current
|
|
7
|
+
* @param {number} target
|
|
8
|
+
* @param {number} maxStep must be >= 0
|
|
9
|
+
* @returns {number}
|
|
10
|
+
*/
|
|
11
|
+
export function stepTowards(current: number, target: number, maxStep: number): number;
|
|
12
|
+
//# sourceMappingURL=stepTowards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepTowards.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/math/stepTowards.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,qCALW,MAAM,UACN,MAAM,WACN,MAAM,GACJ,MAAM,CAWlB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linearly step a scalar toward a target by at most `maxStep`. If the gap
|
|
3
|
+
* is smaller than the step, snaps to target. Used for accel/decel on
|
|
4
|
+
* horizontal velocity.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} current
|
|
7
|
+
* @param {number} target
|
|
8
|
+
* @param {number} maxStep must be >= 0
|
|
9
|
+
* @returns {number}
|
|
10
|
+
*/
|
|
11
|
+
export function stepTowards(current, target, maxStep) {
|
|
12
|
+
const delta = target - current;
|
|
13
|
+
if (delta > maxStep) {
|
|
14
|
+
return current + maxStep;
|
|
15
|
+
}
|
|
16
|
+
if (delta < -maxStep) {
|
|
17
|
+
return current - maxStep;
|
|
18
|
+
}
|
|
19
|
+
return target;
|
|
20
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export namespace FirstPersonActionState {
|
|
2
|
+
let Grounded: number;
|
|
3
|
+
let Anticipating: number;
|
|
4
|
+
let Airborne: number;
|
|
5
|
+
let Landing: number;
|
|
6
|
+
}
|
|
7
|
+
export class FirstPersonPose {
|
|
8
|
+
/**
|
|
9
|
+
* World-space body root.
|
|
10
|
+
* @type {Vector3}
|
|
11
|
+
*/
|
|
12
|
+
rootPosition: Vector3;
|
|
13
|
+
/**
|
|
14
|
+
* Body facing yaw (radians, around world up).
|
|
15
|
+
* @type {number}
|
|
16
|
+
*/
|
|
17
|
+
rootYawRad: number;
|
|
18
|
+
/**
|
|
19
|
+
* Head decoupled from body. For most first-person controllers
|
|
20
|
+
* headYawRad === rootYawRad; surfaced separately so future torso-twist
|
|
21
|
+
* rigs can lag the head.
|
|
22
|
+
* @type {number}
|
|
23
|
+
*/
|
|
24
|
+
headYawRad: number;
|
|
25
|
+
/**
|
|
26
|
+
* @type {number}
|
|
27
|
+
*/
|
|
28
|
+
headPitchRad: number;
|
|
29
|
+
/**
|
|
30
|
+
* Includes lean roll.
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
headRollRad: number;
|
|
34
|
+
/**
|
|
35
|
+
* Stride phase, [0..1). Same value the camera bob uses, so a feet rig
|
|
36
|
+
* driven by this will land its footfalls on the same frames the camera
|
|
37
|
+
* dips.
|
|
38
|
+
* @type {number}
|
|
39
|
+
*/
|
|
40
|
+
locomotionPhase: number;
|
|
41
|
+
/**
|
|
42
|
+
* m/s, horizontal speed. Drives a blend tree.
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
45
|
+
locomotionSpeed: number;
|
|
46
|
+
/**
|
|
47
|
+
* [-1..1] lateral component, for strafe-blend space.
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
locomotionStrafe: number;
|
|
51
|
+
/**
|
|
52
|
+
* See {@link FirstPersonActionState}.
|
|
53
|
+
* @type {number}
|
|
54
|
+
*/
|
|
55
|
+
actionState: number;
|
|
56
|
+
/**
|
|
57
|
+
* [0..1] interpolation between standing and fully-crouched pose.
|
|
58
|
+
* @type {number}
|
|
59
|
+
*/
|
|
60
|
+
crouchAmount: number;
|
|
61
|
+
/**
|
|
62
|
+
* Same as headPitchRad, surfaced separately for IK consumers that only
|
|
63
|
+
* need the aim axis.
|
|
64
|
+
* @type {number}
|
|
65
|
+
*/
|
|
66
|
+
aimPitch: number;
|
|
67
|
+
}
|
|
68
|
+
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
69
|
+
//# sourceMappingURL=FirstPersonPose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FirstPersonPose.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/pose/FirstPersonPose.js"],"names":[],"mappings":";;;;;;AAoBA;IACI;;;OAGG;IACH,cAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;;;OAKG;IACH,YAFU,MAAM,CAED;IAEf;;OAEG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;;;OAKG;IACH,iBAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,iBAFU,MAAM,CAEI;IAEpB;;;OAGG;IACH,kBAFU,MAAM,CAEK;IAErB;;;OAGG;IACH,aAFU,MAAM,CAE8B;IAE9C;;;OAGG;IACH,cAFU,MAAM,CAEC;IAEjB;;;;OAIG;IACH,UAFU,MAAM,CAEH;CAChB;oBA1FmB,kCAAkC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read-only outputs intended for a downstream skeleton system to consume.
|
|
5
|
+
*
|
|
6
|
+
* Surfaced as a separate struct (rather than reading {@link FirstPersonState}
|
|
7
|
+
* directly) so that the skeleton-driving contract is stable even if
|
|
8
|
+
* internal state representations change later. A future first-person arms
|
|
9
|
+
* rig, third-person body rig, and network-replicated remote rig should all
|
|
10
|
+
* be able to drive themselves from these channels alone.
|
|
11
|
+
*
|
|
12
|
+
* @readonly enum
|
|
13
|
+
*/
|
|
14
|
+
export const FirstPersonActionState = {
|
|
15
|
+
Grounded: 0,
|
|
16
|
+
Anticipating: 1, // squashing down before jump impulse
|
|
17
|
+
Airborne: 2,
|
|
18
|
+
Landing: 3
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export class FirstPersonPose {
|
|
22
|
+
/**
|
|
23
|
+
* World-space body root.
|
|
24
|
+
* @type {Vector3}
|
|
25
|
+
*/
|
|
26
|
+
rootPosition = new Vector3();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Body facing yaw (radians, around world up).
|
|
30
|
+
* @type {number}
|
|
31
|
+
*/
|
|
32
|
+
rootYawRad = 0;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Head decoupled from body. For most first-person controllers
|
|
36
|
+
* headYawRad === rootYawRad; surfaced separately so future torso-twist
|
|
37
|
+
* rigs can lag the head.
|
|
38
|
+
* @type {number}
|
|
39
|
+
*/
|
|
40
|
+
headYawRad = 0;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @type {number}
|
|
44
|
+
*/
|
|
45
|
+
headPitchRad = 0;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Includes lean roll.
|
|
49
|
+
* @type {number}
|
|
50
|
+
*/
|
|
51
|
+
headRollRad = 0;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Stride phase, [0..1). Same value the camera bob uses, so a feet rig
|
|
55
|
+
* driven by this will land its footfalls on the same frames the camera
|
|
56
|
+
* dips.
|
|
57
|
+
* @type {number}
|
|
58
|
+
*/
|
|
59
|
+
locomotionPhase = 0;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* m/s, horizontal speed. Drives a blend tree.
|
|
63
|
+
* @type {number}
|
|
64
|
+
*/
|
|
65
|
+
locomotionSpeed = 0;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* [-1..1] lateral component, for strafe-blend space.
|
|
69
|
+
* @type {number}
|
|
70
|
+
*/
|
|
71
|
+
locomotionStrafe = 0;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* See {@link FirstPersonActionState}.
|
|
75
|
+
* @type {number}
|
|
76
|
+
*/
|
|
77
|
+
actionState = FirstPersonActionState.Grounded;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* [0..1] interpolation between standing and fully-crouched pose.
|
|
81
|
+
* @type {number}
|
|
82
|
+
*/
|
|
83
|
+
crouchAmount = 0;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Same as headPitchRad, surfaced separately for IK consumers that only
|
|
87
|
+
* need the aim axis.
|
|
88
|
+
* @type {number}
|
|
89
|
+
*/
|
|
90
|
+
aimPitch = 0;
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prototype_first_person_controller.d.ts","sourceRoot":"","sources":["../../../../../src/engine/control/first-person/prototype_first_person_controller.js"],"names":[],"mappings":""}
|