diff --git a/abw1ga2etc.js b/abw1ga2etc.js index 9e4b161..1b40695 100644 --- a/abw1ga2etc.js +++ b/abw1ga2etc.js @@ -11,6 +11,10 @@ if (!this.initialized) { this.initialized = true; } +while (this.cylinder.rotation.x < 0) { + this.cylinder.rotation.x += Math.PI; +} + this.animationSystem.start(); var currentRotation = this.cylinder.rotation.x; @@ -23,11 +27,7 @@ var result = number - remainder; console.log('current rotation: ' + currentRotation + ' remainder : ' + remainder + ' result: ' + result); -if (currentRotation < 0) { - this.cylinder.rotation.x += result - 0.4488; -} else { - this.cylinder.rotation.x += result - 0.4488; -} +this.cylinder.rotation.x += result - 0.4488;