Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender

flim's Achievements

  1. flim

    Unset all animation

    I want to reset the animation to the beginning of the animation when switching from desktop to mobile screen, not revert playback. Now I just check mediaquery to reload the page without animation when switching to mobile, or set animation when change to the desktop view.
  2. flim

    Unset all animation

    I update my CodePen, gsap.globalTimeline.clear() seem not work as desired, gsap.globalTimeline.timeScale(999) works great. Many thanks!
  3. flim

    Unset all animation

    Is it possible to unset all animation, I want to check if media query change, no animation for all elements.
  4. Is there a randomize stagger available or I have to write my function if I want the elements to animate in random order?
  5. Hi OSUblake, Thanks for the advice, I shall read the doc more carefully. Here is my trial, if I change the zoom to 0.25x, the element 'b' will be at the end position, change the zoom to 1x the normal scroll animation resume. ScrollTrigger - reset & replay 2 (codepen.io) It is not perfect, the animation position will jump to the end if I resize the viewport which is large enough to make the element in the viewport. Any advice?
  6. I want the element to show in the animation "end" position when it is already on the screen, i.e. after page loaded. For instance, in the codepen, change the zoom to "0.25x", "b" will be visible, "b" will start to play just if I run the codepen again. How to make "b" start in the animation end position if it is visible already? Like when "b" is visible after page loaded, the tween duration is "0".
  7. In this codepen, the #box1 didn't animate, but #box2 works, any idea? And what is the setup if the div .animate is on the top the page, the animation play after the page load, and also play when the page down and the move up to the top?
  8. Thanks for the advise. I can get the gradient fading result with SVG. Here is the setup. https://codepen.io/fredericklim/pen/Badxezb
  9. I tried to add an animation for the gradient, not sure the setup is the right way or not, the png background will flash one time while playing the gradient animation.
  10. Many thanks for the links, very useful.
  11. Thanks for the docs link. But I not quit understand why need to include window, because if I remove window then the code will not work. In other examples there is no window before gsap.registerPlugin. const registerPlugin = gsap.registerPlugin; Also I cannot get the meaning of "..." in the line "...document.querySelectorAll(".apple-image--complete")" const COMPLETES = [ ...document.querySelectorAll(".apple-image--complete"), document.querySelector(".apple-image--complete"), ];
  12. Thanks for explaining that, those modern JS syntaxes are really like puzzle. But I don't understand why add window before the gsap.timeline etc.?
  13. In that CodePen, I cannot understand these few lines of code const { gsap: { timeline, set, registerPlugin }, ScrollTrigger, } = window What is the purpose of assign window to gsap, ScrollTrigger?
  14. Thanks for the detailed advice +1
  15. I saw some websites with smooth scroll video position control like Apple and Samsung, I tried to control the video but the result is very choppy, tried different size of video but the result is not desire. Any suggestion?