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

index 689c1a427d7b419e085421254fb437753e77a956..07d721ce04ca6171a3fb1922f92056b728dd5497 100644 (file)
@@ -64,7 +64,7 @@ Fluidbook3DFlip.prototype = {
             this.disposeHierarchy(this.scene, this.disposeNode);
         }
 
-        if (performanceMode == 'disable') {
+        if (performanceMode === 'disable') {
             return;
         }
 
@@ -114,12 +114,12 @@ Fluidbook3DFlip.prototype = {
         this.pixelRatio = window.devicePixelRatio * this.qualityRatio;
         this.frames = 0;
 
-        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);
+        // 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.scene = new THREE.Scene();
         if (this.enableLight) {
@@ -352,7 +352,7 @@ Fluidbook3DFlip.prototype = {
                     callback();
                 });
             });
-            console.log('Performances test ok : ' + res);
+            //console.log('Performances test ok : ' + res);
         } else {
             this.fluidbook.support.transitions3dacc = false;
             callback();
@@ -451,8 +451,12 @@ Fluidbook3DFlip.prototype = {
         }
 
         if (this._callbackAfterNextRender !== null) {
-            this._callbackAfterNextRender.apply();
-            this._callbackAfterNextRender = null;
+            try {
+                var c = this._callbackAfterNextRender;
+                this._callbackAfterNextRender = null;
+                c.apply();
+            } catch (e) {
+            }
         }
     },
 
index a8ad7e8ecbd4904cdbf8495c12c111c6cdb54c6f..b96dce1a5372e51f8a455183b6b62891cc3f21bd 100644 (file)
@@ -62,7 +62,6 @@ Fluidbook.prototype = {
         this.sound = new FluidbookSound(this);
         this.slideshow = new FluidbookSlideshow(this);
 
-
         if (this.datas.basket) {
             this.cart = new FluidbookCart(this);
         }