I just wanted to ask for an advice on how the effect with the rotating bottle on scroll is done so smooth on this website: https://takeboost.com/ Is this an svg file or is it frames that are loaded upon scroll?
Thank you in advance!
CodePudding user response:
Using F12 > Network and refreshing the page, we can see 299 .jpg are loaded by JavaScript, these images are then drawn to a canvas when scrolling.
You can also use F12 > Network to find related JavaScript code:
- Hover on the
Initiatorcolumn of these image requests inF12 > Network - Click first clickable js link
- Click "Pretty-print", the code to load these images will be highlighted.
