Jump to content

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


  • Content Count

  • Joined

  • Last visited

Posts posted by rgfx

  1. Hello,


    Been getting my head around scrolling parallax effects. Keep reading that using translate3d and modifying z and scale is the performant way to go. I don't like this idea as it doesn't work in IE11. 


    I think animating y or yPercent, and changing speed to create the depth is my best cross-browser option. Seems one uses translate another matrix. Maybe there is a way I don't even know about. 


    What do you suggest I do for best performance?



    See the Pen PEzJdp by rgfx (@rgfx) on CodePen

  2. @OSUblake That bitwise solution is really cool man,


    Really wanted to lay down the foundations before I get crazy with the scroll animations. Thanks for putting me at ease. raF it is. 


    About resize functions. I really don't like srcset and pictureFill for responsive images. Srcset has scaling down issues, and picture fill is like  2000 lines of code. So I decided to make my

    See the Pen zPbJra?editors=1010 by rgfx (@rgfx) on CodePen

    , my solution still needs a placeholder, but am almost there. Its not like srcset or pfill has good lazy loading either. I was messing around with various resize functions I found this one


    let timeout = false;
    window.addEventListener("resize", function() {
      timeout = setTimeout(yourFunction, 250);


    I like the idea calling a function at the end of the resize seems better than constantly repainting. I imagine the majority of time a resize is in mobile going from portrait to landscape.  What do you think?


    Saw your pen today 

    See the Pen VMyeqZ?editors=1010 by osublake (@osublake) on CodePen

     amazing. Did you make the illustrations?





  3. Hey guys,


    Firstly, I read that GSAP uses raF for animation, hence you don't need to use raF while using it, even on scroll functions??  This seems strange to me, as controlling functions outside of tweens/timelines would be aggressive. 


    For instance, let say am doing something like below.  I am being redundant, isn't this how it should be done? Let's say it was function with more complexity.  Before you show me some trick to change Bg color with yoyo and a function inside bgColor. Even though I would be curious.  :)

    See the Pen 8387e01af9d92e4d8b742a87c851b8a6 by rgfx (@rgfx) on CodePen


    const random = (min, max) => Math.floor(Math.random() * (max - min) + min);
    const randomColor = () => {
      const r = random(0, 255);
      const g = random(0, 255);
      const b = random(0, 255);
      return `rgb(${r}, ${g}, ${b})`;
    function changeBgColor() {
      TweenMax.to(".first", 0.2, {
        backgroundColor: randomColor,
        ease: Linear.easeNone,
        onComplete: () => {


    Secondly, Found this pen on 

    See the Pen pgOKKw by dcorb (@dcorb) on CodePen

    when scrolling. Just wanted to make I did my analysis correctly, it appears that raF is much more performant. 


    Let me know, thanks. 





  4. I hear you,  I would have to investigate all of its features, but it seems like a few options would go a long way. 


    1. Parallax data-attribute offset control.

    2. When to start and stop animation. 

    3. Some methods for controlling how scroll Y value changes a integer.


    Going to start a Kickstarter campaign :)


    However part of me doesn't want to see text spinning everywhere I go. Maybe it best we don't open the scroll magic box. 

    • Like 1
  5. @PointC


    Hi, This should work in ie11, but doesnt.  I tried adding a polyfill https://github.com/w3c/IntersectionObserver/tree/master/polyfill no dice. Arden's pen doesn't work in ie either. Perhaps the issue may not even be with IntersectionObserver. Must investigate.


    I am already using IntersecionObserver for lazy loading and works great.  I have been using https://github.com/camwiegert/in-view for cases like these. It uses MutationObserver, works in most browsers but IntersecionObserver if far more performant. 


    It would be nice to use this for some scrolling animations am working on. The plan to use Blakes smooth scroll parallax technique. Cause of mousewheel jank. IE still doesn't like it very much, but at least it works. Scroll magic lack of updates concerns me. There's https://github.com/homerjam/scrollwizardry but still seems like an unnecessary amount of code. I think we are close to removing scroll magic from the picture. 


    Scrolling animations are so cool :)  Until the mouse wheel :( What do you think, just run animations in view to be safe? Or should I boldly go into scrolling animation madness?

    See the Pen eyOpMX by rgfx (@rgfx) on CodePen





  6. @OSUblake


    Thanks, pal you are gentleman and scholar. My finest teacher of the web.


    Bummer about SVG sprite sheets. It seemed like a good idea to serve only one file.  I guess with GZIP there isn't much to be gained. Need to find a solution for cleaner HTML now that am going to start to inline everything. 





    • Like 1
  7. If I put them in a master timeline I won't be able to alter their initial progress. 


    I kinda just wanted to hear that using a loop was my only option. That there isn't a method in JS,  like SelectAllArray or something. 






  8. Hi,


    I get a "timelines.pause is not a function" when I try to target an array of timelines all at once. 


    I know I can target them like so.



    but I would like to do something like this.




    like always, not a GSAP issue rather my lack of js knowledge :) So grateful to you guys. 



    See the Pen 0e617b95d2082f79e9a1381a90e070bd by rgfx (@rgfx) on CodePen