Releases: projectharmonia/bevy_enhanced_input
Releases · projectharmonia/bevy_enhanced_input
Bevy Enhanced Input 0.5.0
Added
InputBindSet::with_modifiers_each
andInputBindSet::with_conditions_each
to add conditions and modifiers to sets.
Changed
Negate
's functionsx
,y
,z
no longer take aninvert
parameter and assume it istrue
.Negate::all
's current function has been moved toNegate::splat
.Negate::all
no longer takes aninvert
parameter and assumes it istrue
(opposite isNegate::none
).- Rename
Biderectional
toBidirectional
to fix typo. - Rename
InputConditions
toInputConditionSet
. - Rename
InputConditionSet::iter_conditions
toInputConditionSet::conditions
. - Rename
InputModifiers
toInputModifierSet
. - Rename
InputModifierSet::iter_modifiers
toInputModifierSet::modifiers
. - Rename
InputBindings
toInputBindSet
. - Rename
InputBindSet::iter_bindings
toInputBindSet::bindings
.
Bevy Enhanced Input 0.4.0
Changed
- Update to Bevy 0.15.
Bevy Enhanced Input 0.3.0
Changed
- Replace
InputAction::DIM
withInputAction::Output
where you set the type directly (bool
,f32
,Vec2
orVec3
) instead of theActionValueDim
. InputAction
macro now acceptsoutput = <Type>
instead ofdim = <ActionValueDim variant>
.- All events now have typed values, based on
InputAction::Output
. - Rename
ActionBind::with
intoActionBind::to
. - All presets now structs (see
input_context::context_instance::input_preset
) that can be passed directly intoActionBind::to
. - Rename
Modifiers
intoModKeys
to avod confusion with input modifiers. - Rename all
modifiers
fields in theInput
enum intomod_keys
. - Rename
Input::with_modifiers
andInput::without_modifiers
intoInput::with_mod_keys
andInput::without_mod_keys
, respectively. Input::with_mod_keys
now a trait method which implemented for any type that can be converted into an input to ergonomically assign keyboard modifiers.Input::without_mod_keys
no longerconst
.- Rename all
with_modifier
andwith_condition
methods intowith_modifiers
andwith_conditions
(plural) because now they accept tuples. InputBind::with_modifiers
andInputBind::with_conditions
now trait methods which implemented for any type that can be converted into a binding to ergonomically assign modifiers and conditions.- Move
ActionState
,ActionData
andActionsData
tocontext_instance
module. - Move
InputBind
to newly createdinput_context::input_bind
module.
Fixed
- Macro hygiene.
Bevy Enhanced Input 0.2.1
Fixed
- Correctly handle generics in the derive macro.
Bevy Enhanced Input 0.2.0
Added
- Logging for binding.
AccumulateBy
modifier.ActionsData::insert_action
to insert a data forA
.ActionData::events
to get triggered events from the last update.ActionData::value
to get triggered value from the last update.ActionData::trigger_events
to trigger events based on the lastActionData::update
.BlockBy::events
to block only events. Could be used for chords to avoid triggering required actions.Deref
forActionEvent::kind
.ContextInstances
to public API and methods to getActionData
for an action.
Changed
- All events now separate structs instead of enum.
- Modifiers now accept
ActionsData
. - Rework
ConditionKind
and the logic around it to make the behavior close to UE. - Consume inputs only if the action state is not equal to
ActionState::None
. - Remove world access from conditions and modifiers. This means that you no longer can write game-specific conditions or modifiers. But it's much nicer (and faster) to just do it in observers instead.
- Values from
Input
are now converted to the action-level dimension only after applying all input-level modifiers and conditions. This allows things like mapping the Y-axis ofActionValue::Axis2D
into an action withActionValueDim::Axis1D
. - Rename
ActionBind::with_axis2d
intoActionBind::with_xy_axis
. - Rename
ScaleByDelta
intoDeltaScale
. - Rename
Released
intoRelease
. - Rename
Pressed
intoPress
. - Rename
BlockedBy
intoBlockBy
. - Rename
Scalar
intoScale
. ActionData::update
now accepts a value and no longer trigger events.- Use
isize
forInputContext::PRIORITY
. - Replace
SmoothDelta
withLerpDelta
that does only linear interpolation. Using easing functions for inputs doesn't make much sense. - Modifiers are now allowed to change passed value dimensions.
- All built-in modifiers now handle values of any dimention.
- Replace
with_held_timer
withrelative_speed
that just accepts a boolean. - Rename
HeldTimer
intoConditionTimer
. - Use
trace!
instead ofdebug!
for triggered events.
Removed
ignore_incompatible!
since no longer needed.SwizzleAxis::XXX
,SwizzleAxis::YYY
andSwizzleAxis::ZZZ
. They encourage a bad pattern of defining actions with duplicate data. Duplicate axes inside the trigger if needed.ActionData::trigger_removed
, useActionData::trigger_events
instead.Normalize
modifier, useDeadZone::default
instead to properly work with analogue inputs.
Bevy Enhanced Input 0.1.0
Initial release.