Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make attractors regular modifiers (#286)
Remove the built-in code and shader handling a fixed-size array of force field attractors/repulsors, and related types `ForceFieldSource` and `ForceFieldModifier`. Replace them with a new `ConformToSphereModifier` describing a single attractor/repulsor source, which can be repeated to add more sources. The new modifier is a regular update context modifier without any specific built-in codepath, making its handling a lot easier and cleaner, while also allowing any custom attraction force expression as well as customizing other parameters of the source in real time. Revamp the `force_field.rs` example to showcase this new modifier, and add a dedicated parameter tweaking panel to observe the effect of each parameter. Fix a panic in rendering code when no effect is present. This looks like a race condition; for now simply early out to prevent the panic. ```rust effects_meta.dr_indirect_bind_group.as_ref().unwrap() ```
- Loading branch information