micku7zu / vanilla-tilt.js

A smooth 3D tilt javascript library.
https://micku7zu.github.io/vanilla-tilt.js/index.html
MIT License
3.85k stars 172 forks source link

Glare effect rectangle #93

Closed paulzz3000 closed 2 years ago

paulzz3000 commented 3 years ago

Using a non-rectangular image / svg with glare on. Glare appears as a rectangle which is fine on a white background but conspicuous otherwise. Any way to clip the glare to the image's opaque area?

micku7zu commented 3 years ago

Don't know exactly your case, but one solution could be to use clip-path or mask-image on ".js-tilt-glare" element.

paulzz3000 commented 3 years ago

Thanks, will give that a try.

On 7 Sep 2021, at 16:31, Șandor Sergiu @.***> wrote:

Don't know exactly your case, but one solution could be to use clip-path or mask-image on ".js-tilt-glare" element.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/micku7zu/vanilla-tilt.js/issues/93#issuecomment-914408760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP56UU4QJMLLOH7QOZJ6UTUAYV3NANCNFSM5DSA5QLA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.