specs_camera

Crates.iospecs_camera
lib.rsspecs_camera
version0.5.0
sourcesrc
created_at2017-10-13 21:11:56.039164
updated_at2019-07-05 23:01:11.539775
descriptioncamera 2d and 3d component for specs
homepagehttps://gitlab.com/nathanfaucett/rs-specs_camera
repositoryhttps://gitlab.com/nathanfaucett/rs-specs_camera.git
max_upload_size
id35549
size24,047
Nathan Faucett (nathanfaucett)

documentation

README

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);
Commit count: 29

cargo fmt