this._progressAnimation = 0;
this._pageRotation = 0;
this.ready = false;
- this.animationTime = parseFloat(this.fluidbook.datas.mobileTransitionDuration);
+
this.textures = [];
// Performance settings
- this.lowPerf = this.fluidbook.support.android || this.fluidbook.support.iOS || this.fluidbook.support.IE > 0;
+ this.veryLowPerf = this.fluidbook.support.IE > 0;
+ this.lowPerf = this.veryLowPerf || this.fluidbook.support.android || this.fluidbook.support.iOS || this.fluidbook.support.edge;
this.enableLight = !this.lowPerf;
this.enableShadow = !this.lowPerf && this.enableLight;
this.antialias = false;
- this.qualityRatio = this.lowPerf ? 1 : 2;
- this.triangles = this.lowPerf ? 2 : 5;
+ if (this.veryLowPerf) {
+ this.qualityRatio = .7;
+ this.triangles = 1;
+ this.animationTime = parseFloat(this.fluidbook.datas.mobileTransitionDuration) / 1.5;
+ } else if (this.lowPerf) {
+ this.qualityRatio = 1.2;
+ this.triangles = 2;
+ this.animationTime = parseFloat(this.fluidbook.datas.mobileTransitionDuration) / 1.25;
+ } else {
+ this.qualityRatio = 2;
+ this.triangles = 5;
+ this.animationTime = parseFloat(this.fluidbook.datas.mobileTransitionDuration);
+ }
this.pixelRatio = window.devicePixelRatio * this.qualityRatio;
this.jcontainer = $("#flip3dcontainer");
this.sizePlane.scale.x = this.sizePlane.scale.y = 1;
- for (var i = 0; i < 5; i++) {
+ for (var i = 0; i < 25; i++) {
var bbox = new THREE.Box3().setFromObject(this.sizePlane);
var min = this.to2D(bbox.min);
var max = this.to2D(bbox.max);
this.android = this.fitScreenAtZero = this.userAgent.search(/android/i) > -1 || this.userAgent.search(/galaxy/i) > -1;
this.android3 = this.android && this.userAgent.search(/android 3/i) > -1;
this.iOS = this.userAgent.search(/ipad/i) > -1 || this.userAgent.search(/iphone/i) > -1 || this.userAgent.search(/ipod/i) > -1;
+ this.edge = this.userAgent.search(/edge/i) > -1;
// If in node-webkit or if the index.html fluidbook is locally open in a browser
this.offline = (typeof process !== "undefined" && process.versions['node-webkit']) || window.location.toString().indexOf("file://") == 0;
break;
}
-
this.transitions2d = Modernizr.csstransforms && Modernizr.csstransitions;
this.transitions3d = this.transitions2d && Modernizr.csstransforms3d && Modernizr.preserve3d;
this.transitions3dacc = this.transitions2d && Modernizr.webgl;