fix toroid shape
This commit is contained in:
@@ -180,10 +180,10 @@ impl<D: gfx::Device,
|
||||
self.camera = na::Similarity3::new(na::Vector3::new( 0.5, 0.0, 0.0),
|
||||
rot, 1.0).to_homogeneous() * self.camera;
|
||||
} if state.rAxis[0].y > 0.5 {
|
||||
self.camera = na::Similarity3::new(na::Vector3::new( 0.0, -0.5, 0.0),
|
||||
self.camera = na::Similarity3::new(na::Vector3::new( 0.0, -5.0, 0.0),
|
||||
rot, 1.0).to_homogeneous() * self.camera;
|
||||
} if state.rAxis[0].y < -0.5 {
|
||||
self.camera = na::Similarity3::new(na::Vector3::new( 0.0, 0.5, 0.0),
|
||||
self.camera = na::Similarity3::new(na::Vector3::new( 0.0, 5.0, 0.0),
|
||||
rot, 1.0).to_homogeneous() * self.camera;
|
||||
}
|
||||
},
|
||||
@@ -264,10 +264,10 @@ const VERTEX_SHADER_SRC: &'static [u8] = br#"
|
||||
v_uv = a_uv;
|
||||
v_tileidx = a_tileidx;
|
||||
float TWO_PI_CIRC = 2 * PI / 256.0;
|
||||
float R = 128.0;
|
||||
float R2 = 16.0;
|
||||
float R = 1024.0;
|
||||
float R2 = 128.0;
|
||||
|
||||
gl_Position = u_matrix * camera * vec4(R * -1.0 * sin(TWO_PI_CIRC * (a_pos.x + treadmill_x)),
|
||||
gl_Position = u_matrix * camera * vec4(R2 * -1.0 * sin(TWO_PI_CIRC * (a_pos.x + treadmill_x)),
|
||||
(R + R2 * cos(TWO_PI_CIRC * (a_pos.x + treadmill_x))) * cos(TWO_PI_CIRC * (a_pos.z + treadmill_y)),
|
||||
(R + R2 * cos(TWO_PI_CIRC * (a_pos.x + treadmill_x))) * sin(TWO_PI_CIRC * (a_pos.z + treadmill_y)),
|
||||
1.0);
|
||||
|
||||
Reference in New Issue
Block a user