Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace axis-like input configuration with new input processors #494

Merged
merged 64 commits into from
Apr 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
6b5b344
Add input processors and input settings
Shute052 Feb 27, 2024
88f7a7a
Merge branch 'main' into input-processors
Shute052 Feb 28, 2024
fd18dcb
Replace all usage
Shute052 Feb 28, 2024
91f6e4e
RELEASES.md
Shute052 Feb 28, 2024
08a6acf
Document
Shute052 Feb 28, 2024
d7ac626
Document
Shute052 Feb 28, 2024
03e54fa
Document
Shute052 Feb 28, 2024
714c296
Document
Shute052 Feb 28, 2024
09579bb
Add more test cases
Shute052 Feb 28, 2024
f58953d
Split out deadzones into another module
Shute052 Feb 29, 2024
491c38f
Fix CI and examples
Shute052 Feb 29, 2024
789017c
add `with_settings`
Shute052 Feb 29, 2024
cfd4afd
Update comment
Shute052 Feb 29, 2024
4c44577
Split axis settings into separate modules
Shute052 Feb 29, 2024
a3ccf29
Update the documentation
Shute052 Mar 1, 2024
f8a3d4d
typo
Shute052 Mar 1, 2024
f4468cc
RELEASES.md
Shute052 Mar 1, 2024
324e76e
fix ci
Shute052 Mar 1, 2024
ed9b72e
fix RELEASES.md
Shute052 Mar 2, 2024
6b8d445
fix documentation
Shute052 Mar 2, 2024
1eb50b2
fix documentation
Shute052 Mar 2, 2024
34de561
Use new implementation
Shute052 Mar 22, 2024
9066278
Add comments
Shute052 Mar 28, 2024
cf860d7
Merge branch 'main' into input-processors
Shute052 Mar 28, 2024
fed7811
Add an example
Shute052 Mar 28, 2024
e9810ef
Fix warnings in examples
Shute052 Mar 28, 2024
f572244
Remove compilation configuration
Shute052 Mar 28, 2024
3513305
Doc typo
Shute052 Mar 28, 2024
b181a30
Doc typo
Shute052 Mar 28, 2024
d4a4f35
Fix hashing
Shute052 Mar 28, 2024
070e815
Simplify
Shute052 Mar 30, 2024
a191dd4
Fix macros
Shute052 Apr 4, 2024
3623571
Merge branch 'main' into input-processors
Shute052 Apr 4, 2024
3d8d7ad
Improve docs
Shute052 Apr 4, 2024
84ad6ef
Improve docs
Shute052 Apr 4, 2024
ee10149
Improve
Shute052 Apr 4, 2024
b130c8a
Rename macros.rs
Shute052 Apr 4, 2024
64f23ce
Prefer import from bevy::prelude
Shute052 Apr 4, 2024
feefdf1
Improve macro
Shute052 Apr 4, 2024
25011c8
Improve docs
Shute052 Apr 5, 2024
f7808aa
Improve docs
Shute052 Apr 5, 2024
6b08029
Improve docs and fix CI
Shute052 Apr 5, 2024
bc63f18
Rename Square* to DualAxis*
Shute052 Apr 5, 2024
729948f
Split dual_axis.rs
Shute052 Apr 5, 2024
a10d675
Update module docs
Shute052 Apr 5, 2024
c700dae
Rename `with_processor` to `replace_processor`, add `with_processor`
Shute052 Apr 5, 2024
e79f5d2
Improve docs
Shute052 Apr 5, 2024
48a8929
Improve docs
Shute052 Apr 5, 2024
5a9dc5a
Rearrange the order of match arms
Shute052 Apr 5, 2024
2bacf98
Improve docs
Shute052 Apr 5, 2024
953a935
Typo
Shute052 Apr 5, 2024
f2d8cd3
Expand macros and refine the results
Shute052 Apr 9, 2024
a444164
Rearrange dual-axis input processors
Shute052 Apr 9, 2024
4a8afa0
Rearrange processors
Shute052 Apr 12, 2024
de7ca2b
Remove macros.rs
Shute052 Apr 12, 2024
531cf51
Switch to `serde_flexitos`
Shute052 Apr 12, 2024
ff18aa4
Add tests
Shute052 Apr 12, 2024
d614f7c
Minor
Shute052 Apr 12, 2024
5c1821c
Improve docs
Shute052 Apr 12, 2024
5a4d4de
Inline doc alias
Shute052 Apr 12, 2024
1f35022
Typo
Shute052 Apr 12, 2024
c846c38
Add missing tests
Shute052 Apr 12, 2024
8a9c864
Cleanup
Shute052 Apr 12, 2024
9fe0a6d
Cleanup
Shute052 Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document
Shute052 committed Feb 28, 2024
commit d7ac6268ac168b919287b06975ba29a18746671b
2 changes: 1 addition & 1 deletion examples/default_controls.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ enum PlayerAction {
}

impl PlayerAction {
/// Define the default binding to the input
/// Define the default bindings to the input
fn default_input_map() -> InputMap<Self> {
let mut input_map = InputMap::default();

2 changes: 1 addition & 1 deletion examples/twin_stick_controller.rs
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ pub enum PlayerAction {
}

impl PlayerAction {
/// Define the default binding to the input
/// Define the default bindings to the input
fn default_input_map() -> InputMap<Self> {
let mut input_map = InputMap::default();

2 changes: 1 addition & 1 deletion src/input_settings/axislike_processors.rs
Original file line number Diff line number Diff line change
@@ -599,7 +599,7 @@ impl DualAxisDeadzone {
) -> Vec2 {
let Vec2 { x, y } = input_value;

// Calculate the xy values of the closest point on the circle to the `input_value`
// Calculate the real minimum bound for the xy values
let angle = (x.abs() - min_x).atan2(y.abs() - min_y);
let real_min_x = deadzone_min(min_x, angle.sin(), radius_x, y.abs() > min_y);
let real_min_y = deadzone_min(min_y, angle.cos(), radius_y, x.abs() > min_x);