I love the script, thanks for that!
One question in regards to animating the mask with canvas:
How would I be able to animate the actual mask (without the image)? Using GSAP I call TweenMax.from('.mask', 1, {scaleX:0.5, scaleY:0.5, ease: Power3.easeInOut}, 0);
but that animates the image with the data mask applied, not the mask itself.
Normally I would just add an id to the img tag like so: <img id="starMask" src="star.png" alt="star"> and then call it:
TweenMax.from('#starMask', 1, {scaleX:0.5, scaleY:0.5, ease: Power3.easeInOut}, 0);
but since it's canvas it's not working. How would I be able to call the actual mask in order to animate that? Thanks!
I love the script, thanks for that!
One question in regards to animating the mask with canvas:
How would I be able to animate the actual mask (without the image)? Using GSAP I call
TweenMax.from('.mask', 1, {scaleX:0.5, scaleY:0.5, ease: Power3.easeInOut}, 0);but that animates the image with the data mask applied, not the mask itself.
Normally I would just add an id to the img tag like so:
<img id="starMask" src="star.png" alt="star">and then call it:TweenMax.from('#starMask', 1, {scaleX:0.5, scaleY:0.5, ease: Power3.easeInOut}, 0);but since it's canvas it's not working. How would I be able to call the actual mask in order to animate that? Thanks!