<?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 Andrés Cuervo on Medium]]></title>
        <description><![CDATA[Stories by Andrés Cuervo on Medium]]></description>
        <link>https://medium.com/@cwervo?source=rss-3e005eef7c04------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1bl9a5mh0LcZIMoNPe8U_g.jpeg</url>
            <title>Stories by Andrés Cuervo on Medium</title>
            <link>https://medium.com/@cwervo?source=rss-3e005eef7c04------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:47:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cwervo/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[Everything I Know About Launching iOS AR Quick Look From The Web]]></title>
            <link>https://medium.com/@cwervo/everything-i-know-about-launching-ios-ar-quick-look-from-the-web-e7957f165c51?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7957f165c51</guid>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[ar]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[webxr]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Mon, 30 Sep 2019 00:00:00 GMT</pubDate>
            <atom:updated>2019-10-02T12:51:01.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMC9KXNConJ4h4irdlBDmg.png" /></figure><p><em>TL;DR</em>: There’s an amazing feature called AR Quick Look on iOS that allows you to preview 3D models. There’s a bunch of info on how to do this from inside native apps but not a lot of specifics (outside of WWDC talks) on how to use this feature from inside HTML/JavaScript. This page is an attempt to remedy that!</p><p><strong>Note: I’ll be updating this post over at cwervo.com, but the Medium post may get out of date as it doesn’t support much of the formatting of the original blog post. For the original blog post go to: </strong><a href="https://cwervo.com/writing/quicklook-web/">https://cwervo.com/writing/quicklook-web/</a></p><h3>👋🏼</h3><p>Did you know you can launch 3D models from a web page? There’s a helpful web component called <a href="https://github.com/GoogleWebComponents/model-viewer">&lt;model-viewer&gt;</a> that will handle this for you. It&#39;ll look something like this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Fcwervo%2Fembed%2Fpreview%2FgOYEMjw%3Fheight%3D600%26slug-hash%3DgOYEMjw%26default-tabs%3Dhtml%2Cresult%26host%3Dhttps%3A%2F%2Fcodepen.io&amp;url=https%3A%2F%2Fcodepen.io%2Fcwervo%2Ffull%2FgOYEMjw&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/47efb5b16e33bca8db741ac24a4b8b59/href">https://medium.com/media/47efb5b16e33bca8db741ac24a4b8b59/href</a></iframe><p>… &amp; the source code looks like this:</p><pre>&lt;model-viewer<br>    src=&quot;/assets/3D-models/logo.glb&quot;<br>    ios-src=&quot;/assets/3D-models/logo-3m-scaled.usdz&quot;<br>    ar auto-rotate camera-controls background-color=&quot;#2EAFAC&quot;&gt;<br>&lt;/model-viewer&gt;</pre><p>On Android devices this enables an AR feature called Scene Viewer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*NSuDv8yMaxQaj42u.jpg" /><figcaption>(Thanks to Jordan Santell for this screencap of Scene Viewer on an Android device!)</figcaption></figure><p>&amp; on iOS it launches a feature called AR Quick Look:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/0*aF9rYSxJUyRbNfLm.jpg" /></figure><p>Okay, that’s cool! How does it work? Well under the hood this web component — <a href="https://github.com/GoogleWebComponents/model-viewer">&lt;model-viewer&gt;</a> - is using browser-specific attributes to launch proprietary AR features (translation: this will only work in specific browsers &amp; is not standard HTML!) On iOS devices it&#39;s using <a href="https://developer.apple.com/augmented-reality/quick-look/">iOS Quick Look</a> &amp; on Android it&#39;s using <a href="https://developers.google.com/ar/develop/java/scene-viewer">Android&#39;s AR Scene Viewer</a>. While Google documents exactly how Scene Viewer should be launched from HTML, Apple&#39;s HTML Quick Look documentation is super sparse.</p><h3>Apple’s Documentation on launching Quick Look from the Web</h3><p>It’s not easily searchable on <a href="https://developer.apple.com/documentation/">their documentation website</a> &amp; all I could find officially documenting it is:</p><ul><li>Three minutes (16:30–19:50) in a WWDC talk from 2018 — <a href="https://developer.apple.com/videos/play/wwdc2018/603/">Integrating Apps and Content with AR Quick Look</a></li><li><a href="https://devstreaming-cdn.apple.com/videos/wwdc/2018/603augiuv41xoowslk8/603/603_integrating_apps_and_content_with_ar_quick_look.pdf">Four slides in the accompanying PDF deck</a> (21 through 25, if you’re curious)</li><li>A few minutes in a follow up WWDC talk from 2019 — <a href="https://developer.apple.com/videos/play/wwdc2019/612">Advances in AR Quick Look</a></li><li>In <a href="https://devstreaming-cdn.apple.com/videos/wwdc/2019/612umedd7bboc1/612/612_advances_in_ar_quick_look.pdf">the accompanying PDF deck</a> we have 38 slides (126–164).</li><li><a href="https://developer.apple.com/documentation/arkit/previewing_a_model_with_ar_quick_look#3263412">This section in</a> an article on ‘Previewing a Model with AR Quick Look’</li><li><a href="https://webkit.org/blog/8421/viewing-augmented-reality-assets-in-safari-for-ios/">This post</a> from the WebKit engineering blog from 2018</li></ul><p>… and that’s it! There’s a <a href="https://developer.apple.com/design/human-interface-guidelines/ios/system-capabilities/quick-look/">wealth</a>. <a href="https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Introduction/Introduction.html">of</a>. <a href="https://developer.apple.com/documentation/quicklook">information</a>. on the app-based way to launch Quick Look, but surprisingly little on how to launch it from the web. This post exists because I’ve learned a bunch about launching iOS Quick Look from the browser while using it <a href="https://movableink.com/">at work</a> &amp; I want to save others time!</p><h3>Everything I know</h3><h3>The Image Tag Is Required</h3><p>One thing they don’t note in PDF’s is that the image tag is <strong>required</strong>. You can’t just make a link with href=&quot;eg.usdz&quot; &amp; rel=ar - it needs to have a direct child that&#39;s an image (e.g. an img or picture tag). That is, in HTML, you <em>need</em> this structure:</p><pre>&lt;a href=&quot;example.usdz&quot; rel=&quot;ar&quot;&gt;<br>    &lt;img href=&quot;eg.jpg&gt;&quot; /&gt;<br>&lt;/a&gt;<br>&lt;!-- or --&gt;<br>&lt;a rel=&quot;ar&quot; href=&quot;example.usdz&quot;&gt;<br>    &lt;picture&gt;<br>        &lt;source srcset=&quot;wide-eg.png&quot;<br>                media=&quot;(min-width: 600px)&quot;&gt;<br>        &lt;img src=&quot;eg.png&quot;&gt;<br>    &lt;/picture&gt;<br>&lt;/a&gt;</pre><h3>The Image Tag Must Be The First Child</h3><p>I ran a <a href="https://test-ios-quicklook-js.glitch.me/#testing-directness-of-image">little test</a> &amp; as of 2019–09–30, on iOS 13, it appears that it’s a strict requirement for the img tag to be the <em>first</em> nested child of the rel=ar link element. If it&#39;s the second element, or even nested in the first child element, Safari fails to recognize it as an AR Quick Look element &amp; instead will link to the USDZ directly. You can see this because the special Quick Look box icon doesn&#39;t appear in the top right of any elements after the first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/0*ElrrYwDl2fjCOqiD.jpg" /></figure><p>What if you don’t want to use a preview image? You can actually get away with something like this:</p><pre>&lt;a href=&quot;example.usdz&quot; rel=&quot;ar&quot;&gt;<br>    &lt;img /&gt; &lt;!-- remember, this has to be first! --&gt;<br>    &lt;!-- Put whatever else you want in here --&gt;<br>&lt;/a&gt;</pre><h3>You can link to Data URI’s &amp; blobs as well</h3><p>As of 2019 you can now use <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs">data URI’s</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob">blobs</a> instead of linking to the .usdz directly:</p><pre>&lt;a rel=ar href=&quot;data:model/vnd.usdz+zip;base64, &lt;base64 encoded string&gt;&quot; &gt;<br>   download=&quot;example.usdz&quot;&gt;<br>    &lt;img src=&quot;eg.jpg&quot;&gt;<br>&lt;/a&gt;<br>&lt;!-- or, Reality file: --&gt;<br>&lt;a rel=&quot;ar&quot; href=&quot;data:model/vnd.usdz+zip;base64,&lt;base64 encoded string&gt;&quot;<br>   download=“example.usdz”&gt;<br>    &lt;img src=“eg.jpg”&gt;<br>&lt;/a&gt;<br><br>&lt;a rel=&quot;ar&quot; href=&quot;blob:&lt;generated URL string&gt;&quot; download=“asset.usdz”&gt;<br> &lt;img src=“asset-thumbnail.jpg”&gt;<br>&lt;/a&gt;</pre><h3>Controlling scale of the models</h3><p>As of Safari 12.2 you can force true scale of models by <em>disabling scaling</em>:</p><pre>&lt;!--<br>For allowsContentScaling:<br>0 = off<br>1 = on<br>--&gt;<br><br>https://developer.apple.com/arkit/gallery/toy_biplane.usdz#allowsContentScaling=0</pre><p>If you do this you’ll get a Quick Look scene where the object immediately bounces back to 100% to show that it cannot be re-sized:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FkdpHY7zALgSXrYOh3Z%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FkdpHY7zALgSXrYOh3Z%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FkdpHY7zALgSXrYOh3Z%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="940" frameborder="0" scrolling="no"><a href="https://medium.com/media/07e2a206bead83abc8caaf96a0f0e215/href">https://medium.com/media/07e2a206bead83abc8caaf96a0f0e215/href</a></iframe><h4>Note: While you can <a href="https://cwervo.com/writing/quicklook-web/#launching-without-a-preview-image-using-javascript">launch Quick Look from a browser that’s not Safari</a>, as of 2019–09–30 this won’t be respected in other browsers.</h4><h3>Setting the Share Link</h3><p>In Quick Look you get a ‘Share’ icon:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*_2QnI8c3Fw4nb5El.jpg" /></figure><p>By default this will share a link to the model itself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*XRhYkI6JXcKOJCfT.jpg" /></figure><p>But if you add #canonicalWebPageURL=http://example.com to the end of that you can send people to a more useful URL. In the example below I&#39;ve set#canonicalWebPageURL=http://cwervo.com:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*OjzWBKJ4woIZ78-Y.jpg" /></figure><p>If you’d like to set both the scaling option &amp; the canonical share URL you can use:</p><pre>#allowsContentScaling=0&amp;canonicalWebPageURL=https://example.com</pre><p><strong>NOTE: As with </strong><strong>allowsContentScaling, the </strong><strong>canonicalWebPageURL fragment only seems to work in Safari as of 2019-09-30.</strong></p><h3>You need to have the right MIME type</h3><p>Before iOS 12.2 the MIME type for USDZ’s was model/vnd.pixar.usd ormodel/usd. These are no longer the official MIME types - as of 2019 you want to use model/vnd.usdz+zip for USDZ&#39;s &amp; model/vnd.reality</p><pre># If you&#39;re using Apache, this is how you&#39;d add the MIME types for:<br><br># USDZ files for iOS AR Quicklook:<br>AddType model/vnd.usdz+zip .usdz<br><br># Reality files<br>AddType model/vnd.reality .reality</pre><h3>iOS AR Quick Look &amp; JavaScript</h3><h3>Detecting Web AR Quick Look Support</h3><p>The <strong>Feature Detection</strong> section in Webkit’s <a href="https://webkit.org/blog/8421/viewing-augmented-reality-assets-in-safari-for-ios/">“Viewing Augmented Reality Assets in Safari for iOS”</a> post shows us how to detect if ar is a valid attribute in the browser we&#39;re in:</p><pre>const a = document.createElement(&quot;a&quot;);<br>if (a.relList.supports(&quot;ar&quot;)) {<br>  // AR is available.<br>}</pre><p>If you want to test if your device can run iOS’ AR Quick Look feature I <a href="https://test-ios-quicklook-js.glitch.me/quicklook-available.html">made a website that will tell you!</a> All it does is run the above snippet of Javascript &amp; then print Yes/No.</p><h3>Launching without a preview image using JavaScript</h3><p>On my <a href="https://glitch.com/~test-ios-quicklook-js">Test iOS Quick Look page</a> I have a function called launchIOSQuick LookAR that&#39;s the minimum JavaScript you need to launch iOS AR Quick Look:</p><pre>// `usdzSrc` is expected to be a string path to a `.usdz` file<br>function launchIOSQuick LookAR(usdzSrc) {<br>  const anchor = document.createElement(&#39;a&#39;);<br>  anchor.setAttribute(&#39;rel&#39;, &#39;ar&#39;);<br>  anchor.appendChild(document.createElement(&#39;img&#39;));<br>  anchor.setAttribute(&#39;href&#39;, usdzSrc);<br>  anchor.click();<br>}<br>// Note: this code is basically a modified version of the <a href="https://github.com/GoogleWebComponents/model-viewer/blob/master/src/features/ar.ts#L27-L36">openIOSARQuick Look</a> in &lt;model-viewer&gt;</pre><p>Yep! There’s no API for it — all we can do for now is create offscreen HTML elements replicating the structure iOS expects &amp; programmatically click.</p><h3>OS Differences</h3><h3>iOS 12</h3><ul><li>Works in Safari &amp; PWA’s (e.g. pages saved to the Home Screen from Safari)</li><li>Doesn’t work in in-app browsers</li></ul><h3>iOS 13</h3><ul><li>Works in all of the above</li><li>Now works in in-app browsers! 🎉</li><li>— <em>Big exception</em>: as of 2019–09–30 this still doesn’t work in Facebook’s in-app web browser. It looks like they’re not using the standard in-app browser &amp; using their own WKWebView ¯_(ツ)_/¯</li></ul><h3>Did I miss anything?</h3><p>I’m posting this because I’d like there to be a single reference for all this information — if I missed anything, feel free to email me at <a href="https://cwervo.com/cdn-cgi/l/email-protection#2c444507595f48566c4f5b49025b584a">[email protected] </a>&amp; I’ll add it here!</p><h3>Acknowledgments</h3><p>Thanks to <a href="https://twitter.com/0xcda7a">Chris Joel</a>, <a href="https://twitter.com/jsantell">Jordan Santell</a>, &amp; <a href="https://twitter.com/joshcarpenter">Josh Carpenter</a> for chatting with me about USDZ’s on the web &amp; reviewing the first couple drafts of this post!</p><p><a href="https://twitter.com/acwervo">@acwervo</a></p><p><em>Originally published at </em><a href="https://cwervo.com/writing/quicklook-web/"><em>https://cwervo.com</em></a><em> on September 30, 2019.</em></p><p><strong>Note: I’ll be updating this post over at cwervo.com, but the Medium post may get out of date as it doesn’t support much of the formatting of the original blog post. For the original blog post go to: </strong><a href="https://cwervo.com/writing/quicklook-web/">https://cwervo.com/writing/quicklook-web/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7957f165c51" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I’m Leaving Silicon Valley]]></title>
            <link>https://medium.com/@cwervo/why-im-leaving-silicon-valley-2d8e341a0d0?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d8e341a0d0</guid>
            <category><![CDATA[see-ya]]></category>
            <category><![CDATA[silicon-valley]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Tue, 16 Jul 2019 21:35:22 GMT</pubDate>
            <atom:updated>2019-07-16T21:35:22.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Photo of the Golden Gate bridge in San Francisco." src="https://cdn-images-1.medium.com/max/1024/1*YeBLEBn_3jkbpVrVjPYR4w.jpeg" /></figure><p>Because I want to ¯\_(ツ)_/¯</p><p>That’s it, that’s the whole post!</p><p><em>(Photo by </em><a href="https://unsplash.com/@oplattner?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Oliver Plattner</em></a><em> on </em><a href="https://unsplash.com/search/photos/san-francisco?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Unsplash</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d8e341a0d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parc3l: Combining Three.js, Rust, and WebAssembly!]]></title>
            <link>https://medium.com/@cwervo/parc3l-combining-three-js-rust-and-webassembly-c1e643ef7681?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1e643ef7681</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[threejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 14:34:23 GMT</pubDate>
            <atom:updated>2018-07-05T20:36:43.853Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HsACqW6CGwHYfvuwnA_iRA.png" /><figcaption>A screen capture of a cube mid-spin on the Parc3l page.</figcaption></figure><p><a href="http://webassembly.org/">WebAssembly</a> has been interesting me lately, specifically the prospect of doing arithmetically-intensive operations with it, not unlike the fantastic physics engine Emscripten port <a href="https://github.com/kripken/ammo.js/">Ammo.js</a>. Compiling something like that is out of the scope of this little post (but should be getting easier!), and I’ve left some links at the bottom so you can clear more about WebAssembly if you’re interested.</p><p>As a <em>simple</em> example I put together <a href="https://glitch.com/~parc3l"><em>Parc3l</em></a> (<a href="https://parc3l.glitch.me/">live demo</a>). It uses the <a href="https://parceljs.org/">Parcel bundler tool</a> as a really convenient way to combine Three.js code with Rust in the same web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*SdnI1ZoNkI-ErePvWATPZw.gif" /><figcaption>A screen recording of a rotating cube from <a href="https://parc3l.glitch.me/">https://parc3l.glitch.me/</a></figcaption></figure><p>All I did was install parcel, create a few files, and I was up and running!</p><p>Let’s walk through the code:</p><h4>index.html</h4><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;title&gt;Parc3l&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;main.scss&quot;&gt;<br>&lt;/head&gt;<br>&lt;body class=&quot;main&quot;&gt;<br>  &lt;script src=&quot;./index.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>This isn’t too bad, it’s a minimal HTML page. Notably, Parcel will replace index.js with the final, bundledparcel.js; likewise .scss with a compiled .css.</p><h4>index.js</h4><p>This is where most of the magic happens, let’s go through it one chunk at a time:</p><pre>import &#39;./main.scss&#39;</pre><pre>import * as THREE from &#39;three&#39;;<br>import {add} from &#39;./wow.rs&#39;;<br>console.log(add(2, 3));</pre><pre>let camera, scene, renderer;<br>let geometry, material, mesh;</pre><pre>init();<br>animate();</pre><p>All we do here at first is bring in other assets: our CSS, Three.js for 3D graphics, and this little wow.rs file (a Rust file!) (the wow.rs will get compiled to a .wasm file when we run parcel build so that it can be imported). Let’s console.log right after the import to make sure exporting from Rust is working, so we call the add function it defines (we’ll dig into this in the next section) and can see in the console the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQPSP6yhpIsYr5IOAKsmgg.png" /><figcaption>A “5” from our WASM compiled Rust function printed in the Javascript console, above the standard THREE.js console output.</figcaption></figure><p>Nearing the end of this top-level chunk we declare some global Three variables like camera, scene, and renderer. Lastly we call the methods that kick-off rendering our scene: init() and animate().</p><p>The whole init() function that follows (in fact most of the file) originates from the <a href="https://threejs.org/docs/#manual/introduction/Creating-a-scene">“Creating a scene”</a> exercise in the Three.js docs, so we won’t go over it again here. Picking back up at line 32:</p><pre>let hello = document.createElement(&#39;div&#39;);<br>hello.id = &quot;hello&quot;;<br>document.body.appendChild(hello);</pre><p>Here we have lines that create and attach an element to the DOM that we’ll later use to output the calculations from our Three updates.</p><pre>function animate() {</pre><pre>requestAnimationFrame( animate );</pre><pre>mesh.rotation.x = add(mesh.rotation.x, 0.01);<br>mesh.rotation.y = add(mesh.rotation.y, 0.02);</pre><pre>if (hello) {<br>        hello.innerText = `Hello from Rust! New rotation: {<br>            x: ${mesh.rotation.x},<br>            y: ${mesh.rotation.y}<br>    }`;<br>    }</pre><pre>renderer.render( scene, camera );<br>}</pre><p>And finally, our Rust code being called inside Javascript! Every 60 seconds we run this animate function, and when we do we use a compiled function called add to add two numbers together and assign the result back to the same variable, so really we’re incrementing the x and y rotation values by a small number every frame. In addition we update our #hello text so we can see the updates as actual numbers.</p><p>(Note: In a real application we’d probably want to do computation like this from a WebAssembly module running in a WebWorker, but I wanted to keep things simple here.)</p><h4>wow.rs</h4><pre>use std::f64;</pre><pre>#[no_mangle]<br>pub fn add(a: f64, b: f64) -&gt; f64 {<br>  return a + b<br>}</pre><p>And finally the new-comer: Rust! First we pull in the floating point type because we’ll be using it in our function. Next we use #[no_mangle] above our function declaration so that the WASM compiler doesn’t optimize away our function name (which would mean we wouldn’t be able to call it from JS, defeating the whole purpose!) Our actual function is dead simple: take two floats, add ’em up, return that result.</p><p>Now, whenever we used add() in the index.js file above we call this pre-optimized version!</p><h4>Serving it up!</h4><p>This will all work fine when we run parcel serve (which is what I was using when I was developing this project locally) but I wanted to host everything in Glitch so you could easily browse my code! In order to run on the server we’ll need a static build of our code, which is easy enough:</p><pre>parcel build index.html --out-dir docs</pre><p>And then we add:</p><h4><strong>start.js</strong></h4><pre>const express = require(&#39;express&#39;) const app = express() </pre><pre>app.use(express.static(&#39;docs&#39;)) app.listen(8000, () =&gt; console.log(&#39;Serving at <a href="http://localhost:8000!&#39;">http://localhost:8000!&#39;</a>))</pre><p>Glitch runs this file automatically (via the npm start command) to serve our assets. All it does is start a static server that spits out all the files in our docs build directory. So with this we should see our files now, right? Well, not <em>yet</em>. When I went to <a href="https://parc3l.glitch.me/">parc3l.glitch.me</a> while setting this tutorial up I was given a blank page, and this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6K4gaRVegGt3mulstTL8EQ.png" /><figcaption>An image of the Chrome dev console telling us we have an incorrect MIME type for serving .wasm files</figcaption></figure><p>MIME types?? Yes, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME types</a>. In short, they’re a piece of information that tells the browser what file is coming that way the browser knows how to decode it!</p><p>If you’re like me, you’ve never worked with an experimental filetype before, meaning every file you’ve served before has had a MIME type built into whatever server you were using. Well, turns out adding a new MIME type on the fly to Express isn’t too hard:</p><pre>// Need to add the .wasm MIME type explicitly as it&#39;s not standard yet<br>express.static.mime.types[&#39;wasm&#39;] = &#39;application/wasm&#39;</pre><p>And voilà! We can now go to <a href="http://parc3l.glitch.me/">parc3l.glitch.me</a> &amp; see a glorious spinning cube, with the math being done by Rust via WebAssembly!</p><h4>Serving on Github Pages</h4><p>I made the build directory docs so that I could host this on gh-pages from the Github repo, which works like magic! Wait, why? Why didn’t we need to fiddle with the MIME types (which we wouldn’t even have access to, because gh-pages <em>only</em> serves static assets). Well, it’s not magic after all. I got curious so I searched “github pages mime” and found <a href="https://help.github.com/articles/mime-types-on-github-pages/">this page</a>. It notes that Github:</p><blockquote>aggregates MIME types from the Apache and Nginx projects as well as the official IANA list of internet content types.</blockquote><p>And we can even go see <a href="https://github.com/jshttp/mime-db/blob/63731b4b161970d3205dda268102a44ea9436254/src/custom-types.json#L265">the line</a> that adds the correct MIME type. Sweet!</p><p>This is a pretty trivial example but hopefully it gives you an idea of how easy it is to get up and running with Rust in the browser, specifically combining it with Javascript in order to update the page. You <a href="https://glitch.com/~parc3l">can view/remix the code over here</a>, and feel free to reach out to me on <a href="https://twitter.com/acwervo">Twitter</a> with questions or feedback!</p><p>(Edit July 5, 2018): Now Glitch websites are embeddable directly on Medium, so here’s the website!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fglitch.com%2Fembed%2F%23%21%2Fembed%2Fparc3l%3Fpath%3DREADME.md%26sidebarCollapsed%3Dtrue%26previewSize%3D100&amp;dntp=1&amp;url=https%3A%2F%2Fglitch.com%2Fembed%2F%23%21%2Fembed%2Fparc3l&amp;image=https%3A%2F%2Fglitch.com%2Fedit%2Fimages%2Flogos%2Fglitch%2Fsocial-card%402x.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=glitch" width="600" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f08a11c0746ff25e81800d02f72d830/href">https://medium.com/media/1f08a11c0746ff25e81800d02f72d830/href</a></iframe><h3>Some resources:</h3><h4>Rust:</h4><ul><li><a href="https://developer.mozilla.org/en-US/docs/WebAssembly">https://developer.mozilla.org/en-US/docs/WebAssembly</a></li><li><a href="https://hacks.mozilla.org/2017/02/a-cartoon-intro-to-webassembly/">A cartoon intro to WebAssembly</a></li><li><a href="https://rsms.me/wasm-intro">Introduction to WebAssembly</a></li></ul><h4>JS bundlers:</h4><ul><li><a href="https://parceljs.org/">Parcel</a> (specifically <a href="https://medium.com/@devongovett/parcel-v1-5-0-released-source-maps-webassembly-rust-and-more-3a6385e43b95">Parcel+Rust</a>)</li><li><a href="https://github.com/choojs/bankai">Bankai</a></li><li><a href="https://webpack.js.org/">Webpack</a></li><li><a href="https://rollupjs.org/guide/en">Rollup</a></li></ul><h4>Parcel + Three.js specific things:</h4><ul><li><a href="https://github.com/parcel-bundler/parcel/issues/289">Regular Browser Reload on File Save</a></li><li><a href="https://github.com/parcel-bundler/parcel/pull/443">Add — reload option for hard reload on non-CSS assets</a></li><li><a href="https://github.com/seep/parcel-plugin-glsl">Parcel-glsl</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1e643ef7681" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creative Coding with Non-OOP languages: Clojure, Haskell, Rust, and Carp.]]></title>
            <link>https://medium.com/@cwervo/creative-coding-with-non-oop-languages-clojure-haskell-rust-and-carp-9b2bd686bfc1?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b2bd686bfc1</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[clojure]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 12:12:06 GMT</pubDate>
            <atom:updated>2018-03-12T12:12:06.607Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Note: I plan on updating this post if there’s interest in it, this isn’t meant to be an exhaustive list, but more of a jumping off point into the world of generative art with non-OOP languages, which is a very particular niche.</blockquote><p>I’ve been interested in non-object oriented programming and creative coding for a while now, so I thought I’d put together a little list for anyone else looking for this sort of information.</p><p>I came across <a href="https://github.com/carp-lang/Carp">Carp</a> tonight—a non-garbage-collected, typed Lisp—and am particularly excited about it because it fulfills a particular niche (namely a Lisp for WebAssembly) I’ve been dreaming up recently, but if you landed on this post you might find the other options interesting as well! If I missed anything or you’d just like to chat about this niche intersection of interests, feel free to <a href="https://twitter.com/acwervo">send me a message</a>.</p><h4>Clojure:</h4><ul><li><a href="http://thi.ng/">Thi.ng</a>—A collection of Clojure(Script) libraries for working with graphics (note: doesn’t require but also has C/ES6/TypeScript libraries)</li><li><a href="http://quil.info/">Quil</a> — A 2D-focused port of Processing into Clojure(Script)</li><li><a href="https://github.com/nasser/zajal">Zajal</a>—An experimental creative coding framework made with Clojurescript</li><li><a href="https://github.com/arcadia-unity/Arcadia">Arcadia</a>—Write Clojure scripts that run directly in Unity projects!</li></ul><h4>Haskell</h4><ul><li><a href="https://github.com/sleexyz/hylogen">Hylogen</a> — GLSL shaders in Haskell</li></ul><h4>Rust:</h4><ul><li><a href="https://github.com/MindBuffer/nannou">Nannou</a>—A creative coding framework in Rust “inspired by Processing, OpenFrameworks and Cinder”!</li><li><a href="https://github.com/amethyst/amethyst">Amethyst</a>—A “data-oriented game engine”</li></ul><h4>Carp:</h4><ul><li><a href="https://github.com/hellerve/anima">Anima</a> — An experimental, tiny drawing framework</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b2bd686bfc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Could you name your child using emoji? ]]></title>
            <link>https://medium.com/@cwervo/could-you-name-your-child-using-emoji-7dc6d2ca9202?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dc6d2ca9202</guid>
            <category><![CDATA[names]]></category>
            <category><![CDATA[unicode]]></category>
            <category><![CDATA[emoji]]></category>
            <category><![CDATA[encoding]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Fri, 03 Nov 2017 06:30:17 GMT</pubDate>
            <atom:updated>2017-11-03T06:41:04.924Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQTX2vWxT9YftPY8LJ4vHg.png" /></figure><p>There’s <a href="https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines">a folk law</a> that states any headline ending in a question mark can be answered with “no”, so let’s get that out of the way up front: the answer here is “Maybe, I’m not a lawyer, but here’s what I know.”</p><p>Before we get into the nitty gritty of how to write an emoji name for human use, would it be legal? In the United States: probably. We’ve seen <a href="https://www.vogue.com/article/celebrity-baby-names-unusual-apple-blue-ivy-suri-pilot-inspektor">some weird baby names</a> here including the infamous “Apple” and <a href="https://www.dailydot.com/society/hashtag-jameson-baby-name/">the more recent baby “Hashtag”</a>. On top of that the US doesn’t have a baby name review process like some other countries, so it’s difficult to tell if anyone would take offense to attempting to name a child after a tiny pictograph like an emoji.</p><p>Now onto precedent: how are legal names that are Unicode emoji handled? So far as I could find, there’s only one company in the United States whose name is actually registered using Unicode emoji: <a href="http://diskcact.us/">💾🌵</a>, and on the topic of their name they have this to say:</p><blockquote>💾🌵 is pronounced “disk cactus.” The company is registered as U+1F4BE U+1F355, LLC. To our knowledge, we are the first company with a native emoji name.</blockquote><p>Those numbers and letters following the U+’s above denote Unicode <a href="https://en.wikipedia.org/wiki/Code_point">code points</a>, basically an alternate representation of Unicode graphemes (the basic unit of a written language, you might call it a letter). This isn’t just for emoji though, every letter you can type on a computer has a representation like this. For example the lowercase Latin letter “a” is equally represented by U+61. Likewise, in the example above U+1F4BE is the code point for 💾.</p><p><em>(Sidenote: 💾🌵 says on their website their name is on file “as U+1F4BE U+1F355, LLC”, but I believe that’s a typo, because that equates to “ 💾🍕, LLC”. The correct code point for 🌵 is U+1F335. I’ve let them know &amp; will update if they get back to me.)</em></p><p>There’s the critically important fact that you can write out a Unicode representation by hand on a birth certificate, so that’s a win. Even further though, we can surmise that—based off of what’s been done for company legal names—if you did name your child an emoji symbol it’d probably be entered on file using the code point representation. This is feasible to type on old operating systems &amp; can make it through older encoding systems (e.g. government software 🙄).</p><p>For the sake of argument, if you named a kid “🌈 Doe”, their legal name would probably be on file as “U+1F308 Doe” (e.g. on their birth certificate, Social Security card, etc.) for convenience of typing in emoji-unfriendly environments. This leads me to wonder, though, if a more common document used to verify identity or as a background check (like a driver’s license) would have to support emoji so you could perform these functions. If the emoji is properly displayed then a person could look at your ID and say “Oh this person’s name is 🌈 “Rainbow” Doe”, rather than the confusing situation of: “Oh, your name is ‘U-plus-one-F-three-zero-eight’?”</p><p>So, if <a href="https://www.vogue.com/article/celebrity-baby-names-unusual-apple-blue-ivy-suri-pilot-inspektor">Gwenyth Paltrow can name her kid “Apple”</a>, you can surely name your kid “🍎”, right? But is that pronounced “red apple” or just “apple”? And what about “🍏” or ?</p><p>The simplest way to resolve the pronunciation problem would probably be to go along with the Unicode name for these symbols. So 🌈 would be “Rainbow”, while 🍎 is exactly “Red Apple” and 🍏 is “Green Apple”.  probably wouldn’t be an accepted name because it’s in the <a href="https://en.wikipedia.org/wiki/Private_Use_Areas">Private Use Area</a> of Unicode encodings, meaning it’s not a universally supported character in the same way spoken language or emoji characters are.</p><p>This is just beginning of many potential problems of having a name that’s a single ambiguous pictograph — another big challenge to naming a person an emoji would be the <a href="http://www.npr.org/sections/thetwo-way/2016/04/12/473965971/lost-in-translation-study-finds-interpretation-of-emojis-can-vary-widely">significant communicative differences in proprietary depictions of the emoji</a>. Should an emoji name be legal, would it be ethical or cruel? What do you think?</p><ol><li>Thanks to <a href="http://www.patrickgilfether.com/">Patrick Gilfether</a>, whose Facebook post prompted this post.</li><li>So many great emojineering run downs over the years, but <a href="https://mathiasbynens.be/notes/javascript-unicode">Mathias Bynens’ Javascript emoji post</a> was an invaluable refresher for this post.</li><li>I think a lot of these are latent thoughts from <a href="https://www.youtube.com/watch?v=p7THJoRYA2c">this Vsauce video on names</a>, if you haven’t seen it, you should give it a watch!</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dc6d2ca9202" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ARctober? ]]></title>
            <link>https://medium.com/@cwervo/arctober-11da399199be?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/11da399199be</guid>
            <category><![CDATA[ar]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[augmented-reality]]></category>
            <category><![CDATA[vr]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Sun, 01 Oct 2017 18:24:14 GMT</pubDate>
            <atom:updated>2017-11-01T17:41:18.063Z</atom:updated>
            <content:encoded><![CDATA[<p>Learning how to design in 3D is hard, and learning how to do that in a medium that hasn’t existed very long is <em>even harder</em>. That’s the basically the experience I’m having with augmented reality, and I’ve been trying to think of how I can get myself to dedicate more time to solving design problems in AR — but I think I stumbled upon a pretty good plan!</p><p>You may have heard about October themed daily challenges, where you do a thing every day in October, but if you haven’t, here are a couple of examples:</p><ul><li><a href="http://inktober.com/">Inktober</a> (people draw with ink every day in October, sometimes to an “official” daily prompt from Jake Parker)</li><li><a href="https://hacktoberfest.digitalocean.com/">Hacktoberfest</a> (programmers work on open source software to try and get at least 4 contributions merged into to projects)</li></ul><p>And as I was going through those I thought to myself “hmmm, I should get back to ink work … or maybe do more open source ? WAIT I’ve been wanting to do this personal thing (web augmented reality) consistently for a while — let’s do that!” So I’m doing that! The goal is that every day in October I’m going to make an augmented reality experiment and link it at the bottom of this post with examples of the demos. <a href="https://arexp.glitch.me/">You can also find all the demos using link</a>.</p><h4>Some notes on the process</h4><ul><li>I’m not using prompts for each day because I have a back catalog of ideas I’ve been writing down for like 2 months about potential interesting designs and interactions in AR — so I’ll be trying out versions of those!</li><li>Some days I’m going to be super busy, and on those days I’ll probably just model something or throw a vaguely interesting animation piece together and call it a day. ¯\_(ツ)_/¯</li><li>When I have time <em>though</em>, I’m going to try and consider design &amp; interaction challenges. I have quite a few in my notes to try out, but leave a comment or message me on <a href="https://twitter.com/acwervo">Twitter</a> or something if you have ideas about interactions/AR things you’d like to see!</li><li><strong><em>Tools!</em></strong> For those of you that care, I’ll be using <a href="https://aframe.io/">A-Frame</a>, <a href="https://github.com/jeromeetienne/AR.js">AR.js</a>, and hosting all of these on <a href="http://glitch.com/">Glitch.com</a> so that you can easily inspect or remix the code! WebAR is v new and I’m trying to make it easy to share what I learn.</li></ul><p><strong>Day 1</strong>: <a href="https://arexp.glitch.me/torus-knot/">Here we have</a> a torus-knot looping between furled &amp; unfurled. This is actually an animation I made for a series of 3D loading icons, but I think it makes a fun first post!</p><h3>Andres Cuervo 🌹🌵📀 on Twitter</h3><p>My first experiment for ARctober ! An @aframevr + AR.js unfolding torus-knot! ✨ https://t.co/7QVckAjdpX ✨ https://t.co/2XSXGpZlYV</p><p><strong>Day 2</strong>: <a href="https://arexp.glitch.me/wiggle-shader/">October 2nd’s AR piece</a> is a remix of a simple noise shader I originally found in <a href="https://aframe.io/docs/0.7.0/components/material.html#example-%E2%80%94-glsl-and-shaders">A-Frame docs</a>. I threw in some color and made it so that a tap or click changes a variable in the shader. AR’s fun on its own, but I think the really interesting bits emerge when we start to use interaction — so a click or tap like in today’s experiment is the basic building block to making a full-fledged AR app ~experience~ on the web!</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>Day 2 of #ARctober - a shader that changes when you tap the screen! https://t.co/77YVhNONzz https://t.co/0fzLTcW2xR</p><p><strong>Day 3</strong>: <a href="https://twitter.com/acwervo/status/915242682582155264">The third piece</a> utilizes <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API">the experimental Web Speech API</a> to speak a word randomly generated using <a href="https://github.com/dhowe/RiTaJS">RiTa JS</a>. The pitch &amp; voice are determined using the syllable count of the generated word. If speech isn’t available on the user’s browser, the speech checkbox is grayed out and a little (Unavailable) message appears.</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober experiment generates a random word and says it back to you, with variable pitch &amp;amp; voice! 🗣 https://t.co/YzrgZjICMZ 🗣 https://t.co/kuELidyo5x</p><ul><li><strong>Day 4:</strong> <a href="https://arexp.glitch.me/planets">This fourth experiment is all about planets! 🌏🌍🌎</a> I was inspired by <a href="http://www.vendian.org/mncharity/dir3/planet_globes/">this wonderful collection of space globe textures</a>, which pointed me to <a href="http://maps.jpl.nasa.gov/">NASA’s database of solar system maps</a>, which I ended up using for all the textures in the demo. Additionally, this is my first proper UI experimentation in AR — it has a slider at the bottom of the screen (out of the way, convenient for mobile users) that shifts the position of the planets, effectively acting as an AR scroll mechanism!</li></ul><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober is a real UI experiment - a line of planets w/ a slider! I even found a Pluto texture 💫 🌔🌓🌒 https://t.co/s5ktTab01x 🌑🌎🌍🌏 https://t.co/kvILpa8zrh</p><p><strong>Day 5:</strong> <a href="https://twitter.com/acwervo/status/915994427528642560">This tetrahedral animation experiment</a> was inspired by <a href="https://twitter.com/beesandbombs/status/907343249446240256">this GIF from Bees &amp; Bombs</a>. It’s interesting that you get such nice fluid motion from a series of staggereddelays!</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>I got inspired by @beesandbombs yesterday &amp;amp; I made this tetrahedron experiment for #ARctober today! https://t.co/KsbGm9z05a https://t.co/bTJy0QpCXC</p><p><strong>Day 6:</strong> <a href="https://arexp.glitch.me/pinch-scale/">This interaction experiment</a> takes day two’s spiky shader sphere &amp; adds some interaction — namely, if you drag your mouse on the screen or drag a finger across a touch screen, we read in the delta of the x position and scale the sphere up or down (with some clamping between 0.1 and 6). This sort of interaction makes phone-based AR more interesting I think, and I hope to incorporate it more in my future work!</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>For my first #ARctober in Cambridge here&#39;s a rehash of day 2 - this time, with some interaction!! :) https://t.co/4znWwzJyir https://t.co/yQWyC39efU</p><p><strong>Day 7:</strong> <a href="https://twitter.com/acwervo/status/916628100879978496">Today’s outline experiment</a> was inspired by <a href="https://stemkoski.github.io/Three.js/Outline.html">Professor Lee Stemkoski’s Three.js outline</a> demo, in which he basically does the same thing I do here (sans animation): clone an object, give it some slightly larger size (e.g. 1.01) and set its rendering faces to `Three.BackSide . You can see the source for this little outline component by <a href="https://glitch.com/~arexp">remixing this glitch</a> or <a href="https://gist.github.com/AndresCuervo/7669c10232a8aa6035ec71d9e91346a0">take a look at this gist</a> — &lt; 20 lines!</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>ARctober day 7: outline geometry! Inspired by @ProfStemkoski&#39;s Three.js outline demo✨ Try it out at: https://t.co/lBssyb7bco https://t.co/4PBRkZjSah</p><p><strong>Day 8:</strong> <a href="http://horiken.org/">This combo experiment</a> combines the torus animation from day 1 and the shader from day 2’s demo.</p><h3>c w e r v o 🌹🌵🎃 on Twitter</h3><p>ARctober day 8: an animated torus knot with a shader attached! Clicking on the screen changes animation amplitude! https://t.co/GbGzUogG3c https://t.co/oer8ngpTkW</p><p><strong>Day 9: </strong><a href="https://twitter.com/acwervo/status/917387533146820608">This puppy-filled GIF experiment</a> combined a couple interesting things I’ve been toying around with for a while:</p><ol><li><em>Multiple discrete markers.</em> While it’s difficult to tell from the video below, there are two markers above that are traditional standards from <a href="https://artoolkit.org/">ARtoolkit</a>: the <a href="https://cdn.glitch.com/1a6977ed-1215-4fb9-b040-5862a9786b35%2FHIRO.jpg?1506845340744">Hiro marker</a> (which I’ve been using every day so far) and the <a href="https://cdn.glitch.com/1a6977ed-1215-4fb9-b040-5862a9786b35%2Fkanji-marker.png?1507486751836">Kanji marker</a>. I simply made two a-anchors with those presets and added the same <a href="https://github.com/ngokevin/kframe/tree/master/components/template">template</a> to each anchor. In the future I hope to make my own markers and try out even more complex multi-marker scenes.</li><li><em>Marker resizing.</em> The video below demonstrates a concept I’ve had for a while: displaying markers digitally can be frustrating (usually because of screen glare) but it does mean you can resize the marker at will (as opposed to the more traditional printed ones). This is applicable to all of my AR.js demos, I just haven’t been demonstrating it — maybe in the future I can actually calculate the size of the marker on screen and use its relative size to affect a shader or model property in the generated scene!</li></ol><h3>CWERVO🌹🌵🎃@MIT HAK on Twitter</h3><p>Day 9 #ARctober is a ring of puppy GIFs. &amp;amp; last day of #Realityvirtuallyhack ! 😮 Marker resizing is v fun! https://t.co/YEx2yOUF8w https://t.co/M4GgLjfLpH</p><p>Day 10: I was so inspired by day 9’s GIF experiment that <a href="https://arexp.glitch.me/hiro-gif/">day 10’s demo is another GIF experiment</a> — although this time it’s playing around with the marker animating. I tried for a bit to get this to line up to the marker on screen, but trying to align the scene isn’t the solution — I think the proper solution is to call Three.js/A-Frame using the screen space coordinates returned from AR.js, which I’ve noted down to try out later!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>ARctober day 10 is just me messing around with GIFs - comparing the floating market makes it really apparent that there&#39;s a weird offset 🤔🤔 https://t.co/Mreqlgobwy</p><p><strong>Day 11:</strong> <a href="https://twitter.com/acwervo/status/918078570873933824">This is a modern recreation of one of the earliest forms on animation: a zoetrope!</a> I wrote a little component to actually change the circularly-laid planes in this scene frame by frame very quickly, similarly to the effect caused by the drum of a zoetrope turning very fast. I also <a href="http://caff.glitch.me/horse-in-motion/">prototyped this one in VR</a>, which is a pretty good workflow (easier to test, fast to iterate on when dealing with complicated animations).The animation is <a href="http://www.tate.org.uk/whats-on/tate-britain/exhibition/eadweard-muybridge/exhibition-guide/horse-motion">Horse In Motion</a>.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>An #ARctober zoetrope! Horse In Motion, an early animation, moving frame by frame in a circle 💫✨ Try it @glitch: https://t.co/miX2Zx2dsL https://t.co/TAiQ8VFrNp</p><p><strong>Day 12: </strong><a href="https://arexp.glitch.me/pirouette-test">An animated pirouette made of spheres!</a> This one is using motion capture data from <a href="http://mocap.cs.cmu.edu/">the CMU Graphics Lab Motion Capture Database</a> and the smaller skeleton is the helper from <a href="https://threejs.org/docs/#api/helpers/SkeletonHelper">the THREE.js SkeletonHelper</a>, while the blue spheres are my own simple recreation.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Used the CMU mocap set for today&#39;s #ARctober experiment. Going to try the strokes thing soon!! https://t.co/hVJSpA2h0y https://t.co/IRiWlC6mct</p><p><strong>Day 13: </strong><a href="https://arexp.glitch.me/pointcloud-kinect">Playing around with Kinect point cloud data!</a> I revisited an <a href="https://vr.cwervo.com/scenes/point-cloud/">A-Frame point cloud experiment</a> I did earlier this year with my friend <a href="https://arexp.glitch.me/sagejenson.com">Sage Jenson</a> for this experiment — as you might be able to tell from the video below, I was trying to push the limits in terms of geometry and scene-size for marker-based AR with this one.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>For today&#39;s #ARctober I revisited some Kinect point cloud data from my friend https://t.co/PWoBXVjVR8 🌥✨ https://t.co/czDczUfR11 https://t.co/z5dzk8NlBZ</p><p><strong>Day 14: </strong><a href="https://arexp.glitch.me/10print/">This colorful scene</a> is randomly generating boxes made to look like slashed, and the underlying algorithm is inspired by <a href="http://10print.org/">the 10PRINT algorithm</a>.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>A #10print in @aframevr for today&#39;s #ARctober All have 0.5 opacity so the colors mix as levels go up Try it out at: https://t.co/aCJJCKHQMU https://t.co/M0xm7SgWIH</p><p><strong>Day 15:</strong> <a href="https://arexp.glitch.me/10print-blue-sky/">This monochromatic tubular experiment</a> is just me playing around with variables (color from rainbow to blue lightness gradient, shape from boxes to cylinders) from day 14’s 10PRINT experiment. I have some more ideas for simple generative experiments that I think would be interested to translate into AR, and plan on working on those this week!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Pretty tired, so today&#39;s #ARctober is a variation on yesterday&#39;s #10PRINT!Blue cylinders :) https://t.co/diBIrp8DQX</p><p><strong>Day 16:</strong> <a href="https://arexp.glitch.me/10print-toruses/">This generative piece alters the color and radius of tori as they tile above the marker</a>, but I took the slider from my day 4 planets demo and make it a bit interactive by allowing you to change the spawn rate of the tori.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Generative algorithms are more fun when you get to control a probability variable! Here&#39;s some random tori appearing for #ARctober :) https://t.co/kVJAzrupqt</p><p><strong>Day 17:</strong> <a href="https://arexp.glitch.me/random-organs/">This weird imaginary organ scene</a> simply cycles through some of <a href="https://www.instagram.com/explore/tags/presstubekitbash/">Presstube’s imaginary organs</a>. Simple interaction: get a different organ on-click! Will probably revisit this one to solve some loading issues b/c the organ files are pretty large.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober is some @presstube organs beating in midair 💖 try it out at: https://t.co/ojJLqhoVTu https://t.co/fd49HMKH6T</p><p><strong>Day 18:</strong> <a href="https://arexp.glitch.me/listen-to-your-gut/">A hand-drawn experiment!</a> This was a collaboration with <a href="https://www.instagram.com/niels_sinke/">Niels Sinke</a>, and I hope the start of a few experiments attempting to combine AR &amp; hand-drawn illustrations!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>I&#39;m super excited about today&#39;s #ARctober #webAR experiment! A layered version of an illustration by Niels Sinke! I love hand drawn AR :) https://t.co/IwjqajXmId</p><p><strong>Day 19: </strong><a href="https://arexp.glitch.me/spinning-arcs/">Some arcs spinning around!</a> This one is more of a fun little animation experiment, just a few pngs of arcs I made in Illustrator layered over each other with some delayed animation.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober experiment is a few arcs spinning together, just a fun animation experiment! 🌀 Try it out at: https://t.co/fHFeaYPGLe https://t.co/UqMxTGrqDu</p><p><strong>Day 20: </strong><a href="https://arexp.glitch.me/transhumanism1/">This animation/art piece</a> was a collaboration with the artist <a href="https://www.instagram.com/trauma_doll/">Trauma Doll</a>.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>An #ARctober collab w/ the artist Trauma Doll https://t.co/tD7khBD6F8</p><p><strong>Day 21:</strong> <a href="https://arexp.glitch.me/gradients_test/">A few layers of gradients!</a> I made these gradients using only the selection and gradient tools in Photoshop, and noticed they play around nicely with each other, so I threw them into AR and animated their opacity!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Messed around with these little gradients for today&#39;s #ARctober experiment! https://t.co/QpHRlboKOd https://t.co/9QCdjASRCa</p><p><strong>Day 22:</strong> <a href="https://arexp.glitch.me/face-gif-surprise/">A prototype for a comic idea!</a> I’m interested in the idea of a comics that not only change visually in augmented reality, but narratively as well — a sort of x-ray super power on the fabric of a narrative. This is my first prototype towards that idea: a skull GIF whose marker superimposes the face that used to be on the now-haunted skull.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober experiment is a prototype for some AR comic ideas I have! A spooky skull boy for ya: https://t.co/VOt9XK5SeD https://t.co/UeQFenBZaL</p><p><strong>Day 23:</strong> <a href="https://arexp.glitch.me/3dio-furniture/">Some wacky AR furniture!</a> This one isn’t too heavy on interaction (tap or click to get back a random piece from a pre-populated list of IDs), but I wanted an excuse to mess around with <a href="https://furniture.3d.io/">Archilogic’s furniture.3d.io API</a>, a collection of 3D scanned furniture! This is partially exciting because it points to the web (once it has access to <a href="https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping">SLAM</a>) being able to facilitate use cases like <a href="https://www.theverge.com/2017/9/20/16339006/apple-ios-11-arkit-ikea-place-ar-app">IKEA’s home furnishing app</a>.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Today&#39;s #ARctober experiment goes through a few of my favorite @Archilogic3D furniture pieces! Try it out at: https://t.co/EqdoaGIbrA https://t.co/B3EoKopZU7</p><p><strong>Day 24: </strong><a href="https://arexp.glitch.me/transhumanism2">A “holographic” artwork/meme/collage</a>. This is another collaboration with <a href="https://www.instagram.com/trauma_doll/">Trauma Doll</a>, this time using randomly generated animation, more layers, and slight opacity to get the layers to appear through each other, creating a more interesting effect that interacts with the surrounding environment.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>One more art meme collage #ARctober collaboration with Trauma Doll! I really like the holes in this one @glitch at: https://t.co/ZFB3fq7bqj https://t.co/lkJHPgQroh</p><p><strong>Day 25:</strong> <a href="https://arexp.glitch.me/welcome-to-my-web-page">More GIFS, this time from the 90&#39;s!</a> I took a few GIFs from searchingthe Internet Archive’s <a href="https://gifcities.org/">Gif Cities</a> project to make an AR experience that I think qualifies as an interesting toy — it adds more GIFs each time you click/tap &amp; they get closer to you the more there are!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>A collection of early internet GIFs from the @internetarchive in #AR for today&#39;s #ARctober experiment! https://t.co/SGPjF27bsB https://t.co/ufuxifWsUZ</p><p><strong>Day 26:</strong> <a href="https://arexp.glitch.me/paper-airplane">A paper airplane experiment!</a> This is a rather involved animation: my hand-drawn illustration (the paper airplane, which is a geometric plane with the illustration showing on both sides) moving <a href="https://github.com/protyze/aframe-alongpath-component">along a path</a> as if it’s floating on a funny air current. There’s also a dashed line in the mix, meant to be reminiscent of a doodle of a paper airplane—that was made using equally spaced A-Frame a-boxes along the path. V happy with how this one came out!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>A little hand drawn #ARctober paper airplane in the palm of my hand! Most toy-like thing I&#39;ve created yet w/o being interactive :) https://t.co/6jb9ZZuQ4C</p><p><strong>Day 27:</strong> <a href="https://arexp.glitch.me/stranger-things">A Stranger Things inspired scene!</a> While appropriate for today (October 27, 2017 — the premiere of season 2 of the show) this scene also shows of the use of red lighting to achieve a similar effect as in the title screen, as well as dramatic lights by the rotating waffles — so I actually got to play around with some new techniques!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>A special @Stranger_Things themed #ARctober experiment! Was inspired by their webVR timer 😄 You can try it out at: https://t.co/PDjJqgl76A https://t.co/qRBeEKRwpr</p><p><strong>Day 28:</strong> <a href="https://arexp.glitch.me/transhumanism-faces/">One more collaboration </a>with the artist <a href="https://www.instagram.com/trauma_doll/">Trauma Doll</a>!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Forgot to post yesterday&#39;s #ARctober - another collaboration with Trauma Doll! V spooky faces https://t.co/05npD5U9U0 https://t.co/IAiYdgIkmS</p><p><strong>Day 29:</strong> <a href="https://arexp.glitch.me/happy-birthday/">A birthday-themed experiment!</a> This one generates a balloon with a different color &amp; then sends it floating along a path, a relatively complicated animation that was simple to achieve with a few components like <a href="https://github.com/protyze/aframe-alongpath-component">aframe-alongpath</a> &amp; <a href="https://github.com/ngokevin/kframe/tree/master/components/animation/">Kevin’s animation component</a>!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>An #ARctober balloon experiment! Planning on making an AR birthday card soon! https://t.co/MtuRk5KQIt https://t.co/aS58PHNHHN</p><p><strong>Day 30:</strong> <a href="https://arexp.glitch.me/fun-with-lines">A generative line sculpture!</a> There are lines generated on some <a href="https://github.com/protyze/aframe-curve-component">Catmull–Rom splines</a> defined by a set points, starting with 3 points. Every couple of seconds a point gets added, while every 4 seconds a point gets deleted. Red &amp; blue lights along with rotation complete the AR kinematic sculpture.</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>I made an #ARctober generative sculpture! Every 2s: add a point, every 4s: delete a point! Red &amp;amp; blue lights ✨ https://t.co/Zp8piSsxjV https://t.co/9U6SIlaOvv</p><p><strong>Day 31:</strong> <a href="https://arexp.glitch.me/%F0%9F%8E%83/">The final ARctober experiment: a 🎃 jack-o-lantern with a floating candle inside!</a> This was the last experiment of #ARctober 2017, I hope you’ll join me next year if you’re interested or suggest ideas &amp; feedback!</p><h3>CWERVO🌹🌵🎃 on Twitter</h3><p>Made my highest fidelity #AR demo so far! A pumpkin w/ a light floating around🎃👻 &amp;amp; that&#39;s a wrap on #ARctober! https://t.co/7aEWqa8LNG🎃/ https://t.co/OKyb9bQQTE</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11da399199be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turning a screenshot into a Facebook 360° Image]]></title>
            <link>https://medium.com/@cwervo/turning-a-screenshot-into-a-facebook-360-image-6e37919f6525?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e37919f6525</guid>
            <category><![CDATA[a-frame]]></category>
            <category><![CDATA[360-photo]]></category>
            <category><![CDATA[360]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[virtual-reality]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Fri, 21 Jul 2017 18:30:37 GMT</pubDate>
            <atom:updated>2017-07-21T18:30:37.213Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a short post showing how you can turn any equirectangular photo into a 360° image on Facebook that displays like this:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fd3yw7Bj7XOlQEgi4%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fd3yw7Bj7XOlQEgi4%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fd3yw7Bj7XOlQEgi4%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="429" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b73fe52093730d0555cae28132553ee/href">https://medium.com/media/9b73fe52093730d0555cae28132553ee/href</a></iframe><p>You could use a photo like this <a href="https://en.wikipedia.org/wiki/Equirectangular_projection#/media/File:Equirectangular_projection_SW.jpg">plate carrée projection</a>, but I’ll get my photo as a 360° screenshot from an <a href="http://aframe.io/">A-Frame</a> scene <a href="https://vr.cwervo.com/scenes/point-cloud/">like this one</a> for this tutorial.</p><p>There are really only a few steps involved:</p><p>1 While you’re viewing <a href="https://vr.cwervo.com/scenes/point-cloud/">an A-Frame scene</a> take a 360° (e.g. equirectangular) screenshot by pressing <strong>&lt;ctrl&gt; + &lt;alt&gt; + &lt;shift&gt; + s</strong>. That should give you an image like below in your computer’s “Downloads” folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJKpO53eeQbjnMox8aECbQ.jpeg" /><figcaption>Example 360° image, not yet displayed as a 360° photo though!</figcaption></figure><p>2 Right now, we just have a normal 2D image, and Facebook would treat it as such if we were to upload it — we need to edit the metadata of the image to specify that we have a 360° image.</p><p>Facebook seems to only read JPGs for 360° exif data, so I convert the A-Frame screenshot (saved as a PNG initially) into a JPG before injecting my metadata, although if I’m wrong feel free to let me know!</p><p>If you don’t want to use a scripting tool, I’d recommend <a href="https://www.thexifer.net/">https://www.thexifer.net/</a>, a website that you can use to upload and edit exif data. Really all you need is to set “ProjectionType” to “equirectangular”.</p><p>I use <a href="https://sno.phy.queensu.ca/~phil/exiftool/">exiftool</a> to run the following command:</p><pre>exiftool -ProjectionType=”equirectangular” photo.jpg</pre><p>And that’s all you need to Facebook to recognize this as a 360° image!</p><p>3 Once you have your exif injected photo, you should be able to just upload it to Facebook like any other photo and once it processes, you’ll have something like this:</p><p><a href="https://www.facebook.com/photo.php?fbid=1729430273738498&amp;set=a.343377975677075.98057.100000146252251&amp;type=3&amp;theater">Andres Cuervo</a></p><h4>Final notes:</h4><ul><li>Facebook published <a href="https://facebook360.fb.com/editing-360-photos-injecting-metadata/">a more in-depth breakdown of how to specify 360 metadata</a> including specifying field of view and image dimensions for proper display.</li><li>Screenshots are outlined in more detail <a href="https://aframe.io/blog/screenshot/">on the A-Frame blog</a>, if you’re curious.</li><li>It won’t affect many scenes you’ll find, but it’s worth noting the screenshot shortcut technique shown here only works for A-Frame 0.4.0 and above: <a href="https://aframe.io/blog/aframe-v0.4.0/">https://aframe.io/blog/aframe-v0.4.0/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e37919f6525" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook’s Colored Background’s Have Poor Contrast ]]></title>
            <link>https://medium.com/@cwervo/facebooks-colored-background-s-have-poor-contrast-837fd7614857?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/837fd7614857</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Wed, 22 Feb 2017 05:42:07 GMT</pubDate>
            <atom:updated>2017-02-22T15:48:14.166Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a short post because <a href="https://medium.com/@acuervo/the-scariest-thing-this-halloween-was-facebooks-color-accessibility-67ee971496d6#.fbcywk7j8">I’ve critiqued Facebook’s color accessibility before</a>, but here’s a chart of how each of the colors in Facebook’s colored background posts rate for contrast with white, the color they’re displayed against. Each “Naw” means the color contrasts don’t even register as minimally accessible according the <a href="https://www.w3.org/WAI/intro/wcag.php">Web Content Accessibility Guidelines</a>. This means, for large text (which is what we’ll consider these Facebook posts to be), only half of these color pairings are accessible to those with contrast issues. It’s worth noting a lot of these colors are also potential triggers for <a href="http://accessibility.psu.edu/color/brightcolors/">color vibration</a>, so this isn’t just a single-dimension issue — accessible design is rarely about a single flaw, but rather a failed design process, that can miss a lot of other potential issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*8Cx0uwQFXoDkeiOE_jcbZQ.png" /></figure><p>If you’re interested, here’s the little process that went into making this post:</p><h3>Find out the color!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f-pnq1K9Z-xgArnd-ZXRJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUt-bvYH4uWSXKS1u8W7OA.png" /></figure><p>This part was easy, just flip through the potential post backgrounds, and use the inspector to grab the CSS rules defining the post’s background color. Some of these are gradients, so I just took the start and stop colors of each gradient as a proxy (since sufficiently long text will overlap with the stop colors).</p><h3>Convert to hex</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2JqclIzXFE01gCjEXIy-mw.png" /><figcaption>(image from <a href="http://www.color-hex.com/color/5f6673">color-hex.com</a>)</figcaption></figure><p><a href="http://color-hex.com/">Color-hex.com</a> was a great resource, as it allowed me to just copy/past the rgba() snippets from the Facebook DOM and grab the hex code for it.</p><h3>Last step, actually test contrast!</h3><p>So, I generated the image at the top of the post using <a href="https://hexnaw.com/">Hex Naw</a> which is a great tool made by <a href="https://twitter.com/wearethescenery?lang=en">The Scenery</a> to check color accessibility combinations for colors expressed as hex codes. There are dozens, if not hundreds of great tools out there for this, this one just happens to be my favorite!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=837fd7614857" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Scariest Thing This Halloween was Facebook’s Color Accessibility]]></title>
            <link>https://medium.com/@cwervo/the-scariest-thing-this-halloween-was-facebooks-color-accessibility-67ee971496d6?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/67ee971496d6</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[web-accessibility]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Thu, 03 Nov 2016 05:41:40 GMT</pubDate>
            <atom:updated>2016-11-03T05:41:40.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oLbgs7X9neLiNWw6WRt3g.png" /></figure><p>I was looking at the rather cute Halloween themed Facebook reactions when I noticed the text of the label accompanying the reaction changed color with it. This is standard practice for Facebook, sure, but I wondered how the accessibility of the Halloween colors faired according to web accessibility guidelines (oh, and we’ll get back to the non-Halloween-y default colors in a bit 👻).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*idlzQlVREZm1FSEmZqu4tQ.png" /><figcaption>Example of a Facebook “Like” label taking on the signature Facebook blue color.</figcaption></figure><p>I’ve <a href="https://medium.com/@acuervo/consider-offboarding-letting-users-leave-in-peace-cdd02501d35f#.hawm6ox1k">critiqued Facebook design before</a>, and I’ll probably keep doing so, but only because when your platform has <a href="http://newsroom.fb.com/company-info/">1.8 billion daily active users</a>, there are no acceptable edge cases; affecting even 1% of users just isn’t good enough at this scale (1% happens to be 18,000,000 people for Facebook, by the way). So, what does “good enough” mean when we’re looking at text color? For this post, I’ll be using the World Wide Web Consortium’s definition of accessible contrast:</p><blockquote>“The visual presentation of text and images of text has a contrast ratio of at least 4.5:1”— <a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html">WCAG 2.0 Guidelines</a></blockquote><p>It’s also worth noting that I’m not considering these labels as “part of an inactive <a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html#user-interface-componentdef">user interface component</a>” as they aren’t there for control but rather for identifying what action you’ve taken if you can’t see/interpret/or recognize the emotion visually (e.g. this is text that should be accessible!)</p><p>So, what do we see for the Halloween colors? Let’s go left to right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*RnwA9lssJeo8BN6iEgspcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPTgzvMG6vdxFccBFuGs2A.png" /><figcaption>Color test for the Halloween “Haha” reaction</figcaption></figure><p>So this witchy “Haha” reaction is actually a really promising start! It passes solidly with a 4.62 contrast ratio, meaning it’s a-okay for display at both large and small sizes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgkPORogpQq8D043kJQo6Q.png" /><figcaption>Color test for the Halloween “Wow” reaction</figcaption></figure><p>Being essentially a light gray on a pure white background, this label had by far the lowest contrast rating of any of the reactions, at 1.43. Actually, I think this is the lowest contrast ratio I’ve even seen in production! This one doesn’t even come close to the accessibility guidelines. Spooky indeed …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oos-_n527IhqqA-2gtpZOA.png" /><figcaption>Color test for the Halloween “Sad” reaction</figcaption></figure><p>Coming in at 1.81 Frankenstein’s monster is probably really sad that the associated label still comes in <em>under</em> half the minimum contrast ratio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jsv6Lph8qS2dYlrmGC3uQ.png" /><figcaption>Color test for the Halloween “Angry” reaction</figcaption></figure><p>Last but not least (accessible) in the Halloween reactions is the angry Jack-o-lantern. With a label contrast of 2.48, it’s better than the previous 2 but still doesn’t meet even the large text contrast display requirements. Yeah, I’d be angry too.</p><h4>Bonus! The Default Colors Are Inaccessible Too</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*Fb9Tl-FdgwI9bOdefCI9Uw.png" /></figure><p>So, after writing this post initially I decided to test the default Facebook reaction labels. Despite there being 6 emotions, 3 of the labels share a yellow color, so there are only four colors here, how bad could it be?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hH6XF0pEoY0h4_CUKC-heg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wx0WvI2QR-P4GFqZw8uNkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biuOdaJO6LrPTQ4ZrEOPlg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HwYZVRcYnIPF2eQeRIioHQ.png" /><figcaption><strong>From right to left, top to bottom: the “Like” label test, “Love” label test, “Haha” “Wow” &amp; “Sad” label test, and the “Angry” label test.</strong></figcaption></figure><p>Pretty bad. Of the four colors, two flat out fail at both large and small text sizes. The “Like” and “Love” labels only pass at the large text size, which these labels are presumably never displayed at, meaning none of the default labels pass the contrast ratio test for their intended display size.</p><p>While this seems like a trivial issue to those with good eyesight, for those who have contrast issues or visual impairments of any type, and especially for those who need help discerning emotional reactions, this inattention to accessibility is limiting at best, and can lead to confusion and frustration at worst.</p><p>(Shoutout to <a href="https://thescenery.co/">The Scenery</a> for their color checking tool <a href="https://hexnaw.com/">Hex Naw</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67ee971496d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Back To The Top]]></title>
            <link>https://medium.com/@cwervo/back-to-the-top-e2ff2950c330?source=rss-3e005eef7c04------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2ff2950c330</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[product-design]]></category>
            <dc:creator><![CDATA[Andrés Cuervo]]></dc:creator>
            <pubDate>Sat, 16 Apr 2016 02:29:59 GMT</pubDate>
            <atom:updated>2016-04-16T02:29:59.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7BmxeJpeVWJWF3a2xckRQ.png" /></figure><h3>Background</h3><p>I was reading about <a href="https://medium.com/buzzfeed-design/buzzfeed-product-design-roles-2-0-6fe445078a74#.beou597qw">Buzzfeed’s product design roles (2.0 !)</a>, and I noticed something about <a href="https://docs.google.com/document/d/1V8HHMXe2LIj4V6SfnxXm-3FCDkZP0U7lLt9dvtjNrHk/edit#heading=h.kthodoi1iyku">their Google doc</a> outlining their product roles: it has document links in the table of contents (really useful!), but if you’re in the middle of the document you have two familiar but slightly unflattering options to get back to the top of the document (that is, back to the table of contents): scroll back up, or slightly faster, drag the scroll bar back to the top. Sure, these methods are usable, but — as most UX designers know — the native solution, while sometimes the right solution, isn’t always the most <em>convenient</em> option. I think about accessibility and great UX as having interfaces that express convenient options, so why not borrow the convenient solution we’ve been using on long, scrolling websites for years: a “Back to the top” button! I remembered I actually implemented this design in a real project report I made at the beginning of this year, in <a href="https://docs.google.com/document/d/13mj8umUwaYYfvePanDon3iiOFJKNLjjAE9AnSQhkqJQ/edit#heading=h.2r1dtf6pmh11">a UX audit report</a> for the national Bonner foundation’s internal documentation system. If you’re curious, here’s how I did it. <em>If you’re not interested in the steps, head to the bottom of this document — I talk about the actual UX of this practice.</em></p><h3>How To Add A “← Back To Top” Button In Your Document</h3><p><em>Note: This is assuming Google Docs, but you can do this in any document type that supports in-document links.</em></p><h3>Step One</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*rVR4eZAs69zAAZzENRy_VA.gif" /></figure><h3>Step Two</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*n7mihKJHjaYwH86PcU_xDQ.gif" /></figure><h3>Step Three</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Y1wFu3LdvxpnQSdNckHLow.gif" /></figure><p>And really, that’s it! It allows you to locate your place within the document pretty easily:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*rVR4eZAs69zAAZzENRy_VA.gif" /></figure><h3>The Actual Usability Of This</h3><p>So, why did I put it at the top? Well, my intuition tells me that you’re most often scanning a document and reading from the top of any given page when you’re reading, so it’d be easier to realize you’re at the wrong section, or actually need to look at a different section, when at or near the top of the page. I haven’t run any usability studies on this, and haven’t bothered to look into the research because I’m comfortable with using this as an anecdotal design decision as it doesn’t affect actual users, but rather those navigating documentation, who already have a few options to navigate documents. What’s that? You don’t know what other ways there are to navigate a Google Doc? Well, read on! (I promise, if you’ve read this far, you’re almost done!)</p><h3>One Last Thing — Document Outline</h3><p>While it’s still a little buggy, I’m really happy that there’s another native option in Google Docs now to add a document outline. It automatically detects its headers, and the detecting and formatting titles, especially those with line breaks, can still bug out the tool, but it’s proving convenient nonetheless, especially for a long document like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*A-1alNJxFKO2AqxqHQKpFg.gif" /></figure><p>Note: this doesn’t remove the usability of the “← Back to table of contents.” button. For one, the outline tool may fail/change/not be right for the styling or organization of your document. Likewise, scrolling and the document outline tool aren’t necessarily accessible, and adding a “button” like this in the header doesn’t seem to clutter the actual interface, so why not add the option?</p><p>Hope all your documents are a little more usable from now on!</p><p>— Andres Cuervo</p><p><em>Originally published at </em><a href="http://cwervo.com/thoughts/2016/04/google-doc-navigation-tips.html"><em>cwervo.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2ff2950c330" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>