Jump to content
Search Community

Adding this Glitch function into a timeline

Jeezihavenfi test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello friends!

First post - and hoping you can help me out. I've been playing with this for a while, but my JS skills are shithouse.

I'd like to add the following function into my TweenMax timeline, but am not sure how to structure it to do so. Any help would be awesome:

$( function() {
        $( "#frame_01" ).mgGlitch({
            destroy : false, // set 'true' to stop the plugin
            glitch: true, // set 'false' to stop glitching
            scale: true, // set 'false' to stop scaling
            blend : true, // set 'false' to stop glitch blending
            blendModeType : 'hue', // select blend mode type
            glitch1TimeMin : 2, // set min time for glitch 1 elem
            glitch1TimeMax : 10, // set max time for glitch 1 elem
            glitch2TimeMin : 1, // set min time for glitch 2 elem
            glitch2TimeMax : 20, // set max time for glitch 2 elem
            zIndexStart : 8, // because of absolute position, set z-index base value
        });
    });

Link to comment
Share on other sites

It's best to make a demo so we can see what's going on.

 

 

 

I don't know how you are using your timeline, but you can use .add() to add a function to your timeline. If you are replaying or repeating the same timeline, that may cause problems as I don't know what that plugin does.

 

tl.add(function() {
 $( "#frame_01" ).mgGlitch({
   destroy : false, // set 'true' to stop the plugin
   glitch: true, // set 'false' to stop glitching
   scale: true, // set 'false' to stop scaling
   blend : true, // set 'false' to stop glitch blending
   blendModeType : 'hue', // select blend mode type
   glitch1TimeMin : 2, // set min time for glitch 1 elem
   glitch1TimeMax : 10, // set max time for glitch 1 elem
   glitch2TimeMin : 1, // set min time for glitch 2 elem
   glitch2TimeMax : 20, // set max time for glitch 2 elem
   zIndexStart : 8, // because of absolute position, set z-index base value
 });
})

 

 

  • Like 2
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...