Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored and not-fl3 committed Apr 22, 2021
1 parent 96d368e commit e2c0901
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ impl EventHandler for Stage {
self.vel[i] -= vec3(0., frame_time, 0.);
self.pos[i] += self.vel[i] * frame_time;
/* bounce back from 'ground' */
if self.pos[i].y() < -2.0 {
self.pos[i].set_y(-1.8);
if self.pos[i].y < -2.0 {
self.pos[i].y = -1.8;
self.vel[i] *= vec3(0.8, -0.8, 0.8);
}
}
Expand Down Expand Up @@ -167,7 +167,7 @@ mod shader {

pub const FRAGMENT: &str = r#"#version 100
varying lowp vec4 color;
void main() {
gl_FragColor = color;
}
Expand Down

0 comments on commit e2c0901

Please sign in to comment.