init3D: function (performanceMode) {
try {
this.dispose3D();
- }catch (e) {
-
+ } catch (e) {
+
}
if (performanceMode === 'disable') {
this.bendForceMultiplicator = 1;
var ratio = this.fluidbook.datas.width / this.fluidbook.datas.height;
- if (ratio > 0.85) {
- this.bendAngle = 30;
- this.bendOffset = 0.5;
- this.bendForceMultiplicator = 1.1;
+ if (ratio > 1.2) {
+ this.bendAngle = 5;
+ this.bendOffset = 0.4;
+ this.bendForceMultiplicator = 1.3;
} else if (ratio >= 1) {
this.bendAngle = 10;
this.bendOffset = 0.4;
this.bendForceMultiplicator = 1.2;
+ } else if (ratio > 0.85) {
+ this.bendAngle = 30;
+ this.bendOffset = 0.5;
+ this.bendForceMultiplicator = 1.1;
}
this.bend = new Bend(0, this.bendOffset, this.bendAngle * 0.0174533);
this.bend.constraint = -1;
SCORM_INITED = true;
try {
pipwerks.SCORM.init();
- }catch (e) {
-
+ } catch (e) {
+
}
setScormValue('exit', 'suspend');
startScormTimer();
}
SCORM_EVENTS_INITED = true;
- console.log('init scorm events');
$(window).on('unload', function () {
finishScorm();
});
$(fluidbook).on('fluidbook.page.navigation', function (e, page) {
- scormSaveCurrentPosition(page);
+ fluidbook.executeWhenNetwork(function () {
+ scormSaveCurrentPosition(page);
+ });
});
$(fluidbook).on('fluidbook.maxpage.set', function (e, page) {
// Commit data once a minute
setInterval(function () {
- pipwerks.SCORM.save();
- }, 2000);
+ fluidbook.executeWhenNetwork(function () {
+ pipwerks.SCORM.save();
+ });
+ }, 5000);
}
function scormSaveCurrentPosition(page, maxPage) {