if (!this.entityLoaded) { return; } if (!this.initialized) { this.animationSystem = this.entityLoaded.animationSystem; this.cylinder = this.entityLoaded.cylinder; this.initialized = true; } var currentRotation = this.cylinder.rotation.x; this.animationSystem.start(); var offset = currentRotation / 0.4488; var integer = Math.floor(offset); var remainder = offset - integer; if (remainder > 0.5) { this.cylinder.rotation.x = (integer + 1) * 0.4488 * 2 - 0.4488; } else { this.cylinder.rotation.x = (integer) * 0.4488 * 2 - 0.4488; } console.log('offset:' + offset + ', remainder: ' + remainder); console.log('started'); //console.log(data); //@ sourceURL=SpoonLibMouseUp.js