Crate planck_ecs[−][src]
A minimalist, safe and fast ECS. Composed of two libraries:
- entity_component
- world_dispatcher
Planck ECS is a library that brings those two smaller parts together.
It adds the maintain
function to world, which takes care of cleaning up
dead entities after running systems.
Macros
izip | Create an iterator running multiple iterators in lockstep. |
join | The join macro makes it very easy to iterate over multiple
components of the same |
system_error | Returns a custom error from a |
Structs
ComponentIterator | Iterates over components using a provided bitset.
Each time the bitset has a 1 in index i, the iterator will fetch data
from the storage at index i and return it as an |
ComponentIteratorMut | Iterates over components using a provided bitset.
Each time the bitset has a 1 in index i, the iterator will fetch data
from the storage at index i and return it as an |
Components | Holds components of a given type indexed by |
Dispatcher | A dispatcher is used to execute a collection of |
DispatcherBuilder | A builder that accumulates systems to be inserted into a |
Entities | Holds a list of alive entities. It also holds a list of entities that were recently killed, which allows to remove components of deleted entities at the end of a game frame. |
Entity | An entity index.
They are created using the |
EntityIterator | Iterator over entities using the provided bitset. |
System | Struct used to run a system function using the world.
This struct is also used internally by the |
World | Contains data indexed by type. World allows to dynamically enforce the rust rules of borrowing and ownership at runtime: |
Enums
EcsError | The types of errors a |
Traits
BitSet | The BitSet API. |
IntoSystem | Converts a function into a |
WorldExt | Extension to the |
Functions
create_bitset | Creates a bitset big enough to contain the index of each entity. Mostly used to create caches. |
Type Definitions
BitSetVec | The type of bitsets used to track entities in component storages. Mostly used to create caches. |
SystemResult | The result of a |