this.animation = null;
this._progressAnimation = 0;
this._pageRotation = 0;
+ this._callbackAfterNextRender = null;
this.ready = false;
this.textures = [];
this.qualityRatio = 2;
this.triangles = 5;
}
+ this.refreshTime = Math.round(1000 / this.maxFps);
this.pixelRatio = window.devicePixelRatio * this.qualityRatio;
+ console.log('Quality ratio: ' + this.qualityRatio);
+ console.log('Triangles: ' + this.triangles);
+ console.log('Animation time: ' + this.animationTime);
+ console.log('Antialias: ' + this.antialias);
+ console.log('Lights enabled: ' + this.enableLight);
+ console.log('Shadows enabled: ' + this.enableShadow);
+
this.jcontainer = $("#flip3dcontainer");
this.pw = this.fluidbook.resize.ww;
onComplete: function () {
$this.turnRunning = false;
this.tlname = '';
- callback();
+ $this._callbackAfterNextRender = callback;
}
}
);
},
+
animate: function (next) {
var $this = this;
if (this.stats === undefined) {
} else {
$("#flip3dcontainer").hide();
}
+
+ if (this._callbackAfterNextRender !== null) {
+ this._callbackAfterNextRender.apply();
+ this._callbackAfterNextRender = null;
+ }
},
resize: function () {
this.sizePlane.translateY(rect.y - bookBox.top);
}
-
this.plane.position.y = this.sizePlane.position.y;
this.plane.scale.x = this.sizePlane.scale.x;
this.plane.scale.y = this.sizePlane.scale.y;