Fix a typo in rotation.y update
+ remove the doubled rotation code at call site.
This commit is contained in:
parent
ab899ff472
commit
06bd9b8caa
1 changed files with 2 additions and 8 deletions
|
|
@ -267,8 +267,8 @@ public:
|
||||||
if (cubes[0].rotation.x > 360.0f)
|
if (cubes[0].rotation.x > 360.0f)
|
||||||
cubes[0].rotation.x -= 360.0f;
|
cubes[0].rotation.x -= 360.0f;
|
||||||
cubes[1].rotation.y += 2.0f * frameTimer;
|
cubes[1].rotation.y += 2.0f * frameTimer;
|
||||||
if (cubes[1].rotation.x > 360.0f)
|
if (cubes[1].rotation.y > 360.0f)
|
||||||
cubes[1].rotation.x -= 360.0f;
|
cubes[1].rotation.y -= 360.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -324,12 +324,6 @@ public:
|
||||||
return;
|
return;
|
||||||
draw();
|
draw();
|
||||||
if (animate && !paused) {
|
if (animate && !paused) {
|
||||||
cubes[0].rotation.x += 2.5f * frameTimer;
|
|
||||||
if (cubes[0].rotation.x > 360.0f)
|
|
||||||
cubes[0].rotation.x -= 360.0f;
|
|
||||||
cubes[1].rotation.y += 2.0f * frameTimer;
|
|
||||||
if (cubes[1].rotation.x > 360.0f)
|
|
||||||
cubes[1].rotation.x -= 360.0f;
|
|
||||||
updateCubeUniformBuffers();
|
updateCubeUniformBuffers();
|
||||||
}
|
}
|
||||||
if (camera.updated) {
|
if (camera.updated) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue