Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Jeezihavenfi

Adding this Glitch function into a timeline

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
        });
    });

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×