How to apply KineticJS filter ? -


i find kineticjs filters documentation extremely frustrating , not find examples online, considering brightness.

the kinetic.filters docs link mention kinetic.filters.brighten(imagedata) there's no info on how pass parameters or how use it.

all need working example of image on layer on stage, , 2 buttons - 1 make image brighter , 1 make darker. can please me ?

thank !

realy, documentation filters poor.

example brighten filter: (kineticjs 4.5.0)

    darth = new kinetic.image({       x: 10,       y: 10,       image: imageobj,       draggable: true,       filter: kinetic.filters.brighten,       filterbrightness: -50     }); 

for animate can use tutorial: http://www.html5canvastutorials.com/kineticjs/html5-canvas-tween-blur-filter-with-kineticjs/

    var tween = tweenlite.to(darth, 0.6, {       paused: true,       setfilterbrightness: 50,       onupdate: function() {         layer.batchdraw();        }     }); 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -