Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasonjmcghee/bevy_trackpad_haptic
A bevy plugin for triggering trackpad haptic feedback on a mac
https://github.com/jasonjmcghee/bevy_trackpad_haptic
accessibility bevy haptic haptic-feedback haptics mac macos rust trackpad
Last synced: about 2 months ago
JSON representation
A bevy plugin for triggering trackpad haptic feedback on a mac
- Host: GitHub
- URL: https://github.com/jasonjmcghee/bevy_trackpad_haptic
- Owner: jasonjmcghee
- License: mit
- Created: 2024-06-02T18:11:58.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T18:20:35.000Z (8 months ago)
- Last Synced: 2024-11-21T22:28:22.502Z (2 months ago)
- Topics: accessibility, bevy, haptic, haptic-feedback, haptics, mac, macos, rust, trackpad
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `bevy_trackpad_haptic`
[![Crates.io](https://img.shields.io/crates/v/bevy_trackpad_haptic.svg)](https://crates.io/crates/bevy_trackpad_haptic)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jasonjmcghee/bevy_trackpad_haptic#license)A bevy plugin for triggering trackpad haptic feedback on a mac.
I also maintain its core dependency [`trackpad_feedback`](https://github.com/jasonjmcghee/trackpad_haptic).
Try out the example:
```bash
cargo run --example simple
```## Usage
```rust
fn main() {
App::new()
.add_plugins((MinimalPlugins, TrackpadHapticPlugin))
.add_systems(Update, important_system)
.run();
}// Everything important
fn important_system(mut feedback_event_writer: EventWriter) {
// Something happens like damage to the player!
feedback_event_writer.send(
FeedbackEvent::new(
// length in millis
100,
// minimum delay before additional feedback
0
)
);
}
```## Compatibility
| bevy | bevy_trackpad_haptic |
|------|----------------------|
| 0.13 | 0.1 |## License
* [MIT License](LICENSE)