aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2021-10-27 11:40:37 +0300
committereug-vs <eugene@eug-vs.xyz>2021-10-27 11:40:37 +0300
commit8391a35aaa35da3018744f89b296e57549b29255 (patch)
tree5d9ad2415bd5c577470762335a95c45a7b575735 /src/main.rs
parent92d5cd982d87963165ee175b985a8a477154a5e7 (diff)
downloadpistol-8391a35aaa35da3018744f89b296e57549b29255.tar.gz
feat: add time parameter
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 3a757db..b14ef5b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,10 +12,17 @@ fn main() {
angle: PI / 2.0,
distance: 1.0,
aspect_ratio: 1.0,
- brightness: 10.0,
- buffer: Buffer([['.'; 120]; 60])
+ brightness: 5.0,
+ buffer: Buffer([['.'; 120]; 60]),
+ time: 0.0,
};
- cam.render();
- println!("{}", cam.buffer);
+ for _round in 0..1 {
+ for i in 0..60 {
+ // 1 sin round
+ cam.time = (i as f32 / 60.0) * 2.0 * PI;
+ cam.render();
+ println!("{}", cam.buffer);
+ }
+ }
}