#2d-3d #camera #specs #3d #2d

specs_camera

camera 2d and 3d component for specs

22 releases

Uses old Rust 2015

0.5.0 Jul 5, 2019
0.4.3 Nov 24, 2018
0.4.2 Jul 8, 2018
0.3.4 Jan 22, 2018
0.3.0 Nov 27, 2017

#22 in #specs

Download history 2/week @ 2024-03-11 56/week @ 2024-04-01

56 downloads per month
Used in 2 crates

MIT license

17KB
522 lines

specs_camera

camera 2d and 3d component for specs

let mut world = World::new();

let mut dispatcher = Bundler::new(&mut world, DispatcherBuilder::new())
    .bundle(TransformBundle::<f32>::default()).unwrap()
    // CameraBundle adds TransformSystem<T> to CameraSystem<T> deps
    .bundle(CameraBundle::<f32>::default()).unwrap()
    .build();

world.create_entity()
    .with(Transform2D::<f32>::default())
    .with(Camera2D::<f32>::default().with_size(1024, 768))
    .build();

dispatcher.dispatch(&mut world.res);

Dependencies

~6.5MB
~130K SLoC