Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ganesh Bhat
11,937 PointsSVG animation on mobile
The SVG animation for my path which is 25780px long is choppy on my mobile device. How can i avoid that???
1 Answer
Ali M Malik
33,293 PointsWhen designing animations you should always keep performance in mind. A long path animation like that is a bit tricky, are you using SMIL or CSS to animate it? The main thing you can try is to use GPU hardware acceleration, you can do that by applying the transelate3d property to the element you want to animate. This will help kick your rendering to the GPU and not just the browser.
.animate-this{
transform: translate3d(0,0,0);
}
Here are some resources that might help
Weighing SVG Animation Techniques
Let’s Play With Hardware-Accelerated CSS
I am working on a big animation project right now and would love to look at your code. If you could post it here or create a codepen to show what you are working with I would greatly appreciate it.
Hope this helps.