28 releases (11 breaking)
| 0.11.0 | Jan 11, 2024 |
|---|---|
| 0.10.3 | Dec 23, 2023 |
| 0.9.2 | Dec 5, 2023 |
| 0.8.0 | Nov 18, 2023 |
#2599 in Game dev
331 downloads per month
730KB
4.5K
SLoC
Koe's Bevy toolkit
A collection of bevy tools.
Contents
ECS
- System callers for invoking systems as if they were functions (requires
&mut World). - Entity callbacks.
- Utilities for adding/removing components from entities (requires
&mut World). - Reactive framework managed by
ReactCommands:Reactcomponents,ReactResresources, and reactive events (withReactEventReader). See the documentation for more information. AutoDespawnerresource for garbage collecting entities.
UI
StyleStackprovides style inheritance, which is especially useful for setting up and overriding prefab styles. Youstyle_stack.add()a style to the current 'frame', and it will be available for all child frames. Then youstyle_stack.push()/.pop()to add/remove frames. At startup you can initialize the stack with a bundle of default styles, then when building a UI branch you can 'unwrap' styles withstyle_stack.add(style_stack.style::<X>().my_inner_style.clone());(e.g. if you need a special font for some widget, you pull that font onto the stack by unwrapping your widget's special style which was inserted on init).UiBuilderbundles useful system parameters for building UI: aReactCommands, a lunex ui tree handle, the bevy asset server, a despawner utility for entity GC, and theStyleStackresource. The builder exposesdiv()anddiv_rel()which are convenience methods for managingStyleStackframes.InteractiveElementBuilderlets you add interaction callbacks to an entity, which are auto-invoked by an interaction pipeline system. It is quite opinionated and assumes you are usingbevy_lunex, but has a fairly large API and should work as-is for most normal use-cases (it needs a major refactor to unlock the remaining use-cases). Unlikebevy_mod_pickingwhere you add callbacks ad hoc,InteractiveElementBuilderadds callbacks 'all at once', enabling more built-in functionality. The builder's supporting code makes it possible to define different interaction sources (currently all hit tests are tied to lunex widgets, pending a refactor [this is the biggest usability issue at the moment]).
Misc
FpsTrackerresource with pluginFpsTrackerPlugin.
Utils
Sender/ReceiverandIoSender/IoReceiverunbounded MPMC channels.
Bevy compatability
| bevy | bevy_kot |
|---|---|
| 0.12 | 0.9.0 - master |
| 0.11 | 0.0.1 - 0.8.0 |
bevy_lunex compatability
| lunex | bevy_kot |
|---|---|
| 0.0.9 | 0.9.0 - master |
| 0.0.6 | 0.0.2 - 0.8.0 |
| 0.0.5 | 0.0.1 |
Dependencies
~53–90MB
~1.5M SLoC