Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Plugin Rewrite Beta#180

Merged
aevyrie merged 56 commits intomainfrom
beta
May 3, 2023
Merged

Plugin Rewrite Beta#180
aevyrie merged 56 commits intomainfrom
beta

Conversation

@aevyrie
Copy link
Copy Markdown
Owner

@aevyrie aevyrie commented Jan 27, 2023

This is a complete rewrite to make the plugin more flexible and ergonomic. Intent is to release this after an compatibility update for bevy 0.10.

aevyrie and others added 15 commits December 15, 2022 01:38
* Simplify highlighting assets further

* WIP commit to capture refactor progress

* more wip

* wip

* wip

* Update LICENSE

* input refactor

* functioning cursor hits with raycast backend

* hovering working, selection buggy

* system ordering cleanup

* selection wip

* fixed inputs and hits

* fix click events

* event based picking

* explicitly track interaction state

* event based interaction rewrite

* Get multi window example working

* cleanup

* more cleanup

* working bubbling

* command callbacks

* impl event forwarding command

* gltf picking

* drag events

* remove unused module

* cleanup

* better backend names

* Split out highlight and selection as crates and make optional

* fix up examples

* clippy

* update licenses

* Fix ordering bug

* Update presentmode

* improve multi window example

* dragover and drop events

* doc comments

* Document evenrything

* refactor selection to match updated crates

* Improve selection docs

* doc polish

* improve docs

* remove unused vars from query

* add working rapier deps

* comment out reference code

* rapier backend

* Cleanup, bugfixing

* mark shader plugin as unimplemented

* Add some example comments

* Add more description for pointer ids and bundles

* Update crates/backends/bevy_picking_shader/NOTES.md

Co-authored-by: colepoirier <37318670+colepoirier@users.noreply.github.com>

* Apply suggestions from code review

Rename `EventFrom` to `ForwardedEvent`

Co-authored-by: colepoirier <37318670+colepoirier@users.noreply.github.com>

* Add more documentation

* use git instead of local dep

* fix dev deps for examples

* update crate releases

* review feedback, pointer bundle docs

* forwarding cont

* bevy ui picking backend

* working bevy ui impl

* Add drag and drop

* Fix tests and docs

* cleanup

* review feedback

* review feedback

* touch fixes

* fix touch input

* wip debugging touch raise events

* more notes

* more notes

* refactoring

* fix missing touch click/drop events

* cleanup

* improve drag and drop example

* update drag and drop example

* remove errant import

* remove dragover debug spam

* fix drag leave bug caused by drag over only using a single entity

* minor fixes

* fix multiselect

* Add debug text

* license and font

* bevy 0.9

* Impl sprite picking, add pointer debug reticle, tidy examples

* CI fixes

Co-authored-by: colepoirier <37318670+colepoirier@users.noreply.github.com>
Bump bevy_egui to 0.19
Bump bevy_egui because I missed one in the parent crate
Add egui name to egui entity
Debug background because its hard to read on bright background atm
Co-authored-by: Nicola Papale <26321040+nicopap@users.noreply.github.com>
* Print name out if the entity has one

* Formatting

* Fix clippy warnings

* Fix up unused import when not using feature
* Forward pointer button

* Formatting

* Differentiate between different types of button drags/clicks/etc

* Formatting

* Rename to match Rust API guidelines

* clippy

* clippy example fix

---------

Co-authored-by: Aevyrie <aevyrie@gmail.com>
@bonsairobo
Copy link
Copy Markdown
Contributor

bonsairobo commented Apr 1, 2023

If it's not too much work, I'd like to get better support for using the depth and surface normal of a ray-entity intersection. Right now the depth is computed by a picking backend in order to choose the entity closest to the camera. But this depth is not easily accessible by picking event handlers. It would be nice to somehow reuse the backend calculations by storing the intersection metadata (depth + surface normal) either in a component or the event itself EDIT: actually I think it's good enough to add depth to the HoverMap resource. Then event handlers can look up the PointerId from the event to get the depth. This could even extend to other kinds of backend metadata, where arbitrary metadata can be stored in a HashMap<PointerId, Metadata> resource.

@bonsairobo
Copy link
Copy Markdown
Contributor

Or maybe it would be more idiomatic to replace HashMap<PointerId, T> with T components of the pointer entities?

@aevyrie aevyrie mentioned this pull request May 3, 2023
@aevyrie aevyrie merged commit 0cd090a into main May 3, 2023
@aevyrie aevyrie deleted the beta branch May 3, 2023 08:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants