this.disposeHierarchy(this.scene, this.disposeNode);
}
+ if (performanceMode == 'disable') {
+ return;
+ }
+
if (performanceMode === undefined || performanceMode === 'auto' || performanceMode === 'performancesTest') {
this.veryLowPerf = this.fluidbook.support.IE > 0;
this.lowPerf = !Modernizr.webgl || this.veryLowPerf || this.fluidbook.support.edge || this.fluidbook.support.android || this.fluidbook.support.iOS;
$this.performancesStartTime = new Date();
$this.playTurn(1, function () {
$this.performancesEndTime = new Date();
- $this.adjustPerformancesSettings();
- callback();
+ $this.adjustPerformancesSettings(callback);
});
});
},
- adjustPerformancesSettings: function () {
+ adjustPerformancesSettings: function (callback) {
+ var $this = this;
var newMode;
if (this.veryLowPerf) {
newMode = 'veryLowPerf';
} else {
var res = this.getPerformancesTestResult();
if (!this.lowPerf) {
- if (res < 10) {
+ if (res < 5) {
+ newMode = 'disable';
+ } else if (res < 10) {
newMode = 'veryLowPerf';
} else if (res < 30) {
newMode = 'lowPerf';
newMode = 'highPerf';
}
} else {
- if (res < 30) {
+ if (res < 10) {
+ newMode = 'disable';
+ } else if (res < 30) {
newMode = 'veryLowPerf';
} else {
newMode = 'lowPerf';
}
}
}
- this.init3D(newMode);
- console.log('Performances test ok : ' + res);
+
+ if (newMode !== 'disable') {
+ this.init3D(newMode);
+ this.prepareTurn({flip: [1, 2]}, function () {
+ $this.playTurn(1, function () {
+ callback();
+ });
+ });
+ console.log('Performances test ok : ' + res);
+ } else {
+ this.fluidbook.support.transitions3dacc = false;
+ callback();
+ }
},
texturesLoaded: function (t1, t2, callback) {
var $this = this;
+ this.turnRunning = true;
+
+ this.tlname = dir === 1 ? 'right' : 'left';
+
this.tlleft.kill();
this.tlright.kill();
- this.tlname = dir === 1 ? 'right' : 'left';
this.progressAnimation(0);
this.animate(false);
- this.turnRunning = true;
- TweenMax.to(this, this.animationTime,
+ TweenMax.fromTo(this, this.animationTime,
+ {
+ progressAnimation: 0,
+ },
{
progressAnimation: 1,
ease: Power0.easeIn,