this._preloadContentLinkTextures(page, this.fluidbook.settings.clinks[page], this.fluidbook.settings.links[page], enter, function (textures, clinks) {
if ($this.fluidbook.pagetransitions.flip3d !== false) {
-
let afterTexts = function () {
// Draw content links
if (clinks !== '') {
}
+ if ($(this).is('[data-polygon]')) {
+ let p = $(this).data('polygon');
+ let clip = new Path2D();
+ clip.moveTo(p[0].x * cwr, p[0].y * chr);
+ for (let i = 1; i < p.length; i++) {
+ clip.lineTo(p[i].x * cwr, p[i].y * chr);
+ }
+ clip.lineTo(p[0].x * cwr, p[0].y * chr);
+ ctx.save();
+ ctx.clip(clip);
+ }
+
+
let texture;
let scale = 1;
console.warn(texture);
}
}
+ if ($(this).is('[data-polygon]')) {
+ ctx.restore();
+ }
});
$('.texture_clinks[data-page="' + page + '"]').remove();
}
let wr = dw / $this.fluidbook.settings.width;
let hr = dh / $this.fluidbook.settings.height;
+ let cwr = wr * this.fluidbook.settings.cssScale;
+ let chr = hr * this.fluidbook.settings.cssScale;
+
// Draw background
ctx.fillStyle = "#FFFFFF";
ctx.fillRect(0, 0, dw, dh);