aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-06-09 00:30:32 -0400
committerbnewbold <bnewbold@robocracy.org>2016-06-09 00:30:32 -0400
commitb793755808abedd2b9f1a11ff8e7f22df9ad8180 (patch)
tree566993fc1e1dacbf45cc13c26fb1695e4b51dfac /src
parenta5e56fc6eaeca787827145eedfdfc1aa5ec6ed78 (diff)
downloadexuberant-hacks-b793755808abedd2b9f1a11ff8e7f22df9ad8180.tar.gz
exuberant-hacks-b793755808abedd2b9f1a11ff8e7f22df9ad8180.zip
oscillate vertically (not horizontal)
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 83d5bf8..6369ad9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,7 +17,7 @@ fn run() {
use glium::{DisplayBuild, Surface};
let mut t: f32 = 0.0;
- let mut x: f32;
+ let mut z: f32;
let display = glium::glutin::WindowBuilder::new()
.with_title(format!("Exuberant Cow!"))
@@ -96,8 +96,8 @@ fn run() {
loop {
- t += 0.02;
- x = 0.5 * t.sin();
+ t += 0.03;
+ z = 0.5 * t.sin();
// Drawing Pipeline
let mut target = display.draw();
@@ -127,7 +127,7 @@ fn run() {
[ 0.3, 0.0, 0.0, 0.0 ],
[ 0.0, 0.3, 0.0, 0.0 ],
[ 0.0, 0.0, 0.3, 0.0 ],
- [ x, 0.0, 2.0, 1.0 ]],
+ [-0.5, z, 2.0, 1.0 ]],
u_light: light,
perspective: perspective,
view: view,