Crates.io | specs_camera |
lib.rs | specs_camera |
version | 0.5.0 |
source | src |
created_at | 2017-10-13 21:11:56.039164 |
updated_at | 2019-07-05 23:01:11.539775 |
description | camera 2d and 3d component for specs |
homepage | https://gitlab.com/nathanfaucett/rs-specs_camera |
repository | https://gitlab.com/nathanfaucett/rs-specs_camera.git |
max_upload_size | |
id | 35549 |
size | 24,047 |
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);