]> _ Git - fluidbook-html5.git/commitdiff
wip #2327 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Nov 2018 15:35:25 +0000 (16:35 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 5 Nov 2018 15:35:25 +0000 (16:35 +0100)
js/libs/fluidbook/fluidbook.3dflip.js

index 5e7b41168921b27bf817c2036ef015761c01706e..7cf594144404dcdbf4321f715d0f5ab6e6ba6d22 100644 (file)
@@ -70,7 +70,7 @@ Fluidbook3DFlip.prototype = {
 
         if (performanceMode === undefined || performanceMode === 'auto' || performanceMode === 'performancesTest') {
             this.veryLowPerf = this.fluidbook.support.IE > 0 || this.fluidbook.support.iOS;
-            this.lowPerf = !Modernizr.webgl || this.veryLowPerf || this.fluidbook.support.edge || this.fluidbook.support.android  || this.fluidbook.support.macOs;
+            this.lowPerf = !Modernizr.webgl || this.veryLowPerf || this.fluidbook.support.edge || this.fluidbook.support.android || this.fluidbook.support.macOs;
         } else if (performanceMode === 'lowPerf') {
             this.lowPerf = true;
             this.veryLowPerf = false;
@@ -439,24 +439,32 @@ Fluidbook3DFlip.prototype = {
             });
         }
 
-        var d = ((720 + this._pageRotation) % 360);
-        this.plane.rotation.y = d * this.deg2rad;
-        this.renderer.render(this.scene, this.camera);
-        this.modifier && this.modifier.apply();
 
+        var render = true;
         if (this._progressAnimation < 1) {
+
             if (this.turnRunning) {
                 if (this.performancesTestRunning) {
                     this.performancesFrames++;
                 }
+                render = true;
                 this.jcontainer.show();
             } else {
+                render = false;
                 this.jcontainer.hide();
             }
         } else {
+            render = false;
             this.jcontainer.hide();
         }
 
+        if (render) {
+            var d = ((720 + this._pageRotation) % 360);
+            this.plane.rotation.y = d * this.deg2rad;
+            this.renderer.render(this.scene, this.camera);
+            this.modifier && this.modifier.apply();
+        }
+
         if (this._callbackAfterNextRender !== null) {
             try {
                 var c = this._callbackAfterNextRender;