<?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 Victor Sanabria on Medium]]></title>
        <description><![CDATA[Stories by Victor Sanabria on Medium]]></description>
        <link>https://medium.com/@victorsanabria?source=rss-e749c8443ba3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WWoB3Ob1CJKQpOSRXtfG0g.jpeg</url>
            <title>Stories by Victor Sanabria on Medium</title>
            <link>https://medium.com/@victorsanabria?source=rss-e749c8443ba3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:56:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@victorsanabria/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[Are APNGs the GIFs of the Future?]]></title>
            <link>https://medium.com/@victorsanabria/are-apngs-the-gifs-of-the-future-ee12b95876b0?source=rss-e749c8443ba3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee12b95876b0</guid>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[gif]]></category>
            <category><![CDATA[animation]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Victor Sanabria]]></dc:creator>
            <pubDate>Tue, 31 Jul 2018 13:35:12 GMT</pubDate>
            <atom:updated>2018-08-02T16:10:50.436Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YaNAoutZwPdyNSLr5RfeAQ.gif" /><figcaption>The GIF dilemma. Images created in collaboration with <a href="https://medium.com/u/5dd7dd4aa8e7">Gregory Kubin</a> and <a href="https://www.danaotto.com/">Dana Otto</a> of <a href="https://www.instagram.com/sundaysketchhh/">Sunday Sketch</a>.</figcaption></figure><p>In the history of the Internet, where new businesses and technologies are continually upending the old, the GIF is a curious case of longevity. Created in 1987 as a portable image format that supports basic animation, it is a fixture across websites and social media and like the emoji, has even come to be used as a replacement for text.</p><p>Yet when compared with other image formats, the GIF is showing its age. Complicated GIFs generally display in low quality and may take painfully long to load. And their limited support for transparency is often a source of frustration among graphic designers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*wzdgtZavHzrKYiubZdJwJA.gif" /><figcaption>What could be better than the GIF?</figcaption></figure><h3>The power of the GIF</h3><p>Before examining the APNG in detail, it is important to appreciate just why the GIF has become one of the de facto image formats on the Internet today. From its inception, the GIF has demonstrated three key qualities that have ensured its longevity: Its files compress nicely, can be animated and are portable across most browsers and platforms.</p><h4>Compression</h4><p>Compression is key for images to be displayed quickly on the web, especially as users have become more accustomed to faster Internet speeds and loading times. The GIF uses LZW data compression, an algorithm created in 1984 that encodes sequences of 8-bit data as fixed-length 12-bit codes. This lets a bitmap image reference a palette of up to 256 colors (including transparency) and map every pixel, scanned horizontally from the top left corner of the image to the bottom right, to a specific hex value. For animated images, LZW data compression simply swaps out hex values and replaces them when a pixel changes color from one frame to the next. The end result is a small GIF that loads fairly quickly.</p><h4>Animation</h4><p>From the 90s to the present day, the GIF has tapped into web users’ demand for playful imagery; the image format’s support for simple animations has long been one of its most endearing features. The enduring popularity of GIFs like the <a href="http://peanutbutterjellytime.net/">Dancing Banana</a> from the Peanut Butter Jelly Time Song in 2001 has demonstrated the joy users take in sharing animations with one another, regardless of the image’s quality or palette size.</p><h4>Portability</h4><p>The GIF’s portability is another important reason why it has become such an established image format on the Internet today. Simply put, GIFs play nice with hardware and software and can be displayed uniformly from one machine or browser to the next. Ever since 1987, GIFs have been viewable on Apple computers; they are among the first image formats to be used on the web.</p><h3>The potential of the APNG</h3><p>When examining the APNG through the same lens of compression, animation and portability, it becomes clear that it is quickly catching up to the GIF as a potential improvement.</p><p>Created by Mozilla in 2004, the APNG was received with very little enthusiasm, due to the fact that most legacy software couldn’t distinguish the image format from its static non-animation-supporting parent, the PNG. Yet as the APNG has slowly gained adoption across the Internet, tech companies and graphic designers have come to appreciate its smaller file sizes and better color support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Ss37B7rpwl7FBOWnHj9qKg.gif" /><figcaption>Image compression is a delicate art.</figcaption></figure><h4>Smaller files</h4><p>APNGs offer better compression than GIFs due to their use of filtering and chunks. Through filtering, APNGs can predict the hex value of a significant number of pixels in an image based on the RGB channels of surrounding pixels and thus reduce the amount of information stored in a file. Chunks offer APNGs a place to store data such as frame speed, image dimensions and bit-depth. This allows for animations to load and run more smoothly than GIFs.</p><h4>Better color support</h4><p>In addition to superior compression, APNGs also support 24-bit images and 8-bit transparency, displaying crisper images than the inherently grainy GIF. With tech companies placing more emphasis on clean user interfaces and seamless user experiences, the clearer appearance of the APNG gives it a leg up on the GIF as an image format that can display animations on the web.</p><h4>Improving portability</h4><p>The principle obstacle that the APNG has faced has been slow adoption due to the fact that a lot of software that already recognizes the PNG still hasn’t adapted to display the animations supported by APNGs. In this case, programs will only display the first frame of an APNG file as opposed to looping through the entire animation. Medium, for example, doesn’t support APNGs yet. And on the design side, there are still relatively few ways to export an animation to the format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*AkFIPmvTO06rrTOT5fnHBw.gif" /><figcaption>Slowly but surely, the APNG marches forth.</figcaption></figure><p>But this has started to change. Mozilla has tried to popularize the APNG much as Netscape did with the GIF in the 1990s and in 2016, Apple adopted APNGs as the preferred format for iOS sticker apps. In 2018 Chromium also added APNG support. To date, the only major browsers that don’t offer APNG support are Internet Explorer and Edge.</p><h3>In conclusion</h3><p>In many ways the GIF has baked itself into both the technical and cultural workings of the Internet. As an image format, its compression and readability have made it easy to work with. And as a tool for expression, its support for animation offers the same playful appeal as the meme and the emoji. But as the Internet continues to evolve, users’ expectations for higher quality imagery may increase as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*MIbGYMsxSOEuSdey96uj-Q.gif" /><figcaption>Why should it all revolve around the GIF?</figcaption></figure><p>The APNG isn’t the only example of a potential competitor with the GIF. <a href="https://airbnb.design/lottie/">AirBnB’s Lottie library</a> is another example of a modern way to create moving images on the web. Using a plugin called <a href="https://github.com/airbnb/lottie-web">Bodymovin</a>, it creates lightweight vector animations out of After Effects compositions that can be used for loaders, micro interactions and complicated animations.</p><p>The main challenge that these sophisticated image formats face are their adoption by software giants, designers, developers and, eventually, users. The APNG’s superior compression and quality certainly allow for richer, faster loading raster animations. As it gains more support, the APNG very well could become the GIF of the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee12b95876b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Custom Map in Mapbox]]></title>
            <link>https://medium.com/betterptengineering/creating-a-custom-map-c687f7825d15?source=rss-e749c8443ba3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c687f7825d15</guid>
            <category><![CDATA[mapbox]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Victor Sanabria]]></dc:creator>
            <pubDate>Wed, 23 May 2018 22:07:13 GMT</pubDate>
            <atom:updated>2018-06-06T19:38:57.792Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arSAAaxRfn0kp223hRhD4A.jpeg" /><figcaption>A shot of the map I designed in Mapbox for betterPT’s React website built on Node.js</figcaption></figure><p>Creating a custom map is one of the most daunting tasks in visual design, simply because when you are using a program like <a href="https://www.mapbox.com/">Mapbox</a> or <a href="https://mapme.com/">Mapme</a>, your canvas is the size of the world itself. As a designer, you will be faced with a series of complex decisions, ranging from how best to represent a lake as opposed to an ocean, a village as opposed to a country, or a bridge as opposed to a tunnel. All the while, you will have to address the big picture question of how your map will work as a part of your product and brand.</p><p>Here are a few tips about how to build a custom map based on my experience designing a map in Mapbox for <a href="https://betterpt.com/">betterPT</a>’s React website built on Node.js.</p><h4>Define your map’s purpose</h4><p>Before getting elbow deep in the hard work of choosing colors, icons, fonts and imagery, it is important to define the overall purpose of your map. Where will it live in the UX and UI of of your product? Is the map central to your app or website or is it of secondary importance? Tackling these big picture questions will help define the scope of your project and give you a good place to start before making more specific design decisions.</p><p>At betterPT, our goal is to connect patients and physical therapy providers in a seamless experience through our mobile app and website. When someone searches for a PT practice, there are a lot of criteria that determine a good match, not the least of which are physical therapists’ ratings, availabilities and insurance information. While a clinic’s location is also a key search criterion, it is not the sole driver of a user’s decision to book or not book with a specific PT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ck655LUAzoZ8b3jm8xotQ.jpeg" /><figcaption>Define where your map will live in the UX and UI of your product</figcaption></figure><p>For this reason, I decided that while our map must be a prominent feature of our UI, it shouldn’t jump out too much and distract the user from other information such as PT bios, reviews, or availabilities. In order to make our map less intrusive, I ended up using a lighter and softer color palette in my designs.</p><h4>Choose a color palette</h4><p>When deciding on a color palette, I was fortunate enough to have a base set of colors to work with, ones that I had chosen previously in the UI of our mobile app and website. Nevertheless, I quickly found that digital maps are both broad and nuanced, and require far more than a handful of bold brand colors in order to be brought to life. Being able to visually distinguish a local park from a national park, or a football field from a cemetery, may require that you use four different greens instead of the one or two recommended in your company style guide. And creating a sense of harmony and unity may require that you soften your colors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oaEZK7TumJZeBOiI0OPKdg.png" /><figcaption>I had to soften betterPT’s brand colors to make them less jarring to the eye</figcaption></figure><p>When setting up my color palette, I found it very helpful to organize the most common geographical features of my map into groups and then assign each group a base color. For example, I decided that city blocks should be grayish tan, highways should be butterscotch yellow and parks should be sea green. Within each category, I created subcategories for more specific geographical features, and distinguished them by altering the saturation and tint of my base hues. In this way, I was able to generate a brighter gold to contrast major highways with local roads, or slightly darker green to differentiate local parks from national parks. Maintaining uniform hues offered consistency as my color palette grew.</p><h4>When thinking about labels, think about zoom</h4><p>The main labels in a digital map will vary depending on how much you zoom in. As betterPT patients principally use our map to discover clinics nearby, I placed special focus on how to display neighborhood labels and nearby points of reference. Generally, I found that using a darker, more highly saturated medium or regular weight sans serif font worked well and didn’t distract the eye when set against our more neutral grayish tan representation of busy city blocks and apartment clusters.</p><p>When zoomed out, I found that darker and heavier fonts were more legible when set against the broader contours of a country or state’s topography.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMlLHgIzs1VKwIn-XEzsag.jpeg" /><figcaption>Local views versus national views of the betterPT map</figcaption></figure><h4>See how your map looks in different cities</h4><p>When creating a digital map, you may find that instinctively, you pay close attention to how your home city looks in the designs while ignoring other locations. When deciding what colors, fonts and icons to use, poke around and make sure your map looks just as good in Memphis as it does in San Francisco.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rmiMVR2qDrvTd_maVaaTJQ.jpeg" /><figcaption>How our map looks in Memphis versus in San Francisco</figcaption></figure><h4>Keep your icons simple</h4><p>As betterPT expands across the country, it is important to maintain a consistent brand identity across all the products we put out. It is for this reason that I thought it might be a good idea to use our logo as a part of our map, as a way to represent betterPT clinics in patients’ search views and in doing so, encourage brand recognition. But when testing out my first iteration of this idea, I found that using our logo in this way was very distracting; with all the information displayed on a map, it’s important to keep things simple. After various trials with other icons, I ended up just using the top of our logo to display locations, as a pin not too different from the one that users of Google or Apple Maps are used to working with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmZwYZVrLdg6J_wYHkg5VQ.jpeg" /><figcaption>Using our logo as a map icon was very distracting to the eye. Implementing a simple pin made things clearer.</figcaption></figure><h4>Ensure a smooth handoff</h4><p>Good design requires a harmonious relationship with the people who give life to your ideas, build them out and present them as usable products in the real world. For this reason, it’s important that your development team have all the tools they need to incorporate your ideas into their projects. At betterPT, our web search is built with React on Node.js. A smooth handoff from design to development required that I generate a style URL, access token and custom markers such as our Mapbox icon as a .svg and .png file to work with.</p><h4>In sum</h4><p>Making a custom map is a challenge that will put all of your visual design tools to the test, from typography to color theory to the most fundamental skill of creating a product that is useful and pleasing to the eye. Taken literally, a map is a worldview, and it should therefore be curated as a reflection of your hopes and ideals. In betterPT’s case, our hope is that patients have a great experience discovering the right physical therapy clinic for them. Our custom map has guided us in the right direction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c687f7825d15" width="1" height="1" alt=""><hr><p><a href="https://medium.com/betterptengineering/creating-a-custom-map-c687f7825d15">Creating a Custom Map in Mapbox</a> was originally published in <a href="https://medium.com/betterptengineering">BetterPT engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four tips for creating an animated iMessage Stickerpack]]></title>
            <link>https://medium.com/@victorsanabria/four-tips-for-creating-an-animated-imessage-stickerpack-2b7da50f4c70?source=rss-e749c8443ba3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b7da50f4c70</guid>
            <category><![CDATA[after-effects]]></category>
            <category><![CDATA[motion-graphics]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[imessage-stickers]]></category>
            <category><![CDATA[illustration]]></category>
            <dc:creator><![CDATA[Victor Sanabria]]></dc:creator>
            <pubDate>Fri, 15 Dec 2017 15:47:54 GMT</pubDate>
            <atom:updated>2017-12-15T17:04:17.608Z</atom:updated>
            <content:encoded><![CDATA[<h4>These are interesting times in illustration, animation and design.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQ1zlGevOA9p_dTHL5rWJA.jpeg" /></figure><p>For anyone involved in illustration, animation, or graphic design, creating an iMessage stickerpack is a great opportunity to put your work out there for people to use in the App Store.</p><p>I first got the idea to create a stickerpack earlier this year. In 2016, frustrated with the political climate, I created <a href="https://dribbble.com/victorsanabria">The Animated Donnie GIF Series</a> and shared it as a joke with my friends. But as the months rolled by, my animations got buried in my newsfeed by what felt like an endless series of daily scandals in the news. By June of this year I was itching to resuscitate my Donnie GIFs, this time as <a href="https://itunes.apple.com/us/app/animated-donnie-stickerpack/id1312687206?mt=8">The Animated Donnie Stickerpack</a>, with twenty-one Donnie stickers that friends could share in messages with one another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*0uiyqKRWokMlp4HKWjepXg.gif" /><figcaption>Stickers are fun to share in messages.</figcaption></figure><p>Building a stickerpack is surprisingly easy. Here are four guidelines, based on my experience, that will help you on your way:</p><p><strong>1. Generate assets with transparent backgrounds</strong></p><p>When I created my Animated Donnie Stickerpack, I was lucky because I had already generated over twenty animations in After Effects back in 2016. Even so, I had to do quite a bit of adjusting to make sure these animations would work well as iMessage stickers.</p><p>The first step in adapting my project to the new medium was making sure my assets had transparent backgrounds. iMessage stickers can be pasted anywhere in a conversation, and having a transparent background helps keep the focus on your sticker’s subject matter, in my case, the malevolent little Donnie figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*UCFAnC-KgiEwRIlY_Z11Eg.gif" /><figcaption>Animations with transparent backgrounds work well as stickers.</figcaption></figure><p>In After Effects, exporting a file with a transparent background is simply a question of hiding the background in your play viewer and, on export in the output module, saving the channel as RGBA as opposed to RGB.</p><p><strong>2. Generate looping animations that don’t get cut off</strong></p><p>I also found that stickers look far cleaner as looping animations where it’s difficult to tell where the animation begins and ends.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*SiGunNCZlQM9z4XYBAlYjg.gif" /><figcaption>Looping animations also work great in stickerpacks.</figcaption></figure><p>In my initial iteration of this animation on <a href="https://www.instagram.com/_victorsanabria/">Instagram</a> in 2016, I had Donnie jumping up and down on a trampoline until he finally bounced out of the picture. For my stickerpack, I found that the artwork looked far more slick with Donnie just jumping up and down in place ad infinitum.</p><p>Similarly, I discovered that stickerpack animations look cleaner when they don’t get cut off at the edges. Whereas in an Instagram or a Dribbble post it’s easy to have elements that appear and disappear from the background or borders of an image, in a stickerpack this can look messy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*HRA-DNgKrPYkyiWchz38WA.gif" /><figcaption>Avoid animations that don’t have a clean loop and that cut off at the edges.</figcaption></figure><p><strong>3. Choose your sticker size wisely</strong></p><p>Apple lets you choose one of three pixel dimensions for your stickers: 618x618 px, 408x408 px, or 300x300 px. It’s important to choose one, and make sure all of your stickers, animated or not, fit within that size. You should also make sure that none of your stickers exceed the file size of 500KB per sticker. If you end up going for stickers at a 618 pixel dimension, bear in mind that you may have to cut down on the complexity of your illustration or animation to keep the file size down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*4N7_CqW8Q_ja8LD1DxAsOA.gif" /><figcaption>Reduce the complexity of your animations to stay under the 500KB file size.</figcaption></figure><p><strong>4. Use APNGs instead of GIFs</strong></p><p>Apple lets you upload animated stickers as either APNGs or GIFs. While APNGs are far more time consuming to produce than GIFs, I would nevertheless recommend using APNGs for a stickerpack, as the images come out higher in quality, with better transparency and at smaller file sizes.</p><p>To create the APNGs for my stickerpack, I had to export my Donnie Animations from After Effects as a PNG sequence in RGBA color mode and then pass them through a service called <a href="http://animatedpngs.com/">animatedpngs.com</a>. The process was tedious but definitely worth it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/197/1*oDWKlOMKb6H9zDrmvB1f7A.gif" /><figcaption>Creating APNGs is hard work, but it pays off.</figcaption></figure><p>Once you create your assets, finishing off your iMessage stickerpack is a matter of spending $99 for a developer’s account at Apple, downloading X-Code and walking through Apple’s steps for creating the app. The process of using X-Code to create a stickerpack app is surprisingly painless, and is a great way for designers to get their feet wet with a tool that many developers use every day.</p><p>Beyond that, making a stickerpack is a fantastic way to contribute to discourse by offering up your work as a tool for daily communication. As a designer, it’s nice to think of people ascribing new meanings to my Donnie stickers as they send messages back and forth among friends. While we may live in calamitous times, novel means to express your hopes, fears and opinions abound.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*Dz4PtvqhGxJHYB13_VjQzQ.gif" /><figcaption>You can download The Animated Donnie Stickerpack <a href="https://itunes.apple.com/us/app/animated-donnie-stickerpack/id1312687206?mt=8">here</a> :)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b7da50f4c70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing a Custom Loader]]></title>
            <link>https://medium.com/betterptengineering/designing-a-custom-loader-ac209b096c22?source=rss-e749c8443ba3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac209b096c22</guid>
            <category><![CDATA[bodymovin]]></category>
            <category><![CDATA[after-effects]]></category>
            <category><![CDATA[lottie]]></category>
            <category><![CDATA[motion-graphics]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Victor Sanabria]]></dc:creator>
            <pubDate>Wed, 25 Oct 2017 18:02:22 GMT</pubDate>
            <atom:updated>2017-10-25T18:02:22.804Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I’ll be talking about how to create a custom loader in After Effects and export it to a .json file using a plugin called <a href="https://github.com/bodymovin/bodymovin">Bodymovin</a>.</p><p>For a user of an app or website, a “page loading” icon may be the smallest of your concerns. But as a designer with <a href="https://medium.com/betterptengineering">betterPT</a>, I’ve found that carefully curating small details like this actually goes a long way towards cultivating a more amenable user experience.</p><p>When I started thinking about how to create my loader, I knew that I wanted something easily identifiable with our brand, so I started playing with our logo (which curiously resembles Da Vinci’s Vitruvian man) in After Effects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*v7Rxi6yNr7_tUU_sdxZ6LA.png" /><figcaption>betterPT Logo and Da Vinci’s Vitruvian Man</figcaption></figure><p>As an animation, I really liked my first iteration, but as our CTO <a href="https://medium.com/@estebanrules">Damian</a> pointed out, it takes quite a while for the animation to run from start to finish. For fast loading pages, the loader was going to get cut off halfway through its animation cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*4gMxG_iCQYc3cYEcEEI-pg.gif" /><figcaption>betterPT custom loader (first trial)</figcaption></figure><p>Back to the drawing board, I tried a second, faster version. And failed miserably. This loader nearly gave Damian an epileptic fit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*DolctMR0nEezAcLY_7RC2A.gif" /><figcaption>betterPT Custom Loader (second trial)</figcaption></figure><p>I finally settled on a spinner that sends our Vitruvian man’s head clockwise round the two arrows that comprise the body, all in exactly one second. I liked it. The circular movement evoked the hands of a clock and the back-and-forth of the arrows echoed the subtle palpitations of a heart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Mr8SbXgjpi3NrZLLdzEq1A.gif" /><figcaption>betterPT Custom Loader (third trial)</figcaption></figure><p>In terms of execution, the process was fairly simple.</p><p>The first step was to create a project in After Effects with an artboard that fit the dimensions of our logo. I went with a square artboard at 1000px.</p><p>The second step was to define a frame rate. I’ve always preferred 25fps because it divides up easily and makes for lighter files.</p><p>The third step was to import my imagery. It’s important to have whatever images you’re using in vector files for two main reasons:</p><ol><li>They can scale to whatever size you want.</li><li>They can be translated into a .json file through Bodymovin further down the line.</li></ol><p>It’s also important to work with simple shapes, which go a long way towards making your files small and nimble for export. In my case, I divided our Vitruvian man into three vector shapes in Illustrator: His head (Layer 1), the arrow that makes up his right side (Layer 2), and the arrow that makes up his left side (Layer 3). Import the image as a composition into After Effects and <em>voilà</em>, your motion project will respect the layers as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-HWuoLKrB58i9FqKxy8V-w.png" /><figcaption>betterPT Custom Loader Comp Settings and Artwork</figcaption></figure><p>After that, it’s animate away.</p><p>For the Vitruvian head, I first set its anchor point at the center of the circle whose path it was going to trace and then set it to lift up in position after 5 frames, rotate 360° around its anchor point in the next 15 frames, and then drop in the next 5 frames. A full loop from start to finish in exactly one second.</p><p>Word to the wise: I also set the Vitruvian head’s curves so that it would accelerate at the beginning of the animation and decelerate at the end. Why? To set the loader in motion so that it jumps out at you right away.</p><p>For the two arrows, I just set them to move from side to side, and go from 100% to 60% opacity over the course of the Vitruvian head’s 360° trajectory. By adding the expression (loopOut“pingpong”) to the arrows’ position and opacities, all you need is to set the opening and the closing keyframes, and the arrows will loop out the animation for all eternity.</p><p>Using the “B” and “N” keyboard shortcuts, I set the animation to open at 0 frames and close at 25, making sure the animation looked exactly the same in its initial state as in its final state, for optimal looping. I saved it, ran the Bodymovin plugin (Window–Extensions–Bodymovin) and then passed the data.json file off to our iOS developer <a href="https://medium.com/@JimCampagno">Jim</a> to implement in our app using the <a href="https://github.com/airbnb/lottie-ios">Lottie library</a>. All in all, a smooth experience, and one that perfectly reflected the synergy between design and development that we aim for at betterPT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Mr8SbXgjpi3NrZLLdzEq1A.gif" /><figcaption>Our final loader :)</figcaption></figure><p>After the adventure, I drew three conclusions about what makes for a good loader:</p><ol><li>It must be playful and reflect your brand.</li><li>It must be a quick and simple animation.</li><li>It mustn’t be too hard on the eyes.</li></ol><p>By following these three principles, I think you can create a good custom loader that adds value to your app or website. After all, when it’s all said and done, how many hours of our lives do we spend staring at a screen, waiting for a page to load? And as Andy Warhol asked, “isn’t life a series of images that change as they repeat themselves?” Might as well make them worth it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac209b096c22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/betterptengineering/designing-a-custom-loader-ac209b096c22">Designing a Custom Loader</a> was originally published in <a href="https://medium.com/betterptengineering">BetterPT engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>