]> _ Git - fluidbook-html5.git/commitdiff
wip #809 @0:45
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Oct 2018 16:32:11 +0000 (17:32 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Oct 2018 16:32:11 +0000 (17:32 +0100)
js/libs/fluidbook/fluidbook.3dflip.js
js/libs/fluidbook/fluidbook.js

index 07d721ce04ca6171a3fb1922f92056b728dd5497..1bb8d43686e207feb493490b4796d6f7ecd4181f 100644 (file)
@@ -347,10 +347,11 @@ Fluidbook3DFlip.prototype = {
 
         if (newMode !== 'disable') {
             this.init3D(newMode);
+            callback();
             this.prepareTurn({flip: [1, 2]}, function () {
                 $this.playTurn(1, function () {
                     callback();
-                });
+                }, 0.1);
             });
             //console.log('Performances test ok : ' + res);
         } else {
@@ -390,10 +391,13 @@ Fluidbook3DFlip.prototype = {
         callback(texture);
     },
 
-    playTurn: function (dir, callback) {
+    playTurn: function (dir, callback, timeScale) {
         if (this.turnRunning) {
             return;
         }
+        if (timeScale === undefined) {
+            timeScale = 1;
+        }
 
         var $this = this;
 
@@ -407,7 +411,7 @@ Fluidbook3DFlip.prototype = {
         this.progressAnimation(0);
         this.animate(false);
 
-        TweenMax.fromTo(this, this.animationTime,
+        TweenMax.fromTo(this, this.animationTime * timeScale,
             {
                 progressAnimation: 0,
             },
index b96dce1a5372e51f8a455183b6b62891cc3f21bd..902149c3e687bea8a40506f485d9eb06dfb21e9a 100644 (file)
@@ -165,13 +165,13 @@ Fluidbook.prototype = {
         $(this).trigger('fluidbook.splash.beforehide');
         var $this = this;
         if (this.support.transitions3dacc) {
-            this.pauseNetwork(4000);
+            this.pauseNetwork(1500);
             setTimeout(function () {
                 this.fluidbook.pagetransitions.flip3d.performancesTest(function () {
                     $this.pauseNetwork(-1);
                     $this._hideSplash();
                 })
-            }, 1000);
+            }, 500);
         } else {
             this._hideSplash();
         }
@@ -179,11 +179,7 @@ Fluidbook.prototype = {
 
     _hideSplash: function () {
         var $this = this;
-
         var timeout = 300;
-        if (this.support.transitions3dacc) {
-            timeout = 2000;
-        }
 
         setTimeout(function () {
             $this.__hideSplash();