]> _ Git - fluidbook-html5.git/commitdiff
wip #5060 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Jan 2022 17:19:15 +0000 (18:19 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Jan 2022 17:19:15 +0000 (18:19 +0100)
js/libs/fluidbook/fluidbook.3dflip.js
js/libs/fluidbook/fluidbook.splash.js

index 9fa6c6cf5fe9afd0713b688b1b366c6f48446c82..31b4b0389cb87eb3f8d00cfb000bd5b77806951d 100644 (file)
@@ -104,7 +104,7 @@ Fluidbook3DFlip.prototype = {
         this.container = $(this.jcontainer).get(0);
 
         var mode = this.fluidbook.settings.performance3DMode;
-        if (mode===undefined || mode===null || mode === 'auto') {
+        if (mode === undefined || mode === null || mode === 'auto') {
             if ($_GET['performance'] == null) {
                 mode = 'performancesTest';
             } else {
@@ -460,9 +460,12 @@ Fluidbook3DFlip.prototype = {
     performancesTest: function (callback) {
         var _cb;
         var $this = this;
+        var timeScale = 1;
 
         if (this.performancesMode !== 'performancesTest') {
+            console.log('no perf test');
             _cb = callback;
+            timeScale = 0.1;
         } else {
             _cb = function () {
                 $this.performancesEndTime = new Date();
@@ -473,7 +476,7 @@ Fluidbook3DFlip.prototype = {
         this.prepareTurn({flip: [1, 2]}, function () {
             $this.playTurn(1, function () {
                 _cb();
-            }, 1);
+            }, timeScale);
         });
     },
 
index 44fc8a3afae6b5c46b2d76d6954ad8347748e13b..b13ad446542a4ac7f47c86cf581f99800ff0fc8b 100644 (file)
@@ -1,6 +1,6 @@
 function FluidbookSplash(fluidbook) {
     this.fluidbook = fluidbook;
-    this.hideSplashTimeout = 1;
+    this.hideSplashTimeout = 0.5;
     this.isHidding = false;
     this.init();
 }
@@ -10,7 +10,10 @@ FluidbookSplash.prototype = {
         this.waitForTimer = true;
         this.waitForReady = true;
 
-        var defaultMin = 5;
+        var defaultMin = 1;
+        if (this.fluidbook.settings.performance3DMode === 'auto') {
+            defaultMin = 3;
+        }
 
         var min = parseFloat(this.fluidbook.settings.splashMinimalTime);
         if (min < defaultMin || isNaN(min)) {