Jump to content
Search Community

Rob

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by Rob

  1. Hey guys,

    It would be really nice if the Bounce easing had some configuration like the Back easing does.

     

    I'd like to be able to configure the bouncyness.

     

    Less bouncy objects would maybe only bounce once and not come back up very high

    Whereas others might be very bouncy and bounce for a long period and quite high relative to the original drop.

     

    What do you think?

  2. Hey All,

    I have been working with svg.js a lot recently.

    I noticed you guys have a raphael plugin, which is brilliant.

     

    svg.js and Raphael are very similar however svg.js has the added bonus of being able to work with masks and clipping paths.

     

    I have created my own plugin which is basically your Raphael plugin with some modifications, it works nicely for transforming svgjs objects, the only thing it doesn't allow you to do alter the transformation origin/anchor, im currently trying to work this out because svg.js doesn't have native support for this unfortunately.

     

    If you're interested at all I've dropped it onto a gist

     

    All the best,

    Rob

    • Like 4
  3. Hey guys,

    Found some behaviour that's causing me issues.

    I have an animation of a vehicle, that's yoyo-ing from left to right infinitely. In the onRepeat callback i'm flipping scaleX between 1 & -1 to flip the graphic.

     

    The problem happens when the browser tab is not active.

    The timeline may have repeated multiple times, however the onRepeat callback is only fired once when focus is returned to the tab.

     

    Therefore the orientation of the graphic can become out of sync with the actual direction.

     

    I realise that RAF halts all callbacks when the tab is inactive so, but I would have expected the onRepeat callback to be fired retroactively for the number of times the animation has technically repeated.

     

    Is the behaviour intended or a GSAP bug?

     

    For the moment I have changed my code to manually change direction based on the x vector in the onUpdate callback.

     

    Hope I've not rambled too much :)

    Look forward to your reply.

     

    Rob

     

  4. Hi, I've previously used pauseAll and resumeAll when entering a pause state of a game to halt animation.

    With the GSAP JS pauseAll works fine, but resumeAll doesn't resume any of the animations that we're paused, I notice the docs suggest both methods are deprecated.

     

    Are there any other suggested solutions short of manually resuming all tweens individually?

     

    Thanks

    Rob

  5. I've experienced some issues animating background position. As usual everything is perfect in Webkit

    I only care about IE9+, FF, Chrome, Safari.

    TweenMax.fromTo($('#rain-' + i), 1,
            {css:{'background-position': ""+rainHeight+"px 0px"}},
            {css:{'background-position': ""+(-rainHeight)+"px 0px"}, repeat: -1, delay:offset, repeatDelay: 0, ease: Linear.easeNone }
          );
    

    This animates the position of a css linear gradient.

    It works on everything except Firefox, Firefox just does nothing.

     

    However this.... (with camel cased keys)

    TweenMax.fromTo($('#rain-' + i), 1,
            {css:{backgroundPosition: ""+rainHeight+"px 0px"}},
            {css:{backgroundPosition: ""+(-rainHeight)+"px 0px"}, repeat: -1, delay:offset, repeatDelay: 0, ease: Linear.easeNone }
          );
    

    ...works fine in Firefox, but causes an invalid argument error in IE10 (it's fine in IE9)


    SCRIPT87: Invalid argument
    TweenMax.min.js line 16, character 20973
    

    For the time being I have implemented the following special case which is grim.

     



        if (document.all && window.atob) {
          // Firefox breaks with 'background-position'
          // IE10 breaks with 'backgroundPosition'
          // bodge to workaround
          TweenMax.fromTo($('#rain-' + i), 1,
            {css:{'background-position': ""+rainHeight+"px 0px"}},
            {css:{'background-position': ""+(-rainHeight)+"px 0px"}, repeat: -1, delay:offset, repeatDelay: 0, ease: Linear.easeNone }
          );
        } else {
          TweenMax.fromTo($('#rain-' + i), 1,
            {css:{backgroundPosition: ""+rainHeight+"px 0px"}},
            {css:{backgroundPosition: ""+(-rainHeight)+"px 0px"}, repeat: -1, delay:offset, repeatDelay: 0, ease: Linear.easeNone }
          );
        }
    

     

    Any suggestions? Is this something that can be fixed in TweenMax?

     

     

×
×
  • Create New...