Demo for the tutorial on how to create a 3D cardboard box that folds and unfolds on scroll using Three.js and the GSAP ScrollTrigger.
No package manager / build system is needed. You can run the page as it is on local server (any web server, really).
The page is using the following libs:
-
GSAP and their scrollTrigger plugin. Both are added as CDN, but you can turn it to JS module or NPM if needed: https://greensock.com/docs/v3/Installation?checked=core,scrollTrigger
-
Three.js + their addons OrbitControls and mergeBufferGeometries. Both are added as CDN with import map, it can also be changed: https://threejs.org/docs/#manual/en/introduction/Installation
-
lil-gui controls added in the same way as threejs addons https://github.com/georgealways/lil-gui
Follow Ksenia: Twitter, Codepen, website
Follow Codrops: Twitter, Facebook, GitHub, Instagram
Made with 💙 by Codrops