this.container = $(this.jcontainer).get(0);
- this.init3D('performancesTest');
+ var mode;
+ if ($_GET['performance'] == null) {
+ mode = 'performancesTest';
+ } else {
+ var map = {1: 'highPerf', 2: 'lowPerf', 3: 'veryLowPerf'};
+ mode = map[$_GET['performance']];
+ }
+ this.init3D(mode);
this.animate(true);
$(this.fluidbook).on('fluidbook.ready', function () {
if (!this.webglEnabled()) {
return 'veryLowPerf';
}
+
if (isNaN(this.benchmark) || this.benchmark === 0) {
return 'lowPerf';
}
// #2399
this.animationTime = Math.max(0.4, this.animationTime);
- if (this.performancesMode === 'performancesTest') {
- this.qualityRatio = Math.min(.75, this.qualityRatio);
- this.triangles = Math.min(2, this.triangles);
- }
-
this.pixelRatio = window.devicePixelRatio * this.qualityRatio;
this.frames = 0;
},
performancesTest: function (callback) {
+ var _cb;
var $this = this;
- this.prepareTurn({flip: [1, 2]}, function () {
- $this.playTurn(1, function () {
+
+ if (this.performancesMode !== 'performancesTest') {
+ $("footer").append(' | 3D : forced ' + this.performancesMode);
+ _cb = callback;
+ } else {
+ _cb = function () {
$this.performancesEndTime = new Date();
$this.adjustPerformancesSettings(callback);
+ }
+ }
+
+ this.prepareTurn({flip: [1, 2]}, function () {
+ $this.playTurn(1, function () {
+ _cb();
}, 1);
});
},
this.networkPauseQueue = [];
this.canNavigate = false;
- this.datas = datas;
+ this.initSettings(datas);
this.singleMode = (this.datas.mobileNavigationType === 'portrait');
this.junk = datas.cacheDate;
this.initLoading();
},
+ initSettings: function (datas) {
+ this.datas = datas;
+ if ($_GET['transition'] != null) {
+ var map = {1: 'none', 2: 'slide', 3: 'flip', 4: 'flip3d'};
+ this.datas.mobileTransitions = map[$_GET['transition']];
+ }
+ },
+
setMaxPage: function (p, allowbackwards) {
return this.contentlock.setMaxPage(p, allowbackwards);
},
} else if (service == 'vimeo') {
view += '<iframe class="webvideo" type="text/html" src="https://player.vimeo.com/video/' + video + '?autoplay=1" width="100%" frameborder="0"></iframe>';
} else if (service == 'brightcove') {
- view += '<iframe class="webvideo" type="text/html" src="./video/brightcove.html?pid=' + DATAS.brightcovePlayerId + '&pk=' + encodeURIComponent(DATAS.brightcovePlayerSecret) + '&vid=' + video + '" width="100%" frameborder="0"></iframe>'
+ view += '<iframe class="webvideo" type="text/html" src="./video/brightcove.html?pid=' + this.fluidbook.datas.brightcovePlayerId + '&pk=' + encodeURIComponent(DATAS.brightcovePlayerSecret) + '&vid=' + video + '" width="100%" frameborder="0"></iframe>'
}
view += '</div>';
$("#view").append('<div class="mview" data-menu="webvideo">' + view + '</div>');
}
} else if (icon.match(/extra\d/)) {
var n = icon.substr(5, 1);
- var extraURL = DATAS['navExtraLink' + n];
- var extraIcon = DATAS['navExtraIcon' + n];
- var extraVisibility = DATAS['navExtraVisibility' + n];
- var extraType = DATAS['navExtraType' + n];
+ var extraURL = this.fluidbook.datas['navExtraLink' + n];
+ var extraIcon = this.fluidbook.datas['navExtraIcon' + n];
+ var extraVisibility = this.fluidbook.datas['navExtraVisibility' + n];
+ var extraType = this.fluidbook.datas['navExtraType' + n];
if (extraURL == '' || extraIcon == '') {
continue;
}
if (extraURL.indexOf('link:') === 0) {
var linkId = extraURL.split(':', 2)[1];
var foundLink;
- $.each(DATAS.links, function (page, links) {
+ $.each(this.fluidbook.datas.links, function (page, links) {
var l = $('<root>' + links + '</root>').find('[data-id="' + linkId + '"]');
if (l.length == 1) {
foundLink = l;