Search code examples
coffeescriptframerjs

How can I mask an Image into a Layer?


These are my first steps with FramerJS and I would like to know how to mask an Image into a different layer when I scale the image with an animation.

Thanks.


Solution

  • layer = new Layer width: 256, height: 256
    layer.style =
      "-webkit-mask-image": "url(images/framer-icon.png)"
    

    you can mask an image using "-webkit-mask-image". this property is only worked in Webkit-based browser, but framer is also worked in Webkit-based.