diff --git a/l5hb4jx1ke.js b/l5hb4jx1ke.js new file mode 100644 index 0000000..8fa464e --- /dev/null +++ b/l5hb4jx1ke.js @@ -0,0 +1,59 @@ +if (!this.entityLoaded) { + return; +} + +if (!this.initialized) { + + this.animationSystem = this.entityLoaded.animationSystem; + + this.cylinder = this.entityLoaded.cylinder; + + this.initialized = true; +} + +while (this.cylinder.rotation.x < 0) { + this.cylinder.rotation.x += Math.PI * 2; + this.cylinder.updateInstance('rotation'); +} + +!this.animationSystem.started && this.animationSystem.start(); + +var currentRotation = this.cylinder.rotation.x; + +var number = 0.897597901; + +var remainder = currentRotation % number; + +var result = number - remainder; + +//console.log('current rotation: ' + currentRotation + ' remainder : ' + remainder + ' result: ' + result); + +this.cylinder.rotation.x += result - 0.4488; + +GameLib.Event.Emit( + GameLib.Event.PLAY_AUDIO, + { + name : 'Audio - Select' + } +); + +//var offset = currentRotation / 0.4488; + +//var integer = Math.floor(offset); + + + +//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 \ No newline at end of file