Spaces:
Running
Running
Download rust/src/setup.rs from DSDUDEd/rust-sandbox: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/DSDUDEd/rust-sandbox/resolve/main/rust/src/setup.rs
- Command line
-
hf download hf://spaces/DSDUDEd/rust-sandbox/rust/src/setup.rs
-
curl -L -o setup.rs https://huggingface.co/spaces/DSDUDEd/rust-sandbox/resolve/main/rust/src/setup.rs
382 Bytes
| use crate::utils::constants::{GAME_RESOLUTION_X, GAME_RESOLUTION_Y}; | |
| use bevy::prelude::*; | |
| use bevy_pixel_camera::PixelCameraBundle; | |
| /* | |
| 🦀 Add a new entity with the camera components | |
| */ | |
| pub fn setup(mut commands: Commands) { | |
| commands.spawn(PixelCameraBundle::from_resolution( | |
| GAME_RESOLUTION_X as i32, | |
| GAME_RESOLUTION_Y as i32, | |
| true, | |
| )); | |
| } | |