Change-Id: I7979a470985ded0528f6abd829becfe2847222f7
// Draw the cube
gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
+ if(!isNaN(incAngle)){
+ currentAngle += incAngle;
+ if (currentAngle > 360)
+ currentAngle -= 360;
+ }
}
// Draw the cube
gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
+ if(!isNaN(incAngle)){
+ currentAngle += incAngle;
+ if (currentAngle > 360)
+ currentAngle -= 360;
+ }
}
// Draw the cube
gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
-
- currentAngle += incAngle;
- if (currentAngle > 360)
- currentAngle -= 360;
+ if(!isNaN(incAngle)){
+ currentAngle += incAngle;
+ if (currentAngle > 360)
+ currentAngle -= 360;
+ }
}