@woosh/meep-engine 2.165.6 → 2.165.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/tools/v2/GizmoNode.d.ts +21 -0
- package/editor/tools/v2/GizmoNode.d.ts.map +1 -0
- package/editor/tools/v2/TransformControls.d.ts +87 -20
- package/editor/tools/v2/TransformControls.d.ts.map +1 -0
- package/editor/tools/v2/TransformControlsGizmo.d.ts +22 -0
- package/editor/tools/v2/TransformControlsGizmo.d.ts.map +1 -0
- package/editor/tools/v2/TransformControlsPlane.d.ts +6 -0
- package/editor/tools/v2/TransformControlsPlane.d.ts.map +1 -0
- package/editor/tools/v2/TranslateHelperGeometry.d.ts +6 -0
- package/editor/tools/v2/TranslateHelperGeometry.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/binary/data_view/DataType2DataViewReaders.d.ts +8 -12
- package/src/core/binary/data_view/DataType2DataViewReaders.d.ts.map +1 -1
- package/src/core/binary/data_view/DataType2DataViewWriters.d.ts +8 -12
- package/src/core/binary/data_view/DataType2DataViewWriters.d.ts.map +1 -1
- package/src/core/binary/data_view/DataViewStructAccessor.d.ts +39 -18
- package/src/core/binary/type/BinaryDataType.d.ts +15 -15
- package/src/core/binary/type/DataType2TypedArrayConstructorMapping.d.ts +7 -11
- package/src/core/binary/type/DataType2TypedArrayConstructorMapping.d.ts.map +1 -1
- package/src/core/binary/type/DataTypeByteSizes.d.ts +7 -13
- package/src/core/binary/type/DataTypeByteSizes.d.ts.map +1 -1
- package/src/core/binary/type/DataTypeIndices.d.ts +8 -11
- package/src/core/binary/type/DataTypeIndices.d.ts.map +1 -1
- package/src/core/cache/Cache.d.ts +226 -56
- package/src/core/cache/Cache.d.ts.map +1 -1
- package/src/core/cache/LoadingCache.d.ts +72 -23
- package/src/core/collection/Stack.d.ts +2 -2
- package/src/core/collection/array/array_copy.d.ts +12 -7
- package/src/core/collection/array/computeHashArray.d.ts +9 -1
- package/src/core/collection/array/isArrayEqualStrict.d.ts +8 -1
- package/src/core/collection/array/isArraysEqualWithComparator.d.ts +10 -1
- package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts +3 -1
- package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -1
- package/src/core/collection/list/List.d.ts +334 -45
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/ListForwarder.d.ts +37 -18
- package/src/core/collection/map/HashMap.d.ts +199 -40
- package/src/core/collection/queue/Deque.d.ts +113 -37
- package/src/core/collection/set/ArraySet.d.ts +87 -26
- package/src/core/collection/set/HashSet.d.ts +66 -33
- package/src/core/collection/set/HashSet.d.ts.map +1 -1
- package/src/core/collection/table/bind/TableRecord.d.ts +21 -20
- package/src/core/color/Color.d.ts +1 -2
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/events/signal/Signal.d.ts +210 -57
- package/src/core/events/signal/signal_filter.d.ts +1 -1
- package/src/core/fsm/simple/SimpleStateMachine.d.ts +83 -27
- package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts +90 -21
- package/src/core/geom/2d/aabb/AABB2.d.ts +335 -51
- package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts +1 -6
- package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts +1 -2
- package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts.map +1 -1
- package/src/core/geom/3d/SurfacePoint3.d.ts +62 -17
- package/src/core/geom/3d/aabb/aabb3_build_corners.d.ts +13 -1
- package/src/core/geom/3d/frustum/read_three_planes_to_array.d.ts +7 -3
- package/src/core/geom/3d/line/line3_compute_nearest_point_to_point.d.ts +7 -6
- package/src/core/geom/3d/sphere/harmonics/sh3_sample_by_direction.d.ts +16 -6
- package/src/core/geom/Quaternion.d.ts +1 -2
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Vector1.d.ts +1 -2
- package/src/core/geom/Vector1.d.ts.map +1 -1
- package/src/core/geom/Vector2.d.ts +1 -2
- package/src/core/geom/Vector2.d.ts.map +1 -1
- package/src/core/geom/Vector3.d.ts +1 -2
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector4.d.ts +1 -1
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/graph/v2/Graph.d.ts +4 -4
- package/src/core/graph/v2/Graph.d.ts.map +1 -1
- package/src/core/json/resolvePathByArray.d.ts +10 -1
- package/src/core/math/clamp.d.ts +9 -1
- package/src/core/math/epsilonEquals.d.ts +9 -1
- package/src/core/math/interval/NumericInterval.d.ts +1 -2
- package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
- package/src/core/math/noise/create_simplex_noise_2d.d.ts +7 -1
- package/src/core/math/random/seededRandom.d.ts +3 -1
- package/src/core/math/remap.d.ts +12 -5
- package/src/core/math/sign.d.ts +10 -1
- package/src/core/model/BooleanVector3.d.ts +77 -28
- package/src/core/model/BooleanVector3.d.ts.map +1 -1
- package/src/core/model/BoundedValue.d.ts +5 -5
- package/src/core/model/BoundedValue.d.ts.map +1 -1
- package/src/core/model/ModuleRegistry.d.ts +45 -3
- package/src/core/model/ObservedBoolean.d.ts +1 -2
- package/src/core/model/ObservedBoolean.d.ts.map +1 -1
- package/src/core/model/ObservedEnum.d.ts +91 -7
- package/src/core/model/ObservedEnum.d.ts.map +1 -1
- package/src/core/model/ObservedString.d.ts +1 -2
- package/src/core/model/ObservedString.d.ts.map +1 -1
- package/src/core/model/ObservedValue.d.ts +1 -1
- package/src/core/model/ObservedValue.d.ts.map +1 -1
- package/src/core/model/node-graph/Connection.d.ts +57 -12
- package/src/core/model/node-graph/NodeGraph.d.ts +2 -2
- package/src/core/model/node-graph/node/NodeDescription.d.ts +166 -15
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeInstance.d.ts +181 -22
- package/src/core/model/node-graph/node/NodeInstance.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeInstancePortReference.d.ts +82 -3
- package/src/core/model/node-graph/node/Port.d.ts +72 -3
- package/src/core/model/node-graph/node/Port.d.ts.map +1 -1
- package/src/core/model/node-graph/node/PortDirection.d.ts +7 -5
- package/src/core/model/node-graph/type/DataType.d.ts +61 -4
- package/src/core/model/node-graph/type/ParametricDataType.d.ts +0 -1
- package/src/core/model/node-graph/type/ParametricDataType.d.ts.map +1 -1
- package/src/core/model/object/ImmutableObjectPool.d.ts +1 -2
- package/src/core/model/object/ImmutableObjectPool.d.ts.map +1 -1
- package/src/core/model/object/invokeObjectEquals.d.ts +9 -5
- package/src/core/model/object/invokeObjectHash.d.ts +7 -5
- package/src/core/model/object/objectDeepEquals.d.ts +10 -1
- package/src/core/model/object/objectKeyByValue.d.ts +10 -1
- package/src/core/model/object/read_property.d.ts +11 -1
- package/src/core/model/object/write_property.d.ts +10 -1
- package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts +6 -0
- package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts.map +1 -1
- package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.js +12 -12
- package/src/core/model/reactive/js/compileReactiveToJS.d.ts.map +1 -1
- package/src/core/model/reactive/js/compileReactiveToJS.js +35 -1
- package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts +1 -3
- package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts.map +1 -1
- package/src/core/model/reactive/model/ReactiveExpression.d.ts +63 -10
- package/src/core/model/reactive/model/ReactiveExpression.d.ts.map +1 -1
- package/src/core/model/reactive/model/ReactiveUnaryExpression.d.ts +0 -12
- package/src/core/model/reactive/model/ReactiveUnaryExpression.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveNegate.d.ts +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveNegate.d.ts.map +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts +1 -1
- package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts.map +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts +1 -1
- package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts.map +1 -1
- package/src/core/model/reactive/model/logic/ReactiveAnd.d.ts +41 -5
- package/src/core/model/reactive/model/logic/ReactiveAnd.d.ts.map +1 -1
- package/src/core/model/reactive/model/logic/ReactiveNot.d.ts +1 -1
- package/src/core/model/reactive/model/logic/ReactiveNot.d.ts.map +1 -1
- package/src/core/model/reactive/model/logic/ReactiveOr.d.ts +2 -1
- package/src/core/model/reactive/model/logic/ReactiveOr.d.ts.map +1 -1
- package/src/core/model/reactive/model/terminal/ReactiveLiteralBoolean.d.ts +2 -1
- package/src/core/model/reactive/model/terminal/ReactiveLiteralBoolean.d.ts.map +1 -1
- package/src/core/model/reactive/model/terminal/ReactiveLiteralNumber.d.ts +2 -3
- package/src/core/model/reactive/model/terminal/ReactiveLiteralNumber.d.ts.map +1 -1
- package/src/core/model/reactive/model/terminal/ReactiveLiteralString.d.ts +2 -4
- package/src/core/model/reactive/model/terminal/ReactiveLiteralString.d.ts.map +1 -1
- package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts +68 -11
- package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts.map +1 -1
- package/src/core/model/stat/LinearModifier.d.ts +79 -24
- package/src/core/parser/simple/DataType.d.ts +13 -5
- package/src/core/parser/simple/Token.d.ts +52 -13
- package/src/core/parser/simple/readArrayLiteral.d.ts +1 -0
- package/src/core/parser/simple/readArrayLiteral.d.ts.map +1 -1
- package/src/core/parser/simple/readBooleanToken.d.ts +1 -0
- package/src/core/parser/simple/readBooleanToken.d.ts.map +1 -1
- package/src/core/parser/simple/readHexToken.d.ts +1 -0
- package/src/core/parser/simple/readHexToken.d.ts.map +1 -1
- package/src/core/parser/simple/readIdentifierToken.d.ts +1 -0
- package/src/core/parser/simple/readIdentifierToken.d.ts.map +1 -1
- package/src/core/parser/simple/readNumberToken.d.ts +1 -0
- package/src/core/parser/simple/readNumberToken.d.ts.map +1 -1
- package/src/core/parser/simple/readReferenceToken.d.ts +1 -0
- package/src/core/parser/simple/readReferenceToken.d.ts.map +1 -1
- package/src/core/parser/simple/readStringToken.d.ts +1 -0
- package/src/core/parser/simple/readStringToken.d.ts.map +1 -1
- package/src/core/parser/simple/readUnsignedIntegerToken.d.ts +1 -0
- package/src/core/parser/simple/readUnsignedIntegerToken.d.ts.map +1 -1
- package/src/core/process/BaseProcess.d.ts +17 -5
- package/src/core/process/BaseProcess.d.ts.map +1 -1
- package/src/core/process/CompositeProcess.d.ts +0 -1
- package/src/core/process/CompositeProcess.d.ts.map +1 -1
- package/src/core/process/action/AsynchronousAction.d.ts +3 -3
- package/src/core/process/executor/ConcurrentExecutor.d.ts +3 -3
- package/src/core/process/filter/MutableFilter.d.ts +1 -1
- package/src/core/process/filter/MutableFilter.d.ts.map +1 -1
- package/src/core/process/task/Task.d.ts +1 -1
- package/src/core/process/task/Task.d.ts.map +1 -1
- package/src/core/process/task/TaskGroup.d.ts +3 -3
- package/src/core/process/task/TaskSignal.d.ts +8 -6
- package/src/core/process/undo/Action.d.ts +31 -9
- package/src/core/process/undo/ActionGroup.d.ts +20 -5
- package/src/core/process/undo/ActionProcessor.d.ts +163 -27
- package/src/core/process/undo/ActionProcessor.d.ts.map +1 -1
- package/src/engine/Engine.d.ts +178 -42
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/EngineConfiguration.d.ts +74 -20
- package/src/engine/achievements/AchievementGateway.d.ts +17 -5
- package/src/engine/achievements/AchievementManager.d.ts +0 -1
- package/src/engine/achievements/AchievementManager.d.ts.map +1 -1
- package/src/engine/animation/Tween.d.ts +1 -1
- package/src/engine/animation/clip/AnimationClip.d.ts +24 -4
- package/src/engine/animation/clip/AnimationClipBinding.d.ts +35 -14
- package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts +2 -2
- package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts.map +1 -1
- package/src/engine/animation/curve/editor/createKeyframeMarker.d.ts +1 -1
- package/src/engine/animation/curve/editor/createKeyframeMarker.d.ts.map +1 -1
- package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts +1 -1
- package/src/engine/animation/keyed2/behavior/AnimationBehavior.d.ts +0 -1
- package/src/engine/animation/keyed2/behavior/AnimationBehavior.d.ts.map +1 -1
- package/src/engine/asset/Asset.d.ts +47 -7
- package/src/engine/asset/AssetManager.d.ts +258 -60
- package/src/engine/asset/AssetRequestScope.d.ts +27 -3
- package/src/engine/asset/AssetTransformer.d.ts +16 -5
- package/src/engine/asset/CORS/CrossOriginConfig.d.ts +8 -5
- package/src/engine/asset/CORS/CrossOriginConfig.d.ts.map +1 -1
- package/src/engine/asset/CORS/CrossOriginKind.d.ts +5 -4
- package/src/engine/asset/loaders/AssetLoader.d.ts +50 -12
- package/src/engine/asset/loaders/GLTFAssetLoader.d.ts +71 -6
- package/src/engine/asset/loaders/image/ImageRGBADataAsset.d.ts +0 -1
- package/src/engine/asset/loaders/image/ImageRGBADataAsset.d.ts.map +1 -1
- package/src/engine/asset/loaders/material/StaticMaterialCache.d.ts +30 -7
- package/src/engine/asset/loaders/material/computeMaterialEquality.d.ts +8 -3
- package/src/engine/asset/loaders/material/computeMaterialHash.d.ts +7 -3
- package/src/engine/asset/loaders/material/traverseMaterialTextures.d.ts +8 -3
- package/src/engine/asset/loaders/texture/TextureAssetLoader.d.ts +6 -6
- package/src/engine/asset/preloader/AssetPreloader.d.ts +6 -15
- package/src/engine/asset/preloader/AssetPreloader.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +13 -13
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +14 -4
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts +1 -1
- package/src/engine/ecs/Entity.d.ts +228 -41
- package/src/engine/ecs/EntityBlueprint.d.ts +43 -17
- package/src/engine/ecs/EntityComponentDataset.d.ts +580 -60
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.d.ts +10 -9
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityObserver.d.ts +80 -13
- package/src/engine/ecs/System.d.ts +162 -33
- package/src/engine/ecs/animation/AnimationSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/animation/AnimationSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts +1 -1
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts.map +1 -1
- package/src/engine/ecs/components/PropertySetSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/components/PropertySetSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/components/SerializationMetadataSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/components/SerializationMetadataSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/components/TagSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/components/TagSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts.map +1 -1
- package/src/engine/ecs/fow/FogOfWar.d.ts +1 -1
- package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts +1 -1
- package/src/engine/ecs/fow/FogOfWarSystem.d.ts +1 -6
- package/src/engine/ecs/fow/FogOfWarSystem.d.ts.map +1 -1
- package/src/engine/ecs/fow/serialization/FogOfWarRevealerSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/fow/serialization/FogOfWarRevealerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/gui/GUIElement.d.ts +115 -5
- package/src/engine/ecs/gui/GUIElementSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/gui/GUIElementSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/gui/GUIElementSystem.d.ts +59 -8
- package/src/engine/ecs/gui/GUIElementSystem.d.ts.map +1 -1
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.d.ts +42 -6
- package/src/engine/ecs/gui/menu/radial/RadialContextMenu.d.ts +23 -22
- package/src/engine/ecs/gui/parallax/GuiElementParallaxSystem.d.ts +1 -1
- package/src/engine/ecs/gui/position/ViewportPositionSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/gui/position/ViewportPositionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPositionSystem.d.ts +1 -1
- package/src/engine/ecs/gui/view/ViewEntity.d.ts +1 -2
- package/src/engine/ecs/gui/view/ViewEntity.d.ts.map +1 -1
- package/src/engine/ecs/guid/UUIDSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/guid/UUIDSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts +1 -1
- package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts.map +1 -1
- package/src/engine/ecs/name/NameSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/name/NameSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/parent/ChildEntities.d.ts +23 -3
- package/src/engine/ecs/parent/EntityNode.d.ts +157 -25
- package/src/engine/ecs/parent/ParentEntity.d.ts +31 -11
- package/src/engine/ecs/parent/ParentEntitySystem.d.ts +44 -11
- package/src/engine/ecs/renderable/RenderSystem.d.ts +65 -7
- package/src/engine/ecs/renderable/Renderable.d.ts +95 -25
- package/src/engine/ecs/speaker/VoiceSystem.d.ts +3 -3
- package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
- package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.d.ts +86 -21
- package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +1 -1
- package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +1 -1
- package/src/engine/ecs/system/AbstractContextSystem.d.ts +1 -1
- package/src/engine/ecs/system_validate_class.d.ts +1 -1
- package/src/engine/ecs/system_validate_class.d.ts.map +1 -1
- package/src/engine/ecs/systems/AnimationSystem.d.ts +41 -6
- package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
- package/src/engine/ecs/systems/ScriptSystem.d.ts +9 -5
- package/src/engine/ecs/systems/ScriptSystem.d.ts.map +1 -1
- package/src/engine/ecs/systems/TimerSystem.d.ts +1 -1
- package/src/engine/ecs/systems/TimerSystem.d.ts.map +1 -1
- package/src/engine/ecs/team/TeamSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/team/TeamSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/OffsetScaleTransform2D.d.ts +7 -6
- package/src/engine/ecs/terrain/ecs/Terrain.d.ts +389 -17
- package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts +65 -8
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/serialization/TerrainSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/terrain/serialization/TerrainSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts +2 -2
- package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +2 -2
- package/src/engine/ecs/tooltip/TooltipComponentSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/tooltip/TooltipComponentSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/tooltip/TooltipComponentSystem.d.ts +1 -1
- package/src/engine/ecs/transform/TransformSerializationAdapter.d.ts +0 -1
- package/src/engine/ecs/transform/TransformSerializationAdapter.d.ts.map +1 -1
- package/src/engine/ecs/transform-attachment/TransformAttachment.d.ts +116 -19
- package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts +58 -6
- package/src/engine/graphics/GraphicsEngine.d.ts +220 -41
- package/src/engine/graphics/camera/CameraShake.d.ts +6 -6
- package/src/engine/graphics/camera/CameraShake.d.ts.map +1 -1
- package/src/engine/graphics/camera/CameraShakeBehavior.d.ts +1 -2
- package/src/engine/graphics/camera/CameraShakeBehavior.d.ts.map +1 -1
- package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts +1 -2
- package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts.map +1 -1
- package/src/engine/graphics/camera/camera_compute_distance_to_fit_length.d.ts +8 -1
- package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts +8 -4
- package/src/engine/graphics/composit/CompositLayer.d.ts +1 -1
- package/src/engine/graphics/ecs/animation/AnimationControllerSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/animation/AnimationControllerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts +1 -2
- package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraphSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraphSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/Camera.d.ts +113 -18
- package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +74 -10
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts +90 -33
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts +34 -5
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLander.d.ts +0 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLander.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts +52 -15
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts +70 -24
- package/src/engine/graphics/ecs/highlight/Highlight.d.ts +61 -16
- package/src/engine/graphics/ecs/highlight/HighlightDefinition.d.ts +57 -19
- package/src/engine/graphics/ecs/highlight/HighlightSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/highlight/HighlightSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts +0 -1
- package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts +57 -8
- package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts +62 -8
- package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts +68 -8
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/Light.d.ts +79 -19
- package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/LightSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/light/LightSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/LightSystem.d.ts +123 -11
- package/src/engine/graphics/ecs/light/LightType.d.ts +8 -6
- package/src/engine/graphics/ecs/mesh/Mesh.d.ts +176 -30
- package/src/engine/graphics/ecs/mesh/MeshEvents.d.ts +6 -12
- package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts +99 -7
- package/src/engine/graphics/ecs/mesh/serialization/MeshSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/mesh/serialization/MeshSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/DrawMode.d.ts +8 -6
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts +147 -32
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +37 -0
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGAnimationPlayback.d.ts +6 -5
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMesh.d.ts +162 -25
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationController.d.ts +40 -12
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.d.ts +31 -11
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshEvents.d.ts +5 -12
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.d.ts +36 -7
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.d.ts +63 -8
- package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.d.ts +9 -4
- package/src/engine/graphics/ecs/path/PathDisplay.d.ts +21 -9
- package/src/engine/graphics/ecs/path/PathDisplayEvents.d.ts +6 -3
- package/src/engine/graphics/ecs/path/PathDisplaySpec.d.ts +28 -11
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts +55 -10
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/PathDisplayType.d.ts +8 -6
- package/src/engine/graphics/ecs/path/entity/EntityPathMarkerDefinition.d.ts +39 -8
- package/src/engine/graphics/ecs/path/entity/EntityPathStyle.d.ts +38 -12
- package/src/engine/graphics/ecs/path/highlight/PathDisplayHighlightSystem.d.ts +31 -7
- package/src/engine/graphics/ecs/path/ribbon/RibbonPathStyle.d.ts +24 -7
- package/src/engine/graphics/ecs/path/tube/BasicMaterialDefinition.d.ts +4 -3
- package/src/engine/graphics/ecs/path/tube/CapType.d.ts +7 -5
- package/src/engine/graphics/ecs/path/tube/MatcapMaterialDefinition.d.ts +11 -3
- package/src/engine/graphics/ecs/path/tube/PathNormalType.d.ts +6 -4
- package/src/engine/graphics/ecs/path/tube/StandardMaterialDefinition.d.ts +9 -4
- package/src/engine/graphics/ecs/path/tube/TubeMaterialType.d.ts +7 -6
- package/src/engine/graphics/ecs/path/tube/TubePathStyle.d.ts +114 -35
- package/src/engine/graphics/ecs/path/tube/TubePathStyle.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +85 -6
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/water/WaterSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/ecs/water/WaterSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/water/WaterSystem.d.ts +1 -1
- package/src/engine/graphics/geometry/AttributeGroupSpec.d.ts +75 -25
- package/src/engine/graphics/geometry/AttributeSpec.d.ts +85 -12
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts +1 -2
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/grid/OctahedralUvEncoder.d.ts +6 -4
- package/src/engine/graphics/material/manager/MaterialManager.d.ts +12 -0
- package/src/engine/graphics/material/manager/MaterialManager.d.ts.map +1 -1
- package/src/engine/graphics/material/manager/MaterialManager.js +78 -41
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts +55 -7
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/codegen/glsl/getTypeByteSize.d.ts +9 -9
- package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.d.ts +1 -2
- package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/FloatConstant.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/FloatConstant.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/ParticleDataTypes.d.ts +10 -9
- package/src/engine/graphics/particles/node-based/nodes/ParticleDataTypes.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/ReadFloatUniform.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/ReadFloatUniform.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/ReadVelocity.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/ReadVelocity.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Constant.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Constant.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Merge.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Merge.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Split.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/Vector3Split.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/WriteVelocity.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/WriteVelocity.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/attribute/ReadVector3Attribute.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/attribute/ReadVector3Attribute.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/attribute/WriteVector3Attribute.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/attribute/WriteVector3Attribute.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/math/AddFloatNode.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/math/AddFloatNode.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Add.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Add.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Divide.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Divide.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Multiply.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Multiply.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Subtract.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/math/Vector3Subtract.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/nodes/noise/CurlNoiseNode.d.ts +0 -1
- package/src/engine/graphics/particles/node-based/nodes/noise/CurlNoiseNode.d.ts.map +1 -1
- package/src/engine/graphics/particles/node-based/particle/ParticleAttributeSpecification.d.ts +18 -18
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +252 -2
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +2 -15
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +5 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +5 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +76 -16
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +6 -4
- package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts +92 -8
- package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts.map +1 -1
- package/src/engine/graphics/render/buffer/simple-fx/ao/SAOUpscaleShader.js +78 -37
- package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.d.ts +0 -3
- package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/Decal.d.ts +1 -1
- package/src/engine/graphics/render/forward_plus/model/Decal.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.d.ts +27 -5
- package/src/engine/graphics/render/forward_plus/plugin/MaterialTransformer.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/plugin/MaterialTransformer.js +4 -9
- package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.d.ts +16 -0
- package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.d.ts.map +1 -0
- package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.js +18 -0
- package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.d.ts +16 -0
- package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.d.ts.map +1 -0
- package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.js +31 -0
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts +1 -1
- package/src/engine/graphics/render/gizmo/Gizmo.d.ts +7 -3
- package/src/engine/graphics/render/gizmo/GizmoRenderingPlugin.d.ts +5 -5
- package/src/engine/graphics/render/gizmo/GizmoRenderingPlugin.d.ts.map +1 -1
- package/src/engine/graphics/render/gizmo/GizmoShapeRenderingInterface.d.ts +72 -13
- package/src/engine/graphics/render/layers/RenderLayer.d.ts +78 -22
- package/src/engine/graphics/render/layers/RenderLayerManager.d.ts +72 -17
- package/src/engine/graphics/render/layers/RenderLayerState.d.ts +18 -3
- package/src/engine/graphics/render/view/CameraView.d.ts +3 -3
- package/src/engine/graphics/render/view/CameraViewManager.d.ts +2 -2
- package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts +143 -24
- package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts +3 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts +1 -2
- package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts +3 -3
- package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts +13 -8
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/serialization/Sampler2DSerializationAdapter.d.ts +0 -1
- package/src/engine/graphics/texture/sampler/serialization/Sampler2DSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +1 -3
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts.map +1 -1
- package/src/engine/graphics/three/cloneObject3D.d.ts +7 -3
- package/src/engine/graphics/trail/tube/TubeXPlugin.d.ts +0 -1
- package/src/engine/graphics/trail/tube/TubeXPlugin.d.ts.map +1 -1
- package/src/engine/graphics/trail/x/RibbonXMaterialSpec.d.ts +13 -3
- package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts +0 -3
- package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts.map +1 -1
- package/src/engine/graphics/util/promiseMaterialLoaded.d.ts +7 -3
- package/src/engine/grid/grid2transform/GridPosition2TransformSerializationAdapter.d.ts +0 -1
- package/src/engine/grid/grid2transform/GridPosition2TransformSerializationAdapter.d.ts.map +1 -1
- package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts +1 -1
- package/src/engine/grid/obstacle/GridObstacleSerializationAdapter.d.ts +0 -1
- package/src/engine/grid/obstacle/GridObstacleSerializationAdapter.d.ts.map +1 -1
- package/src/engine/grid/position/GridPositionSerializationAdapter.d.ts +0 -1
- package/src/engine/grid/position/GridPositionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/grid/position/GridPositionSystem.d.ts +1 -1
- package/src/engine/grid/transform2grid/Transform2GridPositionSystem.d.ts +1 -1
- package/src/engine/input/GAMEPAD_API_PROPOSAL.md +717 -0
- package/src/engine/input/analog/apply_radial_dead_zone.d.ts +23 -0
- package/src/engine/input/analog/apply_radial_dead_zone.d.ts.map +1 -0
- package/src/engine/input/analog/apply_radial_dead_zone.js +38 -0
- package/src/engine/input/devices/GamepadDevice.d.ts +140 -23
- package/src/engine/input/devices/GamepadDevice.d.ts.map +1 -1
- package/src/engine/input/devices/GamepadDevice.js +202 -16
- package/src/engine/input/devices/InputDeviceSwitch.d.ts +44 -11
- package/src/engine/input/devices/InputDeviceSwitch.d.ts.map +1 -1
- package/src/engine/input/devices/KeyCodes.d.ts +112 -1
- package/src/engine/input/devices/KeyboardDevice.d.ts +2 -3
- package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
- package/src/engine/input/devices/PointerDevice.d.ts +96 -31
- package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
- package/src/engine/input/devices/events/KeyboardEvents.d.ts +5 -4
- package/src/engine/input/devices/events/MouseEvents.d.ts +18 -12
- package/src/engine/input/devices/events/TouchEvents.d.ts +12 -6
- package/src/engine/input/devices/gamepad/GamepadAxes.d.ts +5 -1
- package/src/engine/input/devices/gamepad/GamepadAxes.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadAxes.js +5 -1
- package/src/engine/input/devices/gamepad/GamepadHandle.d.ts +130 -26
- package/src/engine/input/devices/gamepad/GamepadHandle.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadHandle.js +60 -34
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts +20 -0
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadStandardMapping.js +20 -0
- package/src/engine/input/devices/gamepad/GamepadStick.d.ts +93 -0
- package/src/engine/input/devices/gamepad/GamepadStick.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadStick.js +165 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts +84 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.js +119 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibrator.d.ts +92 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibrator.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibrator.js +250 -0
- package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.d.ts +17 -0
- package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.d.ts.map +1 -0
- package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.js +30 -0
- package/src/engine/input/devices/touch/TouchDevice.d.ts +3 -3
- package/src/engine/input/ecs/components/Input.d.ts +49 -6
- package/src/engine/input/ecs/components/InputController.d.ts +33 -3
- package/src/engine/input/ecs/ism/InputBinding.d.ts +40 -4
- package/src/engine/input/ecs/systems/InputControllerSystem.d.ts +28 -6
- package/src/engine/input/ecs/systems/InputSystem.d.ts +59 -6
- package/src/engine/intelligence/behavior/Behavior.d.ts +58 -16
- package/src/engine/intelligence/behavior/Behavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/BehaviorStatus.d.ts +10 -8
- package/src/engine/intelligence/behavior/SelectorBehavior.d.ts +0 -1
- package/src/engine/intelligence/behavior/SelectorBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts +0 -8
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts +0 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts +0 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponentSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponentSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts +0 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/OrbitingBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/ecs/OrbitingBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts +1 -3
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts +2 -4
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts +1 -3
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehaviorSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehaviorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts +1 -3
- package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/ConditionBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/util/ConditionBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts +1 -3
- package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +4 -4
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/util/RotationBehavior.d.ts +1 -2
- package/src/engine/intelligence/behavior/util/RotationBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/AbstractBlackboard.d.ts +58 -15
- package/src/engine/intelligence/blackboard/AbstractBlackboard.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/Blackboard.d.ts +79 -11
- package/src/engine/intelligence/blackboard/Blackboard.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/BlackboardSerializationAdapter.d.ts +0 -1
- package/src/engine/intelligence/blackboard/BlackboardSerializationAdapter.d.ts.map +1 -1
- package/src/engine/intelligence/blackboard/BlackboardValue.d.ts +1 -0
- package/src/engine/intelligence/blackboard/BlackboardValue.d.ts.map +1 -1
- package/src/engine/intelligence/controller/graph/StateGraphSystem.d.ts +1 -3
- package/src/engine/intelligence/controller/graph/StateGraphSystem.d.ts.map +1 -1
- package/src/engine/interpolation/InterpolationSystem.d.ts +1 -5
- package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -1
- package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts +0 -1
- package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts.map +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts +140 -9
- package/src/engine/knowledge/database/StaticKnowledgeDataTableDescriptor.d.ts +26 -7
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts +2 -3
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
- package/src/engine/navigation/ecs/components/InterpolationType.d.ts +8 -4
- package/src/engine/navigation/ecs/components/Path.d.ts +167 -47
- package/src/engine/navigation/ecs/components/PathEvents.d.ts +8 -6
- package/src/engine/navigation/ecs/components/PathSerializationAdapter.d.ts +0 -1
- package/src/engine/navigation/ecs/components/PathSerializationAdapter.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollower.d.ts +85 -45
- package/src/engine/navigation/ecs/path_following/PathFollowerEventType.d.ts +5 -3
- package/src/engine/navigation/ecs/path_following/PathFollowerFlags.d.ts +14 -20
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts +0 -1
- package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts.map +1 -1
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts +31 -6
- package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.d.ts +0 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.d.ts.map +1 -1
- package/src/engine/network/ecs/NetworkSystem.d.ts +1 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts +0 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts.map +1 -1
- package/src/engine/options/Option.d.ts +3 -3
- package/src/engine/options/OptionsView.d.ts +1 -2
- package/src/engine/options/OptionsView.d.ts.map +1 -1
- package/src/engine/physics/body/SolverBodyState.d.ts.map +1 -1
- package/src/engine/physics/body/SolverBodyState.js +10 -1
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +840 -830
- package/src/engine/physics/ecs/ColliderObserverSystem.d.ts +3 -3
- package/src/engine/physics/ecs/ColliderObserverSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts +0 -1
- package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/ecs/JointSerializationAdapter.d.ts +0 -1
- package/src/engine/physics/ecs/JointSerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -2
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +2246 -2172
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts +0 -1
- package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +12 -8
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +8 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
- package/src/engine/physics/integration/integrate_velocity.d.ts.map +1 -1
- package/src/engine/physics/integration/integrate_velocity.js +25 -2
- package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/capsule_contacts.js +622 -617
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/convex_convex_manifold.js +632 -568
- package/src/engine/physics/solver/solve_contacts.d.ts +6 -5
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -1
- package/src/engine/physics/solver/solve_contacts.js +1506 -1482
- package/src/engine/platform/EnginePlatform.d.ts +24 -14
- package/src/engine/platform/WebEnginePlatform.d.ts +20 -5
- package/src/engine/platform/WebEnginePlatform.d.ts.map +1 -1
- package/src/engine/plugin/EnginePlugin.d.ts +36 -3
- package/src/engine/plugin/EnginePlugin.d.ts.map +1 -1
- package/src/engine/plugin/EnginePluginManager.d.ts +85 -16
- package/src/engine/plugin/EnginePluginManager.d.ts.map +1 -1
- package/src/engine/plugin/PluginReferenceContext.d.ts +1 -1
- package/src/engine/reference/v2/Reference.d.ts +55 -17
- package/src/engine/reference/v2/Reference.d.ts.map +1 -1
- package/src/engine/save/GameStateLoader.d.ts +0 -1
- package/src/engine/save/GameStateLoader.d.ts.map +1 -1
- package/src/engine/save/Storage.d.ts +75 -15
- package/src/engine/save/storage/InMemoryStorage.d.ts +0 -1
- package/src/engine/save/storage/InMemoryStorage.d.ts.map +1 -1
- package/src/engine/save/storage/IndexedDBStorage.d.ts +0 -2
- package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
- package/src/engine/scene/Scene.d.ts +65 -7
- package/src/engine/scene/SceneManager.d.ts +125 -25
- package/src/engine/simulation/Ticker.d.ts +1 -2
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/sound/SoundEngine.d.ts +46 -3
- package/src/engine/sound/ecs/SoundController.d.ts +0 -1
- package/src/engine/sound/ecs/SoundController.d.ts.map +1 -1
- package/src/engine/sound/ecs/SoundControllerSystem.d.ts +1 -2
- package/src/engine/sound/ecs/SoundControllerSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/SoundListener.d.ts +0 -1
- package/src/engine/sound/ecs/SoundListener.d.ts.map +1 -1
- package/src/engine/sound/ecs/SoundListenerSystem.d.ts +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitter.d.ts +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitter.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitterSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/ecs/emitter/SoundEmitterSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts +1 -1
- package/src/engine/sound/ecs/emitter/SoundTrack.d.ts +1 -2
- package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/AcousticMediumSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/core/AcousticMediumSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/simulation/definition/AcousticDirectivitySerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/definition/AcousticDirectivitySerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/simulation/definition/AcousticMaterialSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/definition/AcousticMaterialSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/simulation/ecs/AcousticBodySerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/ecs/AcousticBodySerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/simulation/ecs/AcousticProbeFieldSystem.d.ts +1 -1
- package/src/engine/sound/simulation/ecs/AcousticSimulationSystem.d.ts +1 -1
- package/src/engine/sound/simulation/ecs/AcousticVolumeSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/ecs/AcousticVolumeSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/simulation/ecs/AcousticVolumeSystem.d.ts +1 -1
- package/src/engine/sound/simulation/probe/AcousticProbeFieldSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/simulation/probe/AcousticProbeFieldSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/BusDefinitionSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/BusDefinitionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/DuckingRuleSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/DuckingRuleSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/MixerSnapshotSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/MixerSnapshotSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/ParameterDefinitionSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/ParameterDefinitionSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SampleAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/SampleAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SilenceAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/SilenceAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClipSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClipSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffectSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/effect/CompressorEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/EqEffectSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/effect/EqEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/ReverbEffectSerializationAdapter.d.ts +0 -1
- package/src/engine/sound/sopra/definition/effect/ReverbEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts +1 -2
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/ParameterStore.d.ts +1 -2
- package/src/engine/sound/sopra/runtime/ParameterStore.d.ts.map +1 -1
- package/src/engine/ui/bindings/DomElementProcessorManager.d.ts +0 -3
- package/src/engine/ui/bindings/DomElementProcessorManager.d.ts.map +1 -1
- package/src/engine/ui/modal/ModalStack.d.ts +3 -3
- package/src/engine/ui/notification/AnimatedObjectEmitter.d.ts +2 -2
- package/src/engine/ui/notification/ViewEmitter.d.ts +2 -2
- package/src/generation/filtering/CellFilter.d.ts +1 -1
- package/src/generation/filtering/CellFilter.d.ts.map +1 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts +3 -1
- package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts.map +1 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts +3 -1
- package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts +3 -1
- package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts +3 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts.map +1 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts +3 -1
- package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts.map +1 -1
- package/src/generation/placement/action/util/CellMatcherWithinAABB.d.ts +1 -1
- package/src/generation/placement/action/util/CellMatcherWithinAABB.d.ts.map +1 -1
- package/src/misc/makeMatcapSelectionOption.d.ts +11 -13
- package/src/view/View.d.ts +313 -30
- package/src/view/asset/AssetLoaderStatusView.d.ts +1 -1
- package/src/view/asset/PreloaderView.d.ts +1 -1
- package/src/view/common/LabelView.d.ts +2 -1
- package/src/view/common/LabelView.d.ts.map +1 -1
- package/src/view/common/ListView.d.ts +2 -2
- package/src/view/common/ListView.d.ts.map +1 -1
- package/src/view/common/TabbedView.d.ts +1 -1
- package/src/view/common/VirtualListView.d.ts +3 -3
- package/src/view/common/VirtualListView.d.ts.map +1 -1
- package/src/view/common/dnd/Draggable.d.ts +2 -2
- package/src/view/common/dnd/DropTarget.d.ts +6 -6
- package/src/view/controller/GuiController.d.ts +1 -2
- package/src/view/controller/GuiController.d.ts.map +1 -1
- package/src/view/controller/controls/BooleanVector3Control.d.ts +1 -2
- package/src/view/controller/controls/BooleanVector3Control.d.ts.map +1 -1
- package/src/view/controller/controls/NativeListController.d.ts +1 -1
- package/src/view/controller/controls/Vector1Control.d.ts +1 -1
- package/src/view/currency/CompositeCurrencyLabelView.d.ts +1 -1
- package/src/view/currency/CurrencyDenominationLabelView.d.ts +1 -1
- package/src/view/elements/BottomLeftResizeHandleView.d.ts +1 -1
- package/src/view/elements/CanvasView.d.ts +1 -2
- package/src/view/elements/CanvasView.d.ts.map +1 -1
- package/src/view/elements/CheckboxView.d.ts +1 -1
- package/src/view/elements/CompassArrowView.d.ts +1 -2
- package/src/view/elements/CompassArrowView.d.ts.map +1 -1
- package/src/view/elements/ConfirmationDialogView.d.ts +1 -1
- package/src/view/elements/DropDownSelectionView.d.ts +1 -1
- package/src/view/elements/EmptyView.d.ts +1 -2
- package/src/view/elements/EmptyView.d.ts.map +1 -1
- package/src/view/elements/Group.d.ts +1 -2
- package/src/view/elements/Group.d.ts.map +1 -1
- package/src/view/elements/MeshPreview.d.ts +1 -1
- package/src/view/elements/SimpleWindow.d.ts +1 -1
- package/src/view/elements/button/ButtonView.d.ts +1 -1
- package/src/view/elements/image/ImageView.d.ts +1 -2
- package/src/view/elements/image/ImageView.d.ts.map +1 -1
- package/src/view/elements/image/SvgImageView.d.ts +1 -1
- package/src/view/elements/label/LabeledValueView.d.ts +1 -1
- package/src/view/elements/navigation/ViewStack.d.ts +1 -8
- package/src/view/elements/navigation/ViewStack.d.ts.map +1 -1
- package/src/view/elements/notify/ToastLogView.d.ts +1 -1
- package/src/view/elements/progress/RectangularPieProgressView.d.ts +1 -1
- package/src/view/elements/progress/SmoothProgressBar.d.ts +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +1 -1
- package/src/view/elements/radial/RadialMenu.d.ts +1 -1
- package/src/view/elements/radial/RadialMenuElement.d.ts +1 -1
- package/src/view/elements/radial/RadialMenuElementDefinition.d.ts +125 -39
- package/src/view/elements/radial/RadialProgressView.d.ts +1 -1
- package/src/view/elements/radial/RadialText.d.ts +1 -1
- package/src/view/elements/tiles2d/Tile.d.ts +1 -1
- package/src/view/elements/tiles2d/TileGrid.d.ts +4 -5
- package/src/view/elements/tiles2d/TileGrid.d.ts.map +1 -1
- package/src/view/elements/video/VideoView.d.ts +2 -2
- package/src/view/elements/video/VideoView.d.ts.map +1 -1
- package/src/view/elements/windrose/WindRoseDiagram.d.ts +1 -1
- package/src/view/game/achievements/AchievementNotificationView.d.ts +1 -1
- package/src/view/math/FunctionGraphView.d.ts +1 -1
- package/src/view/minimap/Minimap.d.ts +1 -1
- package/src/view/minimap/dom/MinimapCameraView.d.ts +1 -1
- package/src/view/minimap/dom/MinimapMarkerView.d.ts +1 -1
- package/src/view/minimap/dom/MinimapTerrainView.d.ts +1 -1
- package/src/view/task/TaskProgressView.d.ts +1 -1
- package/src/view/tooltip/DomTooltipObserver.d.ts +2 -2
- package/src/view/tooltip/TooltipView.d.ts +1 -1
- package/src/view/tooltip/gml/parser/parseTooltipString.d.ts +1 -0
- package/src/view/tooltip/gml/parser/parseTooltipString.d.ts.map +1 -1
- package/src/view/tooltip/gml/parser/readReferenceToken.d.ts +1 -0
- package/src/view/tooltip/gml/parser/readReferenceToken.d.ts.map +1 -1
- package/src/view/tooltip/gml/parser/readReferenceValueToken.d.ts +2 -1
- package/src/view/tooltip/gml/parser/readReferenceValueToken.d.ts.map +1 -1
- package/src/view/tooltip/gml/parser/readStyleToken.d.ts +1 -0
- package/src/view/tooltip/gml/parser/readStyleToken.d.ts.map +1 -1
- package/editor/ecs/component/TypeSchema.d.ts +0 -38
- package/editor/tools/v2/BlenderCameraOrientationGizmo.d.ts +0 -50
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
# Gamepad API — proposal
|
|
2
|
+
|
|
3
|
+
Response to the external review *"how convenient is the meep gamepad API? (UX)"*.
|
|
4
|
+
|
|
5
|
+
> **Revision 2.** P1, P4, P5, P6 accepted as written. **P2 replaced** with a persistent `main` handle (better than
|
|
6
|
+
> slot pre-population — see §4.2). **P3 replaced** with learned per-stick calibration and a `GamepadStick`
|
|
7
|
+
> abstraction, grounded in the survey in Appendix A. Revision 1's fixed `axisNoiseFloor` is withdrawn.
|
|
8
|
+
>
|
|
9
|
+
> **Revision 3 — implemented.** All of P1–P6 have landed. §4 describes the design **as shipped**: names,
|
|
10
|
+
> constants and signatures there match the code. §6 records what changed between the proposal and the
|
|
11
|
+
> implementation, and why. §1, §2 and §5 are unchanged — they are the argument, not the design.
|
|
12
|
+
|
|
13
|
+
## 0. Summary
|
|
14
|
+
|
|
15
|
+
The review grades a hardware abstraction layer by how little game code the consumer had to write. That is the
|
|
16
|
+
wrong axis, and it leads to the wrong headline recommendation.
|
|
17
|
+
|
|
18
|
+
Checked against the source:
|
|
19
|
+
|
|
20
|
+
* one papercut (**sparse `buttons`**) does not reproduce through any supported access path — the guard the
|
|
21
|
+
reviewer wrote is dead code;
|
|
22
|
+
* one technical claim (**"full-diagonal magnitude ~0.99"**) is not producible by this code at all — there is no
|
|
23
|
+
rescaling path in `GamepadHandle#update`;
|
|
24
|
+
* one papercut (**"the `.d.ts` doesn't carry the frame"**) is about a file that does not exist — `engine/input`
|
|
25
|
+
contains zero `.d.ts` files, and the frame *is* documented, on the enum that defines it;
|
|
26
|
+
* the headline recommendation (**`pad.getMovement({radialDeadzone})`**) moves gameplay policy, a coordinate
|
|
27
|
+
convention, an options bag, and a per-frame allocation into the driver.
|
|
28
|
+
|
|
29
|
+
The review did, however, bump into a **real structural gap and misdiagnose it**: the gamepad is effectively
|
|
30
|
+
invisible to the engine's input binding layer (`InputSystem` / `InputControllerSystem`). That is *why* the
|
|
31
|
+
reviewer ended up hand-fusing raw device state — not because the device lacks convenience methods. Closing that
|
|
32
|
+
gap removes the "boilerplate every consumer will duplicate" without adding a single convenience method to
|
|
33
|
+
`GamepadHandle`.
|
|
34
|
+
|
|
35
|
+
Two of the underlying observations are worth acting on, in a different shape than proposed.
|
|
36
|
+
|
|
37
|
+
### Dispositions
|
|
38
|
+
|
|
39
|
+
| # | Review item | Disposition |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| 1 | `buttons` sparse → add `pad.isDown(i)` | **Reject the mechanism, accept the goal.** Claim doesn't reproduce; fix uniformity at the source (P1), don't add a third accessor. |
|
|
42
|
+
| 2 | `pad.getMovement({radialDeadzone})` | **Reject.** Policy in the driver. Decomposed into two device-agnostic primitives instead (P4, P5). |
|
|
43
|
+
| 3 | Per-axis dead-zone leaks diagonals; shortens full diagonal to ~0.99 | **Half accept.** The `~0.99` claim is fabricated. The genuine defect is different and worse: the gate is destructive, misnamed, and *guesses* a number that varies 6× across hardware. Replaced by learned calibration (P3). |
|
|
44
|
+
| 4 | Frame undocumented "at the type level" | **Reject as stated, accept a sliver.** No `.d.ts` exists; frame is documented in `GamepadAxes.js`. Add a cross-reference on `axes`/`stickLeft`/`stickRight` (P6). |
|
|
45
|
+
| 5 | No digital view of stick / analog view of D-pad; fusion is on the caller | **Accept the observation, keep fusion on the caller.** Ship the two primitives, not the fused result (P5). |
|
|
46
|
+
| 6 | Analog-vs-digital speed is game policy | **Agree, no action.** |
|
|
47
|
+
| — | *(missed)* Gamepad is unbindable through the ISM path layer | **New work.** The actual defect (P1 + P2). |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 1. The layering premise the review is missing
|
|
52
|
+
|
|
53
|
+
meep input devices are **state mirrors of hardware**. They report what the hardware reports, plus the minimum
|
|
54
|
+
hygiene needed to make polled hardware observable (edge detection, stuck-input release on disconnect/stop). They
|
|
55
|
+
contain no game policy. This is not an accident of the gamepad implementation — it is the shape of the whole
|
|
56
|
+
package:
|
|
57
|
+
|
|
58
|
+
* `KeyboardDevice` exposes `keys.w.is_down`. It does not expose `keyboard.getMovement()` from WASD.
|
|
59
|
+
* Nobody asks it to, because the layer that owns that question already exists:
|
|
60
|
+
[`KeyboardCameraController.js`](ecs/controllers/KeyboardCameraController.js) — a *controller* that reads device
|
|
61
|
+
switches and produces a camera-frame pan vector.
|
|
62
|
+
|
|
63
|
+
`pad.getMovement()` is a request to put `KeyboardCameraController`'s job inside `KeyboardDevice`. Five concrete
|
|
64
|
+
reasons it does not belong there:
|
|
65
|
+
|
|
66
|
+
1. **The game frame is not a property of the stick.** The reviewer wants `+y = up`. Up in *what*? meep's world is
|
|
67
|
+
3D; "stick up" maps to a world direction that depends on the camera yaw, the projection, and whether the game
|
|
68
|
+
is top-down or third-person. `KeyboardCameraController` resolves exactly this and it needs a
|
|
69
|
+
`TopDownCameraController` to do it. A `Vector2` on a driver cannot know the answer, so any answer it bakes in
|
|
70
|
+
is wrong for some consumer — who then must un-negate it. That is strictly worse than never negating.
|
|
71
|
+
|
|
72
|
+
2. **Dead-zoning is not one policy.** Radial-with-rescale is right for locomotion; per-axis is right for menu
|
|
73
|
+
navigation; inner+outer with a response curve is right for aiming; square-gate normalization is right for
|
|
74
|
+
pads that report a square gate. `{radialDeadzone}` picks one and demotes the rest to "off the golden path".
|
|
75
|
+
|
|
76
|
+
3. **`{radialDeadzone}` is an options bag.** The codebase's position is typed and verbose over magic-looking
|
|
77
|
+
configuration. An options object on a per-frame hot call is the opposite of that, and it grows monotonically
|
|
78
|
+
— the next request is `{radialDeadzone, outerDeadzone, curve, squareGate}`.
|
|
79
|
+
|
|
80
|
+
4. **It allocates.** `getMovement()` returning a fresh `Vector2` allocates once per consumer per frame. The
|
|
81
|
+
engine's convention for vector-producing calls is `f(result, ...)` writing into a caller-owned target.
|
|
82
|
+
|
|
83
|
+
5. **It creates a dual-mode API.** With `getMovement()` present, `stickLeft` becomes "the raw one" and
|
|
84
|
+
`getMovement()` "the good one" — two ways to ask the same question with a silent policy difference between
|
|
85
|
+
them. Uniform control flow means picking the common case as the *only* case at each layer, and letting
|
|
86
|
+
callers who want something else drop to the lower-level primitive.
|
|
87
|
+
|
|
88
|
+
What the reviewer actually wants is real. It just belongs one layer up, and it should be *composable functions*,
|
|
89
|
+
not a method on the driver.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 2. Item-by-item
|
|
94
|
+
|
|
95
|
+
*Line references in this section point at the code **as reviewed**, before any of P1–P6 landed. They are part of
|
|
96
|
+
the argument about what the reviewer was looking at, not navigation aids for the current tree.*
|
|
97
|
+
|
|
98
|
+
### 2.1 "`buttons` is lazily populated and sparse, so I wrote a guard"
|
|
99
|
+
|
|
100
|
+
**This does not reproduce.** Trace the code:
|
|
101
|
+
|
|
102
|
+
* [`GamepadHandle.js:140`](devices/gamepad/GamepadHandle.js:140) — `update()` iterates **every** button in the
|
|
103
|
+
native snapshot and calls `getButton(i)` on each. After one update, `buttons[0 … n-1]` are all populated.
|
|
104
|
+
* [`GamepadDevice.js:130`](devices/GamepadDevice.js:130) — `#connect()` calls `pad.update(...)` **before**
|
|
105
|
+
setting `pad.connected = true`.
|
|
106
|
+
* [`GamepadDevice.js:86`](devices/GamepadDevice.js:86) — `main` only returns pads with `connected === true`.
|
|
107
|
+
|
|
108
|
+
So every handle reachable through `gamepad.main` has already had its full button set materialised.
|
|
109
|
+
`pad.buttons[GamepadButtons.a].is_down` is safe, and the `button !== undefined &&` half of the reviewer's guard
|
|
110
|
+
never evaluates false in a connected-pad path. The `?.` in the existing `@example` is belt-and-braces, and reads
|
|
111
|
+
as a warning it isn't.
|
|
112
|
+
|
|
113
|
+
The one residual hole is real but different: a **non-standard mapping** pad reporting fewer than 17 buttons.
|
|
114
|
+
`buttons[GamepadButtons.dpad_up]` is genuinely `undefined` there, because the button does not exist.
|
|
115
|
+
`pad.isDown(15)` would return `false` for it — converting "this hardware has no D-pad" into "the D-pad is not
|
|
116
|
+
pressed", silently, forever. That is a worse API than the honest `undefined`, and it is the reason to reject the
|
|
117
|
+
proposed mechanism specifically.
|
|
118
|
+
|
|
119
|
+
**The goal is still right.** Keyboard/gamepad symmetry should not have an asterisk, and `pads`/`buttons`
|
|
120
|
+
sparseness has a second, much more serious consequence (§3). Fix it at the source: pre-populate (P1/P2), so
|
|
121
|
+
there is nothing to guard and no third accessor.
|
|
122
|
+
|
|
123
|
+
### 2.2 `getMovement()` — rejected
|
|
124
|
+
|
|
125
|
+
See §1. Replaced by P4 + P5.
|
|
126
|
+
|
|
127
|
+
### 2.3 "Per-axis dead-zoning leaks diagonal drift and shortens the full diagonal to ~0.99"
|
|
128
|
+
|
|
129
|
+
**First half: correct.** A per-axis gate at 0.1 admits up to `sqrt(0.1² + 0.1²) ≈ 0.141` of resting magnitude,
|
|
130
|
+
and its boundary is anisotropic — a stick pushed to `(0.09, 0.09)` reads dead, `(0.11, 0.0)` reads live.
|
|
131
|
+
|
|
132
|
+
**Second half: not producible by this code.** The gate is
|
|
133
|
+
[`GamepadHandle.js:169`](devices/gamepad/GamepadHandle.js:169):
|
|
134
|
+
|
|
135
|
+
```js
|
|
136
|
+
if (Math.abs(value) < deadZone) {
|
|
137
|
+
value = 0;
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
There is no rescale, no normalization, no magnitude clamp anywhere in `update()`. A full-deflection axis passes
|
|
142
|
+
through byte-identical to what the hardware reported. If the reviewer measured 0.99 at full diagonal, that was
|
|
143
|
+
their pad's gate, not ours. This matters because it is the tell that the section was reasoned about rather than
|
|
144
|
+
read — and the actual defect sitting three lines away was missed.
|
|
145
|
+
|
|
146
|
+
**The actual defect** is threefold and worse than "leaks diagonals":
|
|
147
|
+
|
|
148
|
+
1. **It is destructive.** The gated value is what gets *stored* in `axes`, so a consumer who wants radial
|
|
149
|
+
dead-zoning cannot recover the raw signal — the information is gone before they see it. Policy applied in a
|
|
150
|
+
mirror layer is not just misplaced, it is lossy.
|
|
151
|
+
2. **It is discontinuous.** `0.0999 → 0`, `0.1001 → 0.1001`. Input magnitude jumps by the full dead-zone width
|
|
152
|
+
the instant the threshold is crossed. Any consumer mapping magnitude to speed gets a visible speed pop.
|
|
153
|
+
3. **It is named for a policy it should not be implementing.** `deadZone` at `0.1` reads as "the engine has
|
|
154
|
+
decided your gameplay dead-zone", which is precisely how the reviewer read it.
|
|
155
|
+
|
|
156
|
+
There is a fourth problem the review could not have seen without measuring hardware, and it is the one that
|
|
157
|
+
kills the whole "pick a good constant" approach: **the right number varies by more than 6× across pads.** XInput
|
|
158
|
+
ships 0.24 (left stick) and 0.265 (right); SDL treats ±0.098 as at-rest; hall-effect and TMR pads need 0.02–0.03
|
|
159
|
+
and stay there for life; a worn potentiometer pad needs 0.2+ and gets worse over time. Any single constant is
|
|
160
|
+
sized for the worst pad in the population, and every good pad pays for it with lost range.
|
|
161
|
+
|
|
162
|
+
Fixed in P3 + P4: the device *measures* its own stick instead of guessing (learned center + noise radius), and
|
|
163
|
+
gameplay dead-zoning becomes a continuous, rescaling, radial primitive applied by the consumer.
|
|
164
|
+
|
|
165
|
+
### 2.4 "Frame is undocumented at the type level — the `.d.ts` doesn't carry it"
|
|
166
|
+
|
|
167
|
+
Two problems.
|
|
168
|
+
|
|
169
|
+
* **The frame is documented**, in the file that owns the concept —
|
|
170
|
+
[`GamepadAxes.js:5`](devices/gamepad/GamepadAxes.js:5): *"Negative values are left/up, positive values are
|
|
171
|
+
right/down"*. The review cites having read it, then calls it undocumented.
|
|
172
|
+
* **There is no `.d.ts`.** `find src/engine/input -name "*.d.ts"` returns nothing. Hand-written `.d.ts` are not
|
|
173
|
+
maintained in this project; whatever the reviewer was reading was IDE inference or a stale tree. If a `.d.ts`
|
|
174
|
+
for this package appears, deleting it is the fix.
|
|
175
|
+
|
|
176
|
+
**Accepted sliver:** the frame note lives on the *enum*, and a consumer touching `stickLeft` may never open
|
|
177
|
+
`GamepadAxes.js`. One-line cross-references on `axes`, `stickLeft`, `stickRight` (P6).
|
|
178
|
+
|
|
179
|
+
### 2.5 "No digital view of the stick, no analog view of the D-pad; fusion is on the caller"
|
|
180
|
+
|
|
181
|
+
Correct, and **fusion stays on the caller** — which of stick and D-pad wins, whether they sum or the last-touched
|
|
182
|
+
device latches, and whether a held D-pad suppresses stick drift are all game decisions with no defensible
|
|
183
|
+
default. What *is* mechanical and duplicated is the conversion on each side, so ship both directions as
|
|
184
|
+
primitives (P5) and leave the `max`/`or`/`latch` to the consumer.
|
|
185
|
+
|
|
186
|
+
### 2.6 "Analog-vs-digital speed is a caller concern"
|
|
187
|
+
|
|
188
|
+
Agreed, explicitly. No action.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 3. What the review missed: the gamepad is unbindable through the ISM
|
|
193
|
+
|
|
194
|
+
The engine's action-mapping layer resolves bindings by *path* against the device tree —
|
|
195
|
+
[`InputSystem.js:18`](ecs/systems/InputSystem.js:18) and
|
|
196
|
+
[`InputControllerSystem.js:159`](ecs/systems/InputControllerSystem.js:159), both via
|
|
197
|
+
[`resolvePath`](../../core/json/resolvePath.js), which **throws when a path cannot be resolved**.
|
|
198
|
+
|
|
199
|
+
Keyboard works because `KeyboardDevice` pre-populates every key from `KeyCodes` in its constructor, so
|
|
200
|
+
`keyboard/keys/w/down` resolves at load time, before anyone touches the hardware.
|
|
201
|
+
|
|
202
|
+
The gamepad cannot do this:
|
|
203
|
+
|
|
204
|
+
* `pads` is sparse and keyed on the hardware slot, so `gamepad/pads/0/...` throws until a pad connects;
|
|
205
|
+
* `buttons` is sparse until first poll, so `gamepad/pads/0/buttons/0/down` throws until the pad has been read.
|
|
206
|
+
|
|
207
|
+
Consequences: an `InputController` carrying a gamepad binding **cannot be linked until the player has already
|
|
208
|
+
plugged in and pressed something**; whether a given binding works depends on which physical slot the pad landed
|
|
209
|
+
in; and a serialized `InputBinding` referencing a gamepad path is a load-order landmine. (Unlink is safe once
|
|
210
|
+
link succeeded — handles are retained across disconnect — but that is the only part of the lifecycle that is.)
|
|
211
|
+
|
|
212
|
+
This — not the absence of `getMovement()` — is why the integration was "entirely on the caller". The blessed
|
|
213
|
+
mapping mechanism was unavailable, so the reviewer polled raw state and fused by hand, then reported the
|
|
214
|
+
symptoms of doing so as API friction. P1 and P2 close it as a side effect of fixing uniformity.
|
|
215
|
+
|
|
216
|
+
*(Separately: axis bindings have no per-axis granularity — only the aggregate `on.axis`, forcing listeners to
|
|
217
|
+
filter by index. Noted, not proposed. The string-path ISM is already the odd one out against the codebase's
|
|
218
|
+
typed-over-magic position; make it work, don't grow it. Direct typed state access — `pad.buttons[GamepadButtons.a].is_down`
|
|
219
|
+
— remains the blessed path.)*
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 4. Proposed work
|
|
224
|
+
|
|
225
|
+
### P1 — `GamepadHandle` pre-populates the standard mapping
|
|
226
|
+
|
|
227
|
+
```js
|
|
228
|
+
// gamepad/GamepadStandardMapping.js
|
|
229
|
+
export const GAMEPAD_STANDARD_BUTTON_COUNT = 17;
|
|
230
|
+
export const GAMEPAD_STANDARD_AXIS_COUNT = 4;
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`GamepadHandle` materialises those in its constructor: 17 `InputDeviceSwitch`, 17 zeroed `buttonValues`, 4 zeroed
|
|
234
|
+
`axes`. `getButton` stays as-is and keeps growing the array for hardware exposing more than 17 buttons.
|
|
235
|
+
|
|
236
|
+
Effect: `pad.buttons[GamepadButtons.dpad_up].is_down` is total. No guard, no `?.`, no `isDown()`. Exactly the
|
|
237
|
+
keyboard's contract.
|
|
238
|
+
|
|
239
|
+
**Tradeoff, stated explicitly:** on a non-standard pad with 6 buttons, `buttons[12]` now reads "up" rather than
|
|
240
|
+
"absent". Absence is signalled by `pad.mapping !== "standard"`, which is where the Gamepad API puts it, not by
|
|
241
|
+
holes in an array. Uniform beats expressive here — a hole is not a usable absence signal anyway, since the
|
|
242
|
+
consumer sees a hole for "no such button" and (previously) also for "not polled yet".
|
|
243
|
+
|
|
244
|
+
Cost: 17 small objects per handle, allocated once.
|
|
245
|
+
|
|
246
|
+
### P2 — `main` becomes a persistent handle bound to the active pad
|
|
247
|
+
|
|
248
|
+
*(Replaces revision 1's slot pre-population. This is the better design: it gives the binding layer a stable path
|
|
249
|
+
without pretending four pads exist, and it matches what a single-player consumer actually means by "the
|
|
250
|
+
gamepad".)*
|
|
251
|
+
|
|
252
|
+
`GamepadDevice.main` becomes a `GamepadHandle` constructed with the device, living **outside** `pads[]`, starting
|
|
253
|
+
disconnected:
|
|
254
|
+
|
|
255
|
+
* it binds to the first pad that connects;
|
|
256
|
+
* when its bound pad disconnects, it rebinds to the **oldest still-connected** pad (connection order);
|
|
257
|
+
* when nothing is connected, it stays present and `connected === false`, with all switches released.
|
|
258
|
+
|
|
259
|
+
Mechanically `main` is a real handle fed the *same* native snapshot as its bound pad during `poll()` — not a
|
|
260
|
+
proxy or a getter chain. That matters: `gamepad/main/buttons/0/down` is a stable `Signal` **object** that
|
|
261
|
+
resolves at engine construction and never changes identity, which is exactly what `resolvePath` needs (§3).
|
|
262
|
+
|
|
263
|
+
```js
|
|
264
|
+
// GamepadDevice
|
|
265
|
+
#connection_sequence = 0;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The active gamepad. Always present; check {@link GamepadHandle#connected}.
|
|
269
|
+
* Mirrors the first connected pad, falling back to the oldest remaining one when that pad is lost.
|
|
270
|
+
* Not a member of {@link pads}.
|
|
271
|
+
*/
|
|
272
|
+
main = new GamepadHandle();
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Notes on the implementation:
|
|
276
|
+
|
|
277
|
+
* **Do not** forward `main.on.*` into the device-level `on.*` signals. The pad it mirrors already forwards, so
|
|
278
|
+
wiring both would double-fire every press for every listener.
|
|
279
|
+
* On unbind, `main.reset()` — releases everything, so a yank-the-cable never leaves input stuck. The next
|
|
280
|
+
`update()` from the new source re-presses whatever is genuinely held. Free correctness from the existing edge
|
|
281
|
+
detection.
|
|
282
|
+
* `main.index` / `.id` / `.mapping` follow the mirrored pad, because `update()` already copies them. Useful:
|
|
283
|
+
a settings screen can name the active pad without touching `pads`.
|
|
284
|
+
* Connection order needs one counter — stamp `pad.connectionIndex = this.#connectionSequence++` inside
|
|
285
|
+
`#connect`, pick the smallest among connected on rebind.
|
|
286
|
+
* Binding, rebinding and refreshing all happen in one place at the end of `poll()`. Splitting them across
|
|
287
|
+
`#connect`/`#disconnect` leaves `main` a frame stale on a swap — see §6.3.
|
|
288
|
+
|
|
289
|
+
Cost: one extra handle update per poll (17 buttons + 4 axes) — noise.
|
|
290
|
+
|
|
291
|
+
**Breaking, and an improvement:** `main` was `GamepadHandle | undefined`. It is now always a handle. Existing
|
|
292
|
+
`if (pad !== undefined)` guards still compile and simply never trigger; the check becomes `main.connected`. This
|
|
293
|
+
removes the only sentinel in the gamepad API, which is the direction the codebase wants anyway.
|
|
294
|
+
|
|
295
|
+
**Deliberately unresolved:** per-slot paths (`gamepad/pads/1/...`) still don't resolve, because `pads` keeps its
|
|
296
|
+
honest sparse hardware-slot semantics. Local multiplayer binds through the device-level `on.down`, which already
|
|
297
|
+
dispatches `(buttonIndex, pad)`, or holds handles from the `connected` signal. If per-player path binding is ever
|
|
298
|
+
wanted, the shape is an ordered player-assignment list of which `main` is element 0 — this design doesn't
|
|
299
|
+
preclude it, and I'd rather add it when there's a consumer than guess the assignment policy now.
|
|
300
|
+
|
|
301
|
+
### P3 — Learned per-stick calibration, and a `GamepadStick` abstraction
|
|
302
|
+
|
|
303
|
+
*(Replaces revision 1's fixed `axisNoiseFloor`. Appendix A is the supporting survey.)*
|
|
304
|
+
|
|
305
|
+
Three findings drive this:
|
|
306
|
+
|
|
307
|
+
1. **In a browser there is no factory calibration, so learning is the only calibration available.** Native stacks
|
|
308
|
+
can read hardware calibration — a Switch pad stores per-axis min/center/max in SPI flash, XInput and SDL apply
|
|
309
|
+
vendor-tuned constants. The Gamepad API exposes none of it: normalized floats and nothing else. Every native
|
|
310
|
+
stack calibrates; we're the only ones who'd be guessing.
|
|
311
|
+
2. **The dominant error is a center offset, not symmetric noise.** This is what "stick drift" *is*, and it is why
|
|
312
|
+
every consumer calibration tool works by sampling the resting position and subtracting it. A fixed dead zone
|
|
313
|
+
responds to an offset center by widening the dead area — asymmetrically, so you lose range on one side and
|
|
314
|
+
still drift on the other. Learning the center fixes the actual defect; a dead zone only hides it.
|
|
315
|
+
3. **The right radius varies 6×+ across the installed base** (§2.3). Measuring is the only way to give a TMR pad
|
|
316
|
+
its 0.02 and a worn pad its 0.15 from one code path.
|
|
317
|
+
|
|
318
|
+
**Layering — why this doesn't contradict §1.** Calibration is *hardware characterization*: learning that this
|
|
319
|
+
stick rests at `(0.03, -0.01)` with `0.018` of dispersion makes the mirror **more accurate**, which is squarely
|
|
320
|
+
the device layer's job. Gameplay dead zone, response curve, and frame conversion remain policy and stay with the
|
|
321
|
+
consumer via `apply_radial_dead_zone`. The line is: *the device removes what the hardware got wrong; the game
|
|
322
|
+
decides what to do with what's left.* Getting this backwards is a known failure mode — SDL applying its own dead
|
|
323
|
+
zone under a game that applies another is a long-standing complaint, and the result is exactly the doubled dead
|
|
324
|
+
zone with all precision gone.
|
|
325
|
+
|
|
326
|
+
#### The abstraction
|
|
327
|
+
|
|
328
|
+
```js
|
|
329
|
+
export class GamepadStick {
|
|
330
|
+
/** Indices into {@link GamepadHandle#axes} that this stick reads. */
|
|
331
|
+
axisX = 0;
|
|
332
|
+
axisY = 1;
|
|
333
|
+
|
|
334
|
+
/** Hardware value, exactly as reported. */
|
|
335
|
+
raw = new Vector2();
|
|
336
|
+
|
|
337
|
+
/** Calibrated value: center-corrected and noise-gated. This is what gameplay should read. */
|
|
338
|
+
value = new Vector2();
|
|
339
|
+
|
|
340
|
+
/** @type {GamepadStickCalibration} */
|
|
341
|
+
calibration = new GamepadStickCalibration();
|
|
342
|
+
|
|
343
|
+
on = {
|
|
344
|
+
/** Fires when {@link value} changes. A calibrated stick at rest is silent. */
|
|
345
|
+
changed: new Signal()
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
/** Refresh from raw axis values, feeding the calibrator on the way through. */
|
|
349
|
+
update(axes) {}
|
|
350
|
+
|
|
351
|
+
/** Return to neutral, keeping the calibration — the hardware has not changed. */
|
|
352
|
+
reset() {}
|
|
353
|
+
|
|
354
|
+
/** Discard what was learned. For when the handle starts representing *different* hardware. */
|
|
355
|
+
forgetCalibration() {}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export class GamepadStickCalibration {
|
|
359
|
+
/** Learned rest position. */
|
|
360
|
+
center = new Vector2();
|
|
361
|
+
|
|
362
|
+
/** Learned dispersion around {@link center}; magnitudes inside this read as 0. */
|
|
363
|
+
noiseRadius = 0;
|
|
364
|
+
|
|
365
|
+
/** When true, learning is suspended and the current values are used as-is. */
|
|
366
|
+
locked = false;
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
`stickLeft` / `stickRight` become `GamepadStick` rather than `Vector2`. **Breaking:** `pad.stickLeft.x` →
|
|
371
|
+
`pad.stickLeft.value.x`. Changelog line; this is public surface.
|
|
372
|
+
|
|
373
|
+
**Opt-out without a mode flag.** You asked for an opt-out, and the obvious form of it — a boolean that switches
|
|
374
|
+
between two code paths — is the dual-mode shape we rejected for `getMovement()`. It isn't needed here: the
|
|
375
|
+
transform is *always* applied, and an identity calibration (`center = (0,0)`, `noiseRadius = 0`, `locked =
|
|
376
|
+
true`) is a bit-exact passthrough. One code path, and "no filtering" is just a particular calibration. The same
|
|
377
|
+
mechanism covers a settings-screen manual dead zone and a saved per-controller profile — `GamepadStickCalibration`
|
|
378
|
+
gets `to/fromBinaryBuffer`, keyed on `pad.id`.
|
|
379
|
+
|
|
380
|
+
**Calibration belongs to hardware, not to a handle.** A handle outlives the pad it represents: slots get
|
|
381
|
+
re-occupied, and `main` moves between pads. Carrying an estimate across that would apply one pad's correction to
|
|
382
|
+
another — and because the calibrator only ever moves its estimate *closer* to the origin (below), a new pad
|
|
383
|
+
resting further out could never adopt its own rest position at all. So `forgetCalibration()` is called on a fresh
|
|
384
|
+
connection and when `main` binds a new source. It is a no-op on a locked calibration: a supplied profile is not
|
|
385
|
+
ours to discard.
|
|
386
|
+
|
|
387
|
+
#### The learning algorithm
|
|
388
|
+
|
|
389
|
+
**Phase A — rest estimation.** Runs continuously and unattended; there is no separate "on connect" mode.
|
|
390
|
+
|
|
391
|
+
* Collect `REST_SAMPLE_COUNT = 60` raw samples (≈1 s at rAF) as a fixed, non-overlapping window.
|
|
392
|
+
* **Reject the whole window** if any sample magnitude exceeds `REST_CANDIDATE_MAX = 0.08`, or if per-axis spread
|
|
393
|
+
(max − min) exceeds `REST_SPREAD_MAX = 0.015`. Resting and holding cannot be told apart inside one window —
|
|
394
|
+
both are steady — so the bounds are biased hard toward rejection, on the asymmetry that failing to calibrate
|
|
395
|
+
leaves an exact passthrough while calibrating wrongly injects phantom deflection. The spread bound is the
|
|
396
|
+
primary defence, and it exploits a physical difference: a held stick carries hand tremor, a settled one
|
|
397
|
+
carries only sensor noise, and the two differ by roughly an order of magnitude. (§6.1 and §6.4 record how
|
|
398
|
+
these numbers were arrived at — the first version of this section got the reasoning wrong.)
|
|
399
|
+
* **Center = per-axis median** of the window. Median, not mean: one spike shifts a 60-sample mean by 1.7% of its
|
|
400
|
+
amplitude, and shifts the median by nothing.
|
|
401
|
+
* **`noiseRadius` = median(d) + `NOISE_RADIUS_DEVIATIONS`·MAD(d)** where `d` are the sample distances from the
|
|
402
|
+
learned center and MAD is the median absolute deviation. MAD is the standard robust dispersion estimator — a
|
|
403
|
+
high quantile computed from 60 samples is dominated by its own tail, which is precisely the outliers we're
|
|
404
|
+
trying not to fit. No clamp: the spread bound already constrains the result structurally, to
|
|
405
|
+
`NOISE_RADIUS_MAX = REST_SPREAD_MAX · √2 · (1 + NOISE_RADIUS_DEVIATIONS)` ≈ 0.106.
|
|
406
|
+
* **Adopt only if closer in.** A window is written to the calibration only when its center is nearer the origin
|
|
407
|
+
than the accepted one. This is what makes a wrong estimate self-correcting: a stick that was being held when
|
|
408
|
+
sampling started is superseded the moment it is released, with no separate recovery path. The trade is that
|
|
409
|
+
drift *growing* within a session is not followed — a wear process measured in weeks, and calibration restarts
|
|
410
|
+
whenever the pad reconnects.
|
|
411
|
+
* **Recovery takes up to two windows.** Windows are fixed and non-overlapping, so the one straddling a release
|
|
412
|
+
or a rebind still holds pre-transition samples and is rejected on spread; only the window after it is clean.
|
|
413
|
+
This affects how quickly a correct estimate is found, never whether it is correct.
|
|
414
|
+
|
|
415
|
+
**Phase B — range estimation.** Proposed as **optional and off by default.** Pads differ in gate shape (square
|
|
416
|
+
gates reach ~1.41 at full diagonal, circular ones ~1.0), so a learned per-direction max would let us normalize to
|
|
417
|
+
a unit circle. But a running max is a self-poisoning estimator — one spike raises the ceiling permanently and
|
|
418
|
+
silently compresses everything afterwards. If we do it: require K consecutive samples above the current maximum
|
|
419
|
+
before raising it, clamp to `[0.8, 1.5]`, and decay slowly. I'd rather ship Phase A, which is high-value and
|
|
420
|
+
low-risk, and leave this behind a flag until a real pad demands it.
|
|
421
|
+
|
|
422
|
+
**Not proposed, but worth knowing about:** dead-zoning only addresses error *near center*. Jitter while the stick
|
|
423
|
+
is **deflected** is a separate problem, and the state of the art for it is the 1€ filter (Casiez et al., CHI
|
|
424
|
+
2012) — a speed-adaptive low-pass with two parameters: low cutoff at low speed kills jitter, rising cutoff at
|
|
425
|
+
speed kills lag. It's ~30 lines and would slot in as an optional stage on `GamepadStick` between `raw` and
|
|
426
|
+
`value`. I'd hold it until someone reports jitter that calibration doesn't fix, but the abstraction should leave
|
|
427
|
+
room for it — which it does, since the stage lives inside the stick and consumers only see `value`.
|
|
428
|
+
|
|
429
|
+
#### Consequences for `axes` and `deadZone`
|
|
430
|
+
|
|
431
|
+
* **`pad.axes` becomes raw** — a true mirror, no destructive gating (fixes §2.3's real defect). Non-stick axes on
|
|
432
|
+
exotic mappings are unaffected by stick calibration, as they should be.
|
|
433
|
+
* **`GamepadDevice.deadZone` is removed**, replaced by a `@deprecated` accessor whose setter writes
|
|
434
|
+
`noiseRadius` into every stick — existing and subsequently connected — and locks them. That is a faithful
|
|
435
|
+
migration: the old behaviour *was* a manually-specified fixed gate, and a locked calibration is exactly that.
|
|
436
|
+
Locking also means such a value survives reconnection, unlike a learned one.
|
|
437
|
+
* **`on.axis` now fires at hardware sample rate on a drifting pad**, where the gate used to silence it. Decided
|
|
438
|
+
in favour of leaving it: the raw layer is honest, and the recommended path (`stick.on.changed`) is silent at
|
|
439
|
+
rest because the calibrated value genuinely doesn't change. The rejected alternative was gating `on.axis` at
|
|
440
|
+
an epsilon, which is the destructive gate creeping back in under a smaller number. This is a behaviour change
|
|
441
|
+
for anything bound to `on.axis`.
|
|
442
|
+
|
|
443
|
+
### P4 — `apply_radial_dead_zone(result, x, y, inner, outer)`
|
|
444
|
+
|
|
445
|
+
`engine/input/analog/apply_radial_dead_zone.js` — device-agnostic, no allocation, no options bag, continuous:
|
|
446
|
+
|
|
447
|
+
```js
|
|
448
|
+
export function apply_radial_dead_zone(result, x, y, inner, outer) {
|
|
449
|
+
const m = Math.sqrt(x * x + y * y);
|
|
450
|
+
|
|
451
|
+
if (m <= inner) {
|
|
452
|
+
result.set(0, 0);
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const scale = Math.min((m - inner) / (outer - inner), 1) / m;
|
|
457
|
+
|
|
458
|
+
result.set(x * scale, y * scale);
|
|
459
|
+
}
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Isotropic boundary (no diagonal leak), continuous at `inner` (no speed pop), saturates to unit magnitude at
|
|
463
|
+
`outer` (no `>1` from square-gate pads). Applies equally to a stick, a touch nub, or a mouse delta.
|
|
464
|
+
|
|
465
|
+
### P5 — `gamepad_write_dpad_vector(result, pad)`
|
|
466
|
+
|
|
467
|
+
`engine/input/devices/gamepad/gamepad_write_dpad_vector.js` — the D-pad as an analog vector, **in hardware
|
|
468
|
+
frame** (`+y` down), so it composes with `stickLeft` without the consumer tracking which of the two is flipped:
|
|
469
|
+
|
|
470
|
+
```js
|
|
471
|
+
export function gamepad_write_dpad_vector(result, pad) {
|
|
472
|
+
const buttons = pad.buttons;
|
|
473
|
+
|
|
474
|
+
const up = buttons[GamepadButtons.dpad_up].is_down;
|
|
475
|
+
const down = buttons[GamepadButtons.dpad_down].is_down;
|
|
476
|
+
const left = buttons[GamepadButtons.dpad_left].is_down;
|
|
477
|
+
const right = buttons[GamepadButtons.dpad_right].is_down;
|
|
478
|
+
|
|
479
|
+
result.set(
|
|
480
|
+
(right ? 1 : 0) - (left ? 1 : 0),
|
|
481
|
+
(down ? 1 : 0) - (up ? 1 : 0)
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
(Total only because of P1.) The digital view of the stick is the caller's threshold on
|
|
487
|
+
`apply_radial_dead_zone`'s output, which is a comparison, not an API.
|
|
488
|
+
|
|
489
|
+
### P6 — Documentation
|
|
490
|
+
|
|
491
|
+
* Cross-reference the frame on `axes`, `stickLeft`, `stickRight`: *"Hardware frame: `+x` right, `+y` down. See
|
|
492
|
+
{@link GamepadAxes}. Game-frame conversion belongs in the controller — see `KeyboardCameraController`."*
|
|
493
|
+
* Drop the misleading `?.` from the `buttons` `@example` once P1 lands.
|
|
494
|
+
* Worked gamepad-locomotion example in the `GamepadDevice` class doc (below), so the next consumer copies the
|
|
495
|
+
intended composition instead of inventing one.
|
|
496
|
+
|
|
497
|
+
### Tests
|
|
498
|
+
|
|
499
|
+
`GamepadDevice.spec.js` currently has 7 tests and does not cover any of this. Add:
|
|
500
|
+
|
|
501
|
+
* P1: all standard buttons defined on a fresh handle, before any poll; `getButton(20)` still grows.
|
|
502
|
+
* P2: `main` exists and is disconnected on a fresh device; binds to the first pad that connects; mirrors its
|
|
503
|
+
buttons and axes; on disconnect of the bound pad falls back to the oldest remaining connected pad; goes
|
|
504
|
+
disconnected with everything released when the last pad is lost; a button held at disconnect is released
|
|
505
|
+
exactly once; a press on the bound pad fires device-level `on.down` exactly once (double-forwarding guard).
|
|
506
|
+
* §3 regression: `resolvePath(devices, "gamepad/main/buttons/0/down")` resolves to a Signal on a fresh engine
|
|
507
|
+
with no hardware, is the *same object* after connect→disconnect→reconnect, and dispatches across a pad swap.
|
|
508
|
+
* P3 calibration: a window centered at `(0.03, -0.01)` with small noise yields a center within tolerance and a
|
|
509
|
+
non-zero, structurally bounded `noiseRadius`; a window containing a held stick is **rejected**; a window with
|
|
510
|
+
one 0.9 spike is rejected; a swept window is rejected; a window with one mild outlier still yields a
|
|
511
|
+
median-based center unmoved beyond tolerance; identity + `locked` is a bit-exact passthrough of `raw` to
|
|
512
|
+
`value`; calibrated `value` is exactly `(0,0)` for samples inside the learned radius; `axes` are byte-identical
|
|
513
|
+
to source at all deflections (mirror contract); the deprecated `deadZone` setter reaches pads connected later.
|
|
514
|
+
* P3 adversarial (§6.4): connecting while the stick is fully deflected, diagonally deflected, or resting at an
|
|
515
|
+
axis extreme never calibrates; connecting while it is *slightly* deflected stays bounded below a usable
|
|
516
|
+
gameplay dead zone and recovers; `main` and a reused slot handle each forget a previous pad's calibration, and
|
|
517
|
+
can then learn a rest position further out than it; a locked calibration survives reconnection.
|
|
518
|
+
* P4: rest → `(0,0)`; just inside `inner` → `(0,0)`; just outside `inner` → magnitude ≈ 0 (continuity, no jump);
|
|
519
|
+
at `outer` → magnitude 1; beyond `outer` → magnitude 1; full diagonal on a square-gate pad → magnitude 1, not
|
|
520
|
+
1.41; isotropy — `(0.14, 0.14)` and `(0.198, 0)` land within epsilon of the same magnitude.
|
|
521
|
+
* P5: each direction; opposing pair cancels to 0; diagonal → `(1, 1)` pre-normalization.
|
|
522
|
+
|
|
523
|
+
All black-box, against real `GamepadHandle` / `InputDeviceSwitch` / a plain object standing in for the native
|
|
524
|
+
`Gamepad` snapshot (a platform type we cannot construct in node — the only fake here).
|
|
525
|
+
|
|
526
|
+
### After this proposal, the reviewer's integration reads:
|
|
527
|
+
|
|
528
|
+
```js
|
|
529
|
+
const pad = engine.devices.gamepad.main; // always present
|
|
530
|
+
|
|
531
|
+
if (pad.connected) {
|
|
532
|
+
const left = pad.stickLeft.value; // already center-corrected for this specific stick
|
|
533
|
+
|
|
534
|
+
gamepad_write_dpad_vector(dpad, pad);
|
|
535
|
+
apply_radial_dead_zone(stick, left.x, left.y, 0.15, 0.95);
|
|
536
|
+
|
|
537
|
+
// fusion + frame: game policy, and this is the whole of it
|
|
538
|
+
const x = stick.x !== 0 || stick.y !== 0 ? stick.x : dpad.x;
|
|
539
|
+
const y = stick.x !== 0 || stick.y !== 0 ? stick.y : dpad.y;
|
|
540
|
+
|
|
541
|
+
move.set(x, -y); // this game is y-up; the negation is stated once, here, on purpose
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Shorter than what the review reported writing, with zero allocation per frame, no `undefined` guard, every policy
|
|
546
|
+
decision visible at the call site instead of hidden behind an options bag — and a gameplay dead zone the game
|
|
547
|
+
picks for feel rather than to paper over hardware, because the hardware error is already gone by this line.
|
|
548
|
+
|
|
549
|
+
Hot-swapping pads mid-session requires no code here at all: `main` rebinds and the loop doesn't notice.
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## 5. Explicitly not doing
|
|
554
|
+
|
|
555
|
+
* **`pad.isDown(i)`** — a third way to ask a question `buttons[i].is_down` and `getButton(i).is_down` already
|
|
556
|
+
answer, which silently converts absent hardware into an unpressed button. P1 removes the need.
|
|
557
|
+
* **`pad.getMovement()`** — §1.
|
|
558
|
+
* **Frame negation anywhere in the device layer** — the device reports hardware frame, full stop. One negation,
|
|
559
|
+
in the controller, where the camera is known.
|
|
560
|
+
* **Growing the ISM string-path layer with gamepad-specific concepts** — make the existing paths resolve (P1/P2);
|
|
561
|
+
do not build more magic strings.
|
|
562
|
+
* **Per-axis signals on `GamepadHandle`** — noted as a real granularity gap in §3. Partly answered by
|
|
563
|
+
`GamepadStick.on.changed`; the remaining gap is non-stick axes on exotic mappings. Revisit if a consumer needs
|
|
564
|
+
it.
|
|
565
|
+
* **A calibration wizard** ("rotate the stick in circles") — the standard consumer-tool flow, and the only way to
|
|
566
|
+
learn true per-direction range. Out of scope: Phase A needs no UI, and Phase B is deferred. If a settings
|
|
567
|
+
screen wants one later, `GamepadStickCalibration` is already the serializable thing it would write to.
|
|
568
|
+
* **1€ filter** — right tool for deflected-stick jitter, wrong time. Left room for it inside `GamepadStick`; see
|
|
569
|
+
P3.
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
## 6. What changed during implementation
|
|
574
|
+
|
|
575
|
+
Two corrections, both found by tests that failed against the design as written above.
|
|
576
|
+
|
|
577
|
+
### 6.1 The rest-window guard did not do what §4 claimed
|
|
578
|
+
|
|
579
|
+
*(§4 now describes the shipped bounds; what it said before this correction is quoted here.)*
|
|
580
|
+
|
|
581
|
+
Revision 2's P3 asserted that `REST_CANDIDATE_MAX = 0.30` plus a spread check together catch "the player was holding the
|
|
582
|
+
stick", *"because a stick held steady at 0.25 passes the first test alone"*. That reasoning is wrong: a stick
|
|
583
|
+
held **steady** at 0.25 also has near-zero spread, so it passes the second test too. The first implementation
|
|
584
|
+
duly learned a held position as the rest position, producing a phantom −0.23 deflection once the player let go.
|
|
585
|
+
The test asserting it wouldn't is what caught it.
|
|
586
|
+
|
|
587
|
+
There is no way to tell resting from holding inside a single window — both are steady. So the bounds are now
|
|
588
|
+
biased hard toward rejection, on the reasoning that **failing to calibrate is harmless** (identity is an exact
|
|
589
|
+
passthrough) **while calibrating wrongly is actively harmful**:
|
|
590
|
+
|
|
591
|
+
* `REST_CANDIDATE_MAX` 0.30 → **0.15**. Drift worse than this is a pad heading for replacement, and past some
|
|
592
|
+
deflection a steady reading is likelier to be a hand than a stick. *(Tightened again to 0.08 in §6.4, on a
|
|
593
|
+
better argument than this one.)*
|
|
594
|
+
* `REST_SPREAD_MAX` 0.05 → **0.015**. This is now the primary defence, and it exploits a physical difference the
|
|
595
|
+
original design ignored: a held stick carries the hand's tremor, a settled one carries only sensor noise, and
|
|
596
|
+
the two differ by roughly an order of magnitude. The cost is that an unusually noisy stick never calibrates,
|
|
597
|
+
which is the safe failure.
|
|
598
|
+
|
|
599
|
+
The residual hole is documented rather than papered over: a player parked at a small steady deflection for a
|
|
600
|
+
full second can still poison the estimate until they release, bounded by `REST_CANDIDATE_MAX`, and the
|
|
601
|
+
minimum-magnitude rule then supersedes it. Both the poisoning and the recovery are tested.
|
|
602
|
+
|
|
603
|
+
### 6.2 `NOISE_RADIUS_MAX` became unreachable, so the clamp went
|
|
604
|
+
|
|
605
|
+
With the spread bound at 0.015, a window that passes it cannot produce a radius anywhere near 0.20 — the result
|
|
606
|
+
is structurally bounded at `REST_SPREAD_MAX · √2 · (1 + NOISE_RADIUS_DEVIATIONS)` ≈ 0.106. The clamp was a guard
|
|
607
|
+
for a condition that can no longer occur, so it was removed and the constant kept as a derived, documented
|
|
608
|
+
bound. The test asserts the structural property instead of the removed clamp.
|
|
609
|
+
|
|
610
|
+
### 6.3 Two smaller notes
|
|
611
|
+
|
|
612
|
+
* **`main` rebinding was one frame stale.** Binding logic initially lived in `#connect`/`#disconnect`, so a
|
|
613
|
+
successor picked up mid-poll wasn't fed hardware until the *next* poll — `main.connected` read true while
|
|
614
|
+
`main.id` still named the unplugged pad. Binding, rebinding and refreshing now all happen in one place at the
|
|
615
|
+
end of `poll()`, which resolves a swap within a single poll and, incidentally, removed a pre-existing
|
|
616
|
+
duplicate `pad.update()` per poll.
|
|
617
|
+
* **The deprecated `deadZone` setter is plumbed properly**, not just applied to pads that happen to exist when
|
|
618
|
+
it is written — new handles pick the override up in `#obtainHandle`. A half-working compatibility shim would
|
|
619
|
+
have been worse than none.
|
|
620
|
+
|
|
621
|
+
### 6.4 Adversarial pass: connecting with a deflected stick
|
|
622
|
+
|
|
623
|
+
Two scenarios were put to the implementation afterwards. One was safe, one was not, and chasing them turned up a
|
|
624
|
+
third defect neither scenario named.
|
|
625
|
+
|
|
626
|
+
**Connecting with a *fully* deflected stick — safe by construction.** Every sample is far outside
|
|
627
|
+
`REST_CANDIDATE_MAX`, so every window is rejected for as long as the stick is held, and release leaves an exact
|
|
628
|
+
passthrough rather than a phantom pull the other way. Same for a diagonal hold, and for the non-standard
|
|
629
|
+
mappings that report a released trigger as an axis resting at −1: those never calibrate, which is the correct
|
|
630
|
+
outcome, not a silent wrong one.
|
|
631
|
+
|
|
632
|
+
**Connecting with a *partially* deflected stick — this was the real gap.** A steady hold inside the plausibility
|
|
633
|
+
bound is genuinely indistinguishable from drift in a single window, so it was adopted as the rest position and
|
|
634
|
+
produced a phantom deflection of the same size on release. It self-corrected, but "bounded at 0.15 and recovers
|
|
635
|
+
in about two seconds" is a weaker answer than it needs to be, because the bound was set too generously:
|
|
636
|
+
|
|
637
|
+
* `REST_CANDIDATE_MAX` 0.15 → **0.08**. The reasoning that fixes it is an asymmetry the earlier revisions
|
|
638
|
+
missed. Auto-calibration earns its keep on *small* drift — the kind that sits under a gameplay dead zone and
|
|
639
|
+
still causes slow creep. Drift larger than that is already absorbed by any sane gameplay dead zone (XInput
|
|
640
|
+
ships 0.24), so declining to calibrate it costs almost nothing. Poisoning, on the other hand, costs a phantom
|
|
641
|
+
deflection. Tightening trades away the case that needs us least, and in exchange the worst wrong estimate now
|
|
642
|
+
lands **below any usable gameplay dead zone** — it never reaches the game at all before being superseded.
|
|
643
|
+
That is asserted directly rather than implied.
|
|
644
|
+
|
|
645
|
+
**The defect neither scenario named: a handle outliving the hardware it learned.** `main` rebinding to a
|
|
646
|
+
different pad, and a slot handle being reused when a different pad is plugged into that slot, both carried the
|
|
647
|
+
previous pad's calibration onto new hardware. Worse than a stale offset: because the calibrator only ever moves
|
|
648
|
+
its estimate *closer* to the origin, a new pad whose rest position sat further out than the old one's could
|
|
649
|
+
**never** have its own rest position adopted — the wrong calibration would have been permanent. Both paths now
|
|
650
|
+
call `forgetCalibration()`, which is a no-op on a locked calibration, since a supplied profile is not ours to
|
|
651
|
+
discard. Regression tests cover both, including a new pad resting further out and the other way.
|
|
652
|
+
|
|
653
|
+
**Recovery takes up to two windows, not one.** Windows are fixed and non-overlapping, so the one straddling a
|
|
654
|
+
release or a rebind still contains pre-transition samples and is rejected on spread; only the window after it is
|
|
655
|
+
clean. This affects how fast a correct estimate is found, never whether it is correct. Stated here because the
|
|
656
|
+
first tests written assumed one window and were wrong about the contract, not about the code.
|
|
657
|
+
|
|
658
|
+
**Tests: 101 passing across 13 suites in `engine/input`.** New: `GamepadHandle.spec.js`,
|
|
659
|
+
`GamepadStick.spec.js`, `GamepadStickCalibration.spec.js`, `gamepad_write_dpad_vector.spec.js`,
|
|
660
|
+
`apply_radial_dead_zone.spec.js`, plus P2/P3 coverage and the `resolvePath` regression in
|
|
661
|
+
`GamepadDevice.spec.js`.
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
## Appendix A — What the state of the art actually does
|
|
666
|
+
|
|
667
|
+
Surveyed while designing P3. Three things are worth having on the record.
|
|
668
|
+
|
|
669
|
+
**Nobody good uses a single hard-coded constant, and everybody who ships one ships a different number.**
|
|
670
|
+
|
|
671
|
+
| Stack | At-rest threshold | Notes |
|
|
672
|
+
|---|---|---|
|
|
673
|
+
| XInput (Microsoft) | 7849/32767 ≈ **0.240** left, 8689/32767 ≈ **0.265** right | Vendor-recommended constants, per-stick — even Microsoft doesn't use one number for both sticks on the same pad |
|
|
674
|
+
| SDL | ±3200/32767 ≈ **0.098** | Documented as "consider at rest"; SDL notes advanced UI should let users set or **autodetect** it |
|
|
675
|
+
| Hall-effect / TMR pads (current gen) | **0.02–0.03** | Manufacturer guidance; stable for the life of the pad rather than degrading |
|
|
676
|
+
| Worn potentiometer pads | **0.2+**, rising | The population XInput's 0.24 is sized for |
|
|
677
|
+
| meep today | 0.1, per-axis | Between the two, correct for neither |
|
|
678
|
+
|
|
679
|
+
That spread is the argument: a constant is a bet on the worst pad you expect to see, and the modern population is
|
|
680
|
+
bimodal — drift-free magnetic sticks alongside worn potentiometer ones. Measuring costs 60 samples once.
|
|
681
|
+
|
|
682
|
+
**Native stacks calibrate against hardware data we cannot get.** A Switch pad carries factory calibration in SPI
|
|
683
|
+
flash (per-axis min/center/max, at `0x8010`); desktop stacks apply vendor tables. The Gamepad API gives us
|
|
684
|
+
normalized floats and `id`, and nothing else. So the choice isn't "learn vs. read the real values" — it's "learn
|
|
685
|
+
vs. guess".
|
|
686
|
+
|
|
687
|
+
**Consumer calibration tools all do the same two things**, which is a decent signal about what actually works:
|
|
688
|
+
sample the resting position over a short window (≈60 frames is the common figure) and subtract it; then optionally
|
|
689
|
+
sweep for range. Firmware-level fixes write the corrected center point to controller NVS. This is Phase A and
|
|
690
|
+
Phase B, and it's why P3 puts center estimation first — offset is the defect people call "drift", and a dead zone
|
|
691
|
+
never fixes an offset, it only hides half of one.
|
|
692
|
+
|
|
693
|
+
**Dead-zone geometry.** Josh Sutphin's taxonomy (axial / radial / scaled radial / sloped-scaled-axial / hybrid)
|
|
694
|
+
is still the reference, with a good annotated implementation set at
|
|
695
|
+
[Minimuino/thumbstick-deadzones](https://github.com/Minimuino/thumbstick-deadzones). Scaled radial with inner and
|
|
696
|
+
outer bounds is P4, and it's the right default: isotropic boundary, full `[0,1]` output range preserved,
|
|
697
|
+
continuous at the inner edge. Axial has legitimate uses (menus, anything wanting pure horizontal/vertical), which
|
|
698
|
+
is another reason it belongs in a consumer-side function rather than baked into the device.
|
|
699
|
+
|
|
700
|
+
**Jitter vs. drift are different problems.** Dead zones address error near center. Error while deflected is
|
|
701
|
+
jitter, and the state of the art is the 1€ filter (Casiez, Roussel & Vogel, CHI 2012) — a first-order low-pass
|
|
702
|
+
whose cutoff rises with signal speed, so it stabilizes at rest and doesn't lag under motion. Two parameters,
|
|
703
|
+
trivial to implement, measurably less lag than fixed low-pass at equal jitter reduction. Deferred, not dismissed.
|
|
704
|
+
|
|
705
|
+
Sources:
|
|
706
|
+
[XInput deadzone constants](https://learn.microsoft.com/en-us/previous-versions/windows/xna/bb197229(v=xnagamestudio.42)) ·
|
|
707
|
+
[SDL3 gamepad axis](https://wiki.libsdl.org/SDL3/SDL_GamepadAxis) ·
|
|
708
|
+
[SDL: stacked deadzones issue](https://github.com/libsdl-org/SDL/issues/3781) ·
|
|
709
|
+
[Doing Thumbstick Dead Zones Right — Josh Sutphin](https://joshsutphin.com/blog/doing-thumbstick-dead-zones-right.html) ·
|
|
710
|
+
[Understanding thumbstick deadzones](https://minimuino.github.io/thumbstick-deadzones/) ·
|
|
711
|
+
[Switch SPI calibration layout](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/spi_flash_notes.md) ·
|
|
712
|
+
[Analog stick calibration data — Hand Held Legend](https://wiki.handheldlegend.com/analog-stick-calibration-data) ·
|
|
713
|
+
[Hall-effect vs traditional thumbsticks](https://www.turtlebeach.com/blog/hall-effect-thumbsticks-vs-traditional-joysticks) ·
|
|
714
|
+
[TMR vs hall-effect](https://www.easysmx.com/blogs/easysmx-controllers/tmr-vs-hall-effect-joysticks) ·
|
|
715
|
+
[Controller calibration & drift — SCUF](https://www.scufgaming.com/us/en/gaming/products/scuf-products/controller-calibration-dead-zones-and-stick-drift-explained/) ·
|
|
716
|
+
[1€ filter (CHI 2012, PDF)](https://direction.bordeaux.inria.fr/~roussel/publications/2012-CHI-one-euro-filter.pdf) ·
|
|
717
|
+
[1€ filter reference implementations](https://github.com/casiez/OneEuroFilter)
|