performancesTest: function (callback) {
var $this = this;
this.prepareTurn({flip: [1, 2]}, function () {
- $this.performancesStartTime = new Date();
$this.playTurn(1, function () {
$this.performancesEndTime = new Date();
$this.adjustPerformancesSettings(callback);
- });
+ }, 1);
});
},
var newMode;
var res = this.getPerformancesTestResult();
+ console.log('perf test', res);
if (!this.lowPerf) {
if (res < 5) {
newMode = 'disable';
} else if (res < 20) {
newMode = 'veryLowPerf';
- } else if (res < 40) {
+ } else if (res < 35) {
newMode = 'lowPerf';
} else {
newMode = 'highPerf';
this.init3D(newMode);
callback();
this.prepareTurn({flip: [1, 2]}, function () {
- $this.playTurn(1, function () {
- callback();
- }, 0.1);
+ $this.playTurn(0.1, function () {
+ this.prepareTurn({flip: [2, 1]}, function () {
+ $this.playTurn(-1, function () {
+ callback();
+ }, 0.1, 0);
+ });
+ }, 1, 0);
});
//console.log('Performances test ok : ' + res);
} else {
callback(texture);
},
- playTurn: function (dir, callback, timeScale) {
+ playTurn: function (dir, callback, timeScale, delay) {
if (this.turnRunning) {
return;
}
this.progressAnimation(0);
this.animate(false);
- var delay = this.fluidbook.support.iOS ? 0.15 : 0;
+ if (delay === undefined) {
+ delay = this.fluidbook.support.iOS ? 0.15 : 0.06;
+ }
TweenMax.fromTo(this, this.animationTime * timeScale,
{progressAnimation: 0,},
progressAnimation: 1,
ease: Power0.easeIn,
delay: delay,
+ onStart: function () {
+ if ($this.performancesTestRunning) {
+ $this.performancesStartTime = new Date();
+ }
+ },
onComplete: function () {
$this.turnRunning = false;
this.tlname = '';
var render = true;
if (this._progressAnimation < 1) {
-
if (this.turnRunning) {
if (this.performancesTestRunning) {
this.performancesFrames++;
$this.ready();
});
},
- reloadErrorImages: function () {
- $('img').each(function () {
- });
- },
initKeyboardShortcuts: function () {
var $this = this;
// General keyboard shortcuts
$(this).trigger('fluidbook.splash.beforehide');
var $this = this;
if (this.support.transitions3dacc && this.datas.mobileTransitions === 'flip3d') {
- this.pauseNetwork(1500);
+ $("#main,#viewOverlay,#view").css('visibility', 'visible');
+ resize();
+ this.pauseNetwork(4000);
setTimeout(function () {
this.fluidbook.pagetransitions.flip3d.performancesTest(function () {
$this.pauseNetwork(-1);
delay = 0;
duration = 0;
} else {
- delay = animationDuration * 0.7;
+ delay = animationDuration;
duration = animationDuration * 0.3;
}
s_out.push(".right:not('.hidden')");
}
- if (this.support.transitions2d && !this.support.iOS) {
+ if (false && this.support.transitions2d && !this.support.iOS) {
var transitionIn = {transitionDuration: duration + 'ms', transitionDelay: delay + 'ms'};
var transitionOut = {transitionDuration: (duration * .5) + 'ms', transitionDelay: '0ms'};
if (s_in.length > 0) {
pointer-events: none;
mix-blend-mode: multiply;
- transition-property: opacity;
- transition-duration: 250s;
-
- &.hidden {
- transition-duration: 50ms;
- opacity: 0;
- }
-
- .ios & {
- transition-property: none !important;
- transition-duration: 0ms !important;
- }
+ transition-property: none !important;
+ transition-duration: 0ms !important;
> .shadow {
position: absolute;
}
#edges {
-
- .ios & {
- transition-property: none !important;
- transition-duration: 0ms !important;
- }
+ transition-property: none !important;
+ transition-duration: 0ms !important;
position: absolute;
top: 0px;
top: @book-page-height;
color: @page-number-color;
.hideifnot(@display-page-number);
- transition: opacity 250ms;
opacity: 1;
- .ios & {
- transition: none;
- }
-
&.hidden {
transition: none;
opacity: 0;
top: 0px;
left: 0px;
z-index: 40;
- opacity: 0;
}
#splash .logo {