<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Magnus Magnusson on Medium]]></title>
        <description><![CDATA[Stories by Magnus Magnusson on Medium]]></description>
        <link>https://medium.com/@magnus.m?source=rss-56d9bc156947------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X4Ddg9dke_cjoIqm-2mEjQ.jpeg</url>
            <title>Stories by Magnus Magnusson on Medium</title>
            <link>https://medium.com/@magnus.m?source=rss-56d9bc156947------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:56:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@magnus.m/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dear Ueno: How did you make those awesome Zero animations?]]></title>
            <link>https://medium.com/ueno/dear-ueno-how-did-you-make-those-awesome-zero-animations-806c494b5bbc?source=rss-56d9bc156947------2</link>
            <guid isPermaLink="false">https://medium.com/p/806c494b5bbc</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[dearueno]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Magnus Magnusson]]></dc:creator>
            <pubDate>Tue, 07 Aug 2018 16:01:33 GMT</pubDate>
            <atom:updated>2018-08-16T12:41:57.124Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>A question from Kirill in Saint Petersburg:</em></strong></p><blockquote><em>“Hi! We want to make an awesome animation like you did for the Zero Financial app intro screen but we can’t create it :-) Can you help us with the javascript code, and show us how?”</em></blockquote><p><strong><em>Magnús Magnússon, Senior Developer at Ueno Reykjavík, answers cheerfully:</em></strong></p><p>Hey Kirill, thanks for your question!</p><p>There are several paths you can take when creating an <a href="https://zerofinancial.com/">animation like this</a>. Each path comes with its own set of limitations and compromises.</p><p>At its core, the solution we went with for this particular challenge was an old-school sprite based animation, like you find in classic computer games. Each frame of the animation is its own image on a sprite sheet, and as we iterate through them in sequence, the animation comes to life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B2maoUULfxGDLfah7bcQww.png" /><figcaption>Half the frames used in the Zero Financial’s intro screen animation.</figcaption></figure><h4>Where do I start?</h4><p>The first step is to create a sprite sheet in a similar vein as the one above. You can use any image-editing program to create one, but there are some <a href="https://www.codeandweb.com/texturepacker">great applications</a> out there that will generate the sprite sheet for you — you just have to provide the images.</p><h4>So how do we get our sprites moving?</h4><p>There are a few ways to accomplish this, but the most consistent one we’ve found is to draw our sprites using an html canvas element. We’ve written a simple version of this in the CodePen below to give you a basic example of how to accomplish this.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fmdmagnusson%2Fembed%2Fpreview%2FzLjRVZ%3Fheight%3D600%26slug-hash%3DzLjRVZ%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io%26embed-version%3D2&amp;url=https%3A%2F%2Fcodepen.io%2Fmdmagnusson%2Fpen%2FzLjRVZ%3Feditors%3D1010&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fm.cdpn.io%2Fscreenshot-coming-soon-small.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/03ecbc24f07e83b92c95c0434c282abb/href">https://medium.com/media/03ecbc24f07e83b92c95c0434c282abb/href</a></iframe><h4>Where do I go from here?</h4><p>We’re big fans of the <a href="https://greensock.com/">GreenSock Animation Platform</a> (GSAP) and generally set up most of our more complex sets of sequential animations using their Timeline feature. When it comes to sprite animations, adding GSAP to the mix gives us a simple way to add easing and tie them in with other animations.</p><p>Below you’ll find we’ve modified our previous example to include a looping timeline with an easing function using GSAP.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fmdmagnusson%2Fembed%2Fpreview%2FvajReP%3Fheight%3D600%26slug-hash%3DvajReP%26default-tabs%3Djs%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io%26embed-version%3D2&amp;url=https%3A%2F%2Fcodepen.io%2Fmdmagnusson%2Fpen%2FvajReP%3Feditors%3D1011&amp;image=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fi.cdpn.io%2F163922.vajReP.small.47d69986-a05f-4be6-86fc-44d053b0e93b.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/a55620bf7d4dd20dda1cfaf271b55318/href">https://medium.com/media/a55620bf7d4dd20dda1cfaf271b55318/href</a></iframe><p>… And that’s pretty much it.</p><p>Thank you for reading, and I hope you found this useful.<br> — Magnus Magnusson</p><p><em>Magnús Magnússon is a Senior Developer at Ueno Reykjavík, which has a nice view of the mountains and of the stadium where Guns’n’Roses played a couple of weeks ago. Want to work with us there? </em><a href="https://ueno.co/careers#reykjavik"><em>We’re hiring</em></a><em>.</em></p><p><strong><em>Dear Ueno is an advice column for people who for some weird reason think we know what we’re doing. Read </em></strong><a href="https://medium.com/ueno/dear-ueno-b6946471b26a"><strong><em>more about it</em></strong></a><strong><em>, or check out </em></strong><a href="https://loremipsum.ueno.co/dear-ueno/"><strong><em>all our old advice</em></strong></a><strong><em>.</em></strong></p><p><em>Send your question to Dear Ueno via email to </em><a href="/service/mailto:hi@ueno.co"><em>hi@ueno.co</em></a><em> with the subject line “Dear Ueno,” or </em><a href="https://twitter.com/uenodotco"><em>tweet at us</em></a><em> with the hashtag #DearUeno. Include your (optionally fake) name, location, and profession. Ok, thanks.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=806c494b5bbc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ueno/dear-ueno-how-did-you-make-those-awesome-zero-animations-806c494b5bbc">Dear Ueno: How did you make those awesome Zero animations?</a> was originally published in <a href="https://medium.com/ueno">Ueno.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>