Share Posted March 1, 2016 Hi Does anyone know how the spinning browser icon was made on the GreenSock homepage. I've done a number of tutorials, but haven't come across it yet. Thanks! Link to comment Share on other sites More sharing options...
Share Posted March 1, 2016 Hi and welcome to the GreenSock forums, Thanks for posting the question here. We have the entire homepage animation on CodePen: http://codepen.io/GreenSock/pen/KzwGgL?editors=0010 But I reduced it down to just the icons for you: var iconTimeline = new TimelineMax({repeat:20}), icons = $("#browserIcons img"), i; for (i = 0; i < icons.length; i++) { iconTimeline.fromTo(icons[i], 0.6, {scaleX:0, opacity:0.4, z:0.1}, {autoAlpha:1, scaleX:1, ease:Power2.easeOut}); iconTimeline.to(icons[i], 0.6, {scaleX:0, opacity:0.4, ease:Power2.easeIn}); iconTimeline.set(icons[i], {visibility:"hidden"}); } reduced demo: http://codepen.io/GreenSock/pen/KzwGgL?editors=0010 It's important to note that there is no 3D spinning. We are using a scaleX tween instead for widest browser support. The images grow out from center horizontally, shrink down to center, disappear and then the next one does the same. It all happens in that loop. 2 Link to comment Share on other sites More sharing options...
Author Share Posted March 1, 2016 Okay great! So is the image a sprite? Many thanks! Link to comment Share on other sites More sharing options...
Share Posted March 1, 2016 Hi i.am Welcome to the forums. It's actually five separate images. If you take a look at the reduced See the Pen KzwGgL by GreenSock (@GreenSock) on CodePen , you'll see the code for the images: <div id="browserIcons"> <img src="//www.greensock.com/_img/browser-chrome-big.png" width="82" height="80" /> <img src="//www.greensock.com/_img/browser-safari-big.png" width="77" height="86" /> <img src="//www.greensock.com/_img/browser-ie-big.png" width="82" height="74" /> <img src="//www.greensock.com/_img/browser-firefox-big.png" width="82" height="83" /> <img src="//www.greensock.com/_img/browser-opera-big.png" width="69" height="75" /> </div> Happy tweening. 2 Link to comment Share on other sites More sharing options...
Author Share Posted March 1, 2016 It's okay i've worked it out! Thanks for the info Link to comment Share on other sites More sharing options...
Author Share Posted March 1, 2016 We must have posted at around the same time. I checked this out using firebug which is what i should've done in the first place. Thanks you so much for responding with the answer though. Many thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now