Support an Open Source Developer! :hearts:

Become a patron

Planck ECS

The full ECS (Entity-Component-System) library.

Composed of two smaller libraries: * worlddispatcher: the System part of the ECS. * entitycomponent: the Entity-Component part of the ECS.

Read the documentation.

Why would you use this ECS library?

Usage

Add the following to you Cargo.toml file: planck_ecs = "1.0.0"

Use it like so: ```rust use planck_ecs::*; fn main() { #[derive(Default)] pub struct A;

let mut world = World::default();

let sys = (|comps: &mut Components<A>, entities: &mut Entities| {
    let entity = entities.create();
    comps.insert(entity, A);
    Ok(())
}).system();

let mut dispatch = DispatcherBuilder::new().add_system(sys).build(&mut world);
dispatch.run_seq(&world).unwrap();
dispatch.run_seq(&world).unwrap();
dispatch.run_seq(&world).unwrap();

assert!(world.get::<Components<A>>().is_ok());

} ```

For more examples, see the two following repositories' example folders and documentation: * worlddispatcher: information on systems, world and dispatchers. * entitycomponent: information on entities, components and joins.

Maintainer Information

Licence

CC0, public domain.

TLDR: You can do whatever you want with it. Have fun!