masking multiple dynamic images in kineticjs using setClipFunc -
i'm trying add simple rectangular mask cover multiple images, container method 'setclipfunc' looks winner http://kineticjs.com/docs/symbols/kinetic.container.php#setclipfunc confused how works , why being passed number 'deg' (presumably degrees?). if has working example of 'setclipfunc' in action i'd grateful!
layer.setclipfunc(function (deg) { var context = deg.context; context.beginpath(); context.moveto(5, 5); context.lineto(34, 202); context.lineto(2, 405); context.lineto(212, 385); context.lineto(425, 405); context.lineto(400, 202); context.lineto(415, 10); context.lineto(212, 25); context.closepath(); }); layer.draw();
Comments
Post a Comment