Khoa Nguyen
Pressure creates diamonds
Skip to main content

Learn advanced web animation with GSAP and Three.js

Last updated:

YouTube

2023: Master JavaScript Animations With GSAP | Learn GSAP From Scratch |

  • Scroll tracking: ScrollTrigger by GSAP, useScroll by Framer Motion (need to combine with Smooth scroll like LENIS or locomotive-scroll)
  • Viewport Detection (Intersection Observer API or just use ScrollTrigger or useInView)
  • Sticky Position (position: sticky; top:10px): very powerful and easy to implement
  • Easing (More info: https://motion.zajno.com/)
  • Text Splitting: GSAP SplitText or SplitType. Can be bad for accessibility

Subtle technique

  • Map function (math): gsap.utils.mapRange(-10,10,100,200,0)
  • LERP (Linear Interpolation): use it for cursor stuff
const lerp = function(start,end,t)
{
    return start * (1 - t) + end *t;
}
  • SHADER (must know if you want experimental, artistic stuff)

Code examples

https://blog.olivierlarose.com/courses/web-animation-course

Sticky footer: https://blog.olivierlarose.com/tutorials/sticky-footer

Youtube Reference

https://www.youtube.com/watch?v=9eHEOAn2FOA

https://www.youtube.com/watch?v=vqXLGX0szIQ

GSAP Cheatsheet

GSAP Cheat Sheet

WebGL or ThreeJS

https://threejs.org/

https://threejs-journey.com/

https://thebookofshaders.com/

https://webglfundamentals.org/

  • E-commerce
  • Landing page
  • Usability
  • Accessibility
  • Information Architecture
  • Responsive Design