Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)