https://github.com/m11m/bevy_web_file_drop
Bevy plugin adding better support for drag and drop files in the web.
https://github.com/m11m/bevy_web_file_drop
bevy drag-and-drop files web
Last synced: 9 days ago
JSON representation
Bevy plugin adding better support for drag and drop files in the web.
- Host: GitHub
- URL: https://github.com/m11m/bevy_web_file_drop
- Owner: m11m
- License: apache-2.0
- Created: 2024-01-03T02:51:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-06T22:20:43.000Z (2 months ago)
- Last Synced: 2026-06-04T23:04:41.183Z (15 days ago)
- Topics: bevy, drag-and-drop, files, web
- Language: Rust
- Homepage: https://crates.io/crates/bevy_web_file_drop
- Size: 480 KB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bevy_web_file_drop
Bevy plugin adding better support for drag and drop files in the web.
Bevy has built in [drag and drop events](https://docs.rs/bevy/latest/bevy/prelude/enum.FileDragAndDrop.html), but they cause a panic when used in a web build and don't cancel the default browser behavior.
This plugin adds some custom JavaScript glue around the canvas to catch these events and relay them to Bevy.
## Testing
View the example on web with `trunk serve`.
View the example on native with `cargo run -p example`.
Drop in `.png` files to see the texture change.