Jump to content
Search Community

Animation backdrop-filter: blur?

qqignatqq test
Moderator Tag

Recommended Posts

  • 3 years later...

Thought as much😄 but I don't know how to make a BlurPlugin.js file from the selfexecuting function. I would like to do as follows

 

import BlurPlugin from "gsap/BlurPlugin";

gsap.registerPlugin(BlurPlugin);

 

Link to comment
Share on other sites

9 hours ago, pbohny said:

Thought as much😄 but I don't know how to make a BlurPlugin.js file from the selfexecuting function. I would like to do as follows

 

import BlurPlugin from "gsap/BlurPlugin";

gsap.registerPlugin(BlurPlugin);

 

Yeah, you have to do some things differently if you want to use it as an ES Module. I've attached a zip with 3 different formats: 

  • A minified UMD file (you could load this via a <script> tag).
  • A universally-compatible ES Module file (for your imports as you described)
  • A raw source file that's basically the same as the ES Module, but with more modern syntax (you probably have no use for this, but I figured I'd include it anyway)

Does this work the way you hoped? 

BlurPlugin.zip

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
On 12/21/2019 at 10:51 PM, ZachSaucier said:

Nice job figuring it out! That's the same approach that is used in our unofficial blur plugin that's used as an example of a custom plugin:

 

 

This is for filter:blur() right? How do i change it to backdrop-filter which is the original question anyway? Also how can i include the webkit prefix?

Link to comment
Share on other sites

3 hours ago, aln said:

This is for filter:blur() right? How do i change it to backdrop-filter which is the original question anyway? Also how can i include the webkit prefix?

If you'd like some help, @aln, please provide a minimal demo (like a CodePen) showing what you're trying to do. The overall concept illustrated by the BlurPlugin above should apply to whatever property you want - you just have to adjust the code in the plugin to target that property. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...