init
This commit is contained in:
commit
c56e2b3f5b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/target
|
3166
Cargo.lock
generated
Normal file
3166
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "ldjam-50"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
bevy = "0.6"
|
16
src/camera.rs
Normal file
16
src/camera.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// I'm pretty sure I didn't
|
||||||
|
|
||||||
|
use bevy::{prelude::OrthographicCameraBundle, render::camera::{OrthographicProjection, DepthCalculation, ScalingMode}, math::Vec3};
|
||||||
|
|
||||||
|
pub fn new_camera_2d() -> OrthographicCameraBundle {
|
||||||
|
let far = 1000.0;
|
||||||
|
let mut camera = OrthographicCameraBundle::new_2d();
|
||||||
|
camera.orthographic_projection = OrthographicProjection {
|
||||||
|
far,
|
||||||
|
depth_calculation: DepthCalculation::ZDifference,
|
||||||
|
scaling_mode: ScalingMode::FixedHorizontal,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
camera.transform.scale = Vec3::new(10., 10., 1.);
|
||||||
|
return camera;
|
||||||
|
}
|
3
src/main.rs
Normal file
3
src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in a new issue