blob: 5347e83674ab9fb7f1ed72352edc6ddb5ce03d1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use ecs::Component;
use crate::vector::Vec3;
#[derive(Debug, Component)]
pub struct Camera
{
pub position: Vec3<f32>,
pub target: Vec3<f32>,
pub global_up: Vec3<f32>,
pub current: bool,
}
impl Default for Camera
{
fn default() -> Self
{
Self {
position: Vec3 { x: 0.0, y: 0.0, z: 3.0 },
target: Vec3::default(),
global_up: Vec3::UP,
current: false,
}
}
}
|