]> _ Git - fluidbook-html5.git/commitdiff
wip #2365 @0:01
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 23 Nov 2018 16:22:41 +0000 (17:22 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 23 Nov 2018 16:22:41 +0000 (17:22 +0100)
js/libs/fluidbook/fluidbook.3dflip.js
js/libs/fluidbook/fluidbook.pagetransitions.js

index 0a59fd2729546f34225239cfb25ade484a9f3a90..859e58cd6e74aa5ec4da622b9f34dede9e8ce11d 100644 (file)
@@ -60,8 +60,10 @@ Fluidbook3DFlip.prototype = {
     },
 
     init3D: function (performanceMode) {
-        if (this.scene !== undefined) {
-            this.disposeHierarchy(this.scene, this.disposeNode);
+        try {
+            this.dispose3D();
+        }catch (e) {
+            
         }
 
         if (performanceMode === 'disable') {
@@ -245,6 +247,22 @@ Fluidbook3DFlip.prototype = {
         this.initAnimations();
     },
 
+    dispose3D: function () {
+        if (this.scene === undefined) {
+            return;
+        }
+        if (this.renderer !== null) {
+            this.renderer.dispose();
+        }
+        this.disposeHierarchy(this.scene, this.disposeNode);
+
+        this.scene = null;
+        this.camera = null;
+        this.modifier = null;
+        this.textures = null;
+        this.renderer = null;
+    },
+
     setBendAngle: function (a) {
         this.bend.angle = a * 0.0174533;
     },
index 6e0c4ddf2645a207dc0eae2219882a65882cb526..c0ff3d9d0c144df209a78b298dbb17fc20572b3f 100644 (file)
@@ -6,7 +6,7 @@ function FluidbookPageTransition(fluidbook) {
 
 FluidbookPageTransition.prototype = {
     init: function () {
-        if (this.fluidbook.support.transitions3dacc) {
+        if (this.fluidbook.support.transitions3dacc && this.fluidbook.datas.mobileTransitions === 'flip3d') {
             this.flip3d = new Fluidbook3DFlip(this.fluidbook);
         }
     },