<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: albert</title>
    <description>The latest articles on DEV Community by albert (@albertcai101).</description>
    <link>https://dev.to/albertcai101</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2062384%2Fd31aed59-589b-476b-80bc-cfd76ff78c72.png</url>
      <title>DEV Community: albert</title>
      <link>https://dev.to/albertcai101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/albertcai101"/>
    <language>en</language>
    <item>
      <title>How to Preview Rive Files Online</title>
      <dc:creator>albert</dc:creator>
      <pubDate>Thu, 12 Sep 2024 17:46:57 +0000</pubDate>
      <link>https://dev.to/albertcai101/how-to-preview-rive-files-online-3c3b</link>
      <guid>https://dev.to/albertcai101/how-to-preview-rive-files-online-3c3b</guid>
      <description>&lt;p&gt;For apps and website development teams that use Rive, previewing .riv files, especially those with state machines, can be a challenge. Rive's web preview lacks support for testing state machines, making it hard for developers to interact with triggers, transitions, and complex animations in the browser.&lt;/p&gt;

&lt;p&gt;For this reason, &lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;rive.rip&lt;/a&gt; was created. It’s a web-based tool that allows developers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload .riv files and preview both animations and state machine inputs.&lt;/li&gt;
&lt;li&gt;Interact with state machines in real time by triggering transitions and behaviors directly in the browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With rive.rip, developers don't need to rely on the desktop app or constant communication with designers. It simplifies testing and accelerates the integration of animated assets into apps and websites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1fo77islcipqa6itn7f.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1fo77islcipqa6itn7f.gif" alt="First demo" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage Tutorial
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjvs7o5u9i8qyivh0ces.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjvs7o5u9i8qyivh0ces.gif" alt="Rive.rip upload, animations, and state machine demo" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Upload your .riv file&lt;/strong&gt;&lt;br&gt;
Visit &lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;rive.rip&lt;/a&gt; and drag-and-drop your .riv file into the interface or click the Upload button to browse your local files. Once uploaded, the animations and state machine inputs will be automatically loaded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Explore the state machine inputs&lt;/strong&gt;&lt;br&gt;
After uploading your file, you'll see a detailed breakdown of both the individual animations and &lt;em&gt;state machine inputs&lt;/em&gt;, including triggers, booleans, and numbers. These inputs allow you to interact with the state machine directly in the browser. Experiment with different input values to trigger transitions and test behaviors in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Test animations and transitions&lt;/strong&gt;&lt;br&gt;
Use the real-time preview to play through animations and observe transitions based on the state machine logic. You can easily fire triggers or toggle boolean values to see how the animations react.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17iik79wwp9z56h5b973.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17iik79wwp9z56h5b973.gif" alt="Rive.rip layout, fit, and alignment demo" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Adjust layout with fit and alignment options&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;Rive.rip&lt;/a&gt; also gives you control over the visual layout of your animation. You can play with the fit (e.g., fill, contain, cover, etc.) and alignment (e.g., center, top-left, bottom-right) options to see how the animation fits into different spaces. This is especially useful when considering how your animations will appear in your app or website’s UI.&lt;/p&gt;

&lt;p&gt;Try it out for yourself at &lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;rive.rip&lt;/a&gt;! If you find this website, consider giving a star of its &lt;a href="https://github.com/albertcai101/rive-rip" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>rive</category>
      <category>animation</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Solving Developer-Designer Friction in Rive Animations with Rive.rip</title>
      <dc:creator>albert</dc:creator>
      <pubDate>Thu, 12 Sep 2024 10:15:00 +0000</pubDate>
      <link>https://dev.to/albertcai101/solving-developer-designer-friction-in-rive-animations-with-riverip-5hc</link>
      <guid>https://dev.to/albertcai101/solving-developer-designer-friction-in-rive-animations-with-riverip-5hc</guid>
      <description>&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;At Spellr, a digital tutor for kids learning reading and writing, we needed a tool to streamline communication between our designers and developers when using Rive's animation platform, especially for state machines.&lt;/p&gt;

&lt;p&gt;Rive is fantastic, but also difficult to learn for one core reason: the state machine. Rive describes it's state machine as "a visual way to connect animations together and define the logic that drives the transitions. They allow you to build interactive motion graphics that are ready to be implemented in your product, app, game, or website."&lt;/p&gt;

&lt;h2&gt;
  
  
  Dilemmas with State Machine
&lt;/h2&gt;

&lt;p&gt;Rive’s state machine links animations together but can be complex for designers to handle alone, leading to frequent communication with developers. Consider a simple number counter animation:&lt;/p&gt;

&lt;h3&gt;
  
  
  Digits Example
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0b5wn6se3dvlv7mnz5ix.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0b5wn6se3dvlv7mnz5ix.gif" alt="Number Counter Example" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Consider this: there is a number counter and we want to be able to handle the transition between different digits. What should be the API (the state machine inputs) that the designer should make available to the developer?&lt;/p&gt;

&lt;p&gt;Two choices immediately come to mind&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Expose a number input and the application code can just set it to the desired value. The developer can set any value, but the designer must create 90 transitions (each number to 9 other numbers).&lt;/li&gt;
&lt;li&gt;Expose increment and decrement trigger inputs that the application code can repeatedly fire to reach a desired value. Easier for the designer (20 transitions b/c an increment and decrement for each number), but adds complexity for the developer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At Spellr, our philosophy is clear: what’s easiest for the designer takes priority. Developers can handle complex code, while animating multiple transitions is tedious.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem with Rive's Web Preview
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94kp6svx1eq7alk02rbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F94kp6svx1eq7alk02rbx.png" alt="Rive's Web Preview" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The developer then needs to learn how the state machine works, and the best way is to preview the .riv file they received and play hands on with the State Machine inputs. However, &lt;a href="https://rive.app/preview/" rel="noopener noreferrer"&gt;Rive’s web preview&lt;/a&gt; doesn’t support state machines (only individual animation playback), leaving developers unable to test transitions or interactions without the desktop app. This creates delays, miscommunication, and friction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter rive.rip
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajikju0be2kjfi9x57tu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajikju0be2kjfi9x57tu.gif" alt="rive.rip demo" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To solve this problem, we built &lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;rive.rip&lt;/a&gt;, an alternative, web-based tool allows developers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload .riv files and view a detailed breakdown of the state machine inputs (triggers, booleans, numbers).&lt;/li&gt;
&lt;li&gt;Interact with the state machine in real time, triggering transitions and inputs to see exactly how the animations behave.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This tool gives developers independence, reducing the need for back-and-forth with designers, speeding up the integration process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why We Built rive.rip
&lt;/h2&gt;

&lt;p&gt;At Spellr, interactive animations are core to our app, engaging kids and enhancing learning. rive.rip allows designers and developers to work seamlessly without stepping on each other’s toes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How We Built It
&lt;/h2&gt;

&lt;p&gt;We built rive.rip using Next.js for the frontend, and we relied on ShadCN components to create a clean and intuitive UI. It uses Rive React and the full source code can be found at &lt;a href="https://github.com/albertcai101/rive-rip" rel="noopener noreferrer"&gt;the public GitHub repo&lt;/a&gt; (give it a star!). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fme9o5owhune181ratzv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fme9o5owhune181ratzv8.png" alt="GitHub Repo" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We hope rive.rip can be as useful to you as it has been to us, which is why we released it to the public at &lt;a href="https://rive.rip" rel="noopener noreferrer"&gt;rive.rip&lt;/a&gt;. If you’re working with Rive and facing similar challenges, feel free to give it a try! We’re excited to hear your feedback and learn how we can make it even better.&lt;/p&gt;

</description>
      <category>rive</category>
      <category>animation</category>
      <category>webdev</category>
      <category>webdesign</category>
    </item>
  </channel>
</rss>
