From: Vincent Vanwaelscappel Date: Mon, 29 Oct 2018 15:46:12 +0000 (+0100) Subject: wip #809 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5a822b9fa5da8ab62467e667cda1be9568308b16;p=fluidbook-html5.git wip #809 @1 --- diff --git a/js/libs/fluidbook/fluidbook.3dflip.js b/js/libs/fluidbook/fluidbook.3dflip.js index 689c1a42..07d721ce 100644 --- a/js/libs/fluidbook/fluidbook.3dflip.js +++ b/js/libs/fluidbook/fluidbook.3dflip.js @@ -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) { + } } }, diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index a8ad7e8e..b96dce1a 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -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); }