Update: CC - SpoonLib - Mouse Up (abw1ga2etc.js) 216 bytes modified
parent
81ac351bef
commit
cf95162762
|
@ -11,23 +11,36 @@ if (!this.initialized) {
|
|||
this.initialized = true;
|
||||
}
|
||||
|
||||
var currentRotation = this.cylinder.rotation.x;
|
||||
|
||||
this.animationSystem.start();
|
||||
|
||||
var offset = currentRotation / 0.4488;
|
||||
var currentRotation = this.cylinder.rotation.x;
|
||||
|
||||
var integer = Math.floor(offset);
|
||||
console.log('current rotation: ' + currentRotation);
|
||||
|
||||
var remainder = offset - integer;
|
||||
var remainder = currentRotation % 0.4488;
|
||||
|
||||
if (remainder > 0.5) {
|
||||
this.cylinder.rotation.x = (integer + 1) * 0.4488 * 2 - 0.4488;
|
||||
if (remainder > (0.4488 / 2)) {
|
||||
this.cylinder.rotation.x += remainder;
|
||||
} else {
|
||||
this.cylinder.rotation.x = (integer) * 0.4488 * 2 - 0.4488;
|
||||
this.cylinder.rotation.x -= 0.4488 - remainder;
|
||||
}
|
||||
|
||||
console.log('offset:' + offset + ', remainder: ' + remainder);
|
||||
|
||||
|
||||
|
||||
//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);
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue