UNPKG

sliderjs

Version:

lightweight slideshow engine using CSS, Canvas and WebGL Transitions

8 lines (6 loc) 210 B
sliderjs.canvasTransitions("horizontalOpen", { clippedTransition: function (o, ctx) { var w = ctx.canvas.width, h = ctx.canvas.height, p = o.progress; ctx.rect(0, (1 - p) * h / 2, w, h * p); } });