Why Isadora Agency Scrapped Physics Engines in Favor of Lottie and Math for ‘Stress Release’

When front-end developers and user experience engineers are tasked with building a web interface that feels tactile, bouncy, or destructive, the industry instinct is almost invariably uniform: reach for a physics engine. Frameworks like Matter.js, Cannon.js, or custom WebGL solutions have long served as the gold standard for crafting immersive, gamified web experiences.

When the creative team at Isadora Agency set out to build Stress Release, a digital stress-relief squeeze toy designed to let burnt-out creatives smash, stretch, and distort animated user interface characters, they initially explored that conventional route. The overarching goal was to construct a highly tactile experience where every single user click yielded a satisfying, squishy reaction that felt grounded in physical reality.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

However, as the team began prototyping their early concepts, they realized something crucial about how digital interactions intersect with motion design: physics engines produce plausible motion, but in the case of their project, the animators had produced intentional motion. They did not need their characters to act like realistic rubber balls bouncing uncontrollably and chaotically around a canvas. Instead, they needed them to react in very specific, highly designed, and carefully timed ways. Consequently, the team made the bold architectural choice to scrap the physics engine entirely.

Instead of relying on heavy physics simulations or WebGL layers, the team engineered a real-time stress-relief squeeze toy relying entirely on programmatic Lottie state controls, standard DOM manipulation, and precise distance-based math. The project demonstrated how architectural decisions must ultimately serve the art direction rather than dictating it, proving that traditional DOM-based workflows can achieve remarkable tactile feedback when paired with clever mathematical mapping.

The Design Requirements: Intentional Motion

The core requirement for Stress Release was absolute deterministic control. The agency’s animators had meticulously crafted bespoke JavaScript Object Notation Lottie files that required exact, frame-by-frame sequencing to deliver the desired comedic and visual impact.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

For instance, a core interaction known as the “mega squeeze” reaction required a precise 181-frame build-up phase followed immediately by a specific release sequence. To honor this artistic vision, the development team needed an architecture that would not overwrite the animators’ carefully crafted keyframes with algorithmic approximations generated on the fly by a physics solver.

In interactive digital environments, the tighter the click-feedback loop—encompassing the initial click, the visual squish, and the resulting score—the greater the need for deterministic frame control. By choosing programmatic state control using Lottie’s native application programming interface, the engineers ensured that the interaction layer acted as a flawless, instantaneous trigger for the underlying animation layer.

Creating Tactile Feedback: Mapping DOM Elements to Lottie States

Because the application architecture relied entirely on Lottie and the standard Document Object Model, rendering was handled directly by the Lottie runtime, which parses JSON-based vector animations as Scalable Vector Graphics internally. Developers selected elements directly by their unique identifiers and CSS classes, driving their interactive behavior using a combination of Lottie animation segments, cascading style sheet transformations, and click-event mathematics.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

To achieve a deeply satisfying tactile feel upon hitting an interface character, the team utilized radial input mapping. The primary step involved converting a user click from raw page coordinates into the character’s local coordinate space. Every click was systematically measured against the character’s exact center point and then translated into score rewards, feedback intensity parameters, and explosion placement coordinates.

By measuring the straight-line distance from the center of the click using the Pythagorean theorem, a single numerical value emerged to drive multiple aspects of the experience simultaneously, including the score, the intensity of the visual feedback, and the exact spatial placement of the explosion animation. This created a concentric zone system resembling a dartboard. The visual complexity of the Lottie vector graphic became completely irrelevant to hit detection, as the hitbox remained a clean, predictable circle.

Crucially, the explosion Lottie animation was dynamically repositioned to match the exact vector used for scoring, ensuring it always appeared precisely where the player clicked. This spatial accuracy created the visceral sensation of physically impacting the character entirely through math and DOM positioning.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

Interaction Handling: Controlling the Narrative

Because the experience utilized DOM-managed SVG elements, desktop clicks and mobile touches could be handled directly through native event listeners. This approach successfully avoided the overhead of extra raycasting or coordinate remapping layers while keeping the interaction model seamlessly aligned with how the animations were rendered on screen.

Since the game requires a visual reaction at a specific point, Lottie handles all the squish and bounce feelings internally through its pre-defined animation curves. Each character features a distinct set of animation sections, including looping idle states, reaction frames, and terminal end states, stored as specific frame ranges. When a click successfully lands, the application jumps directly to the exact segment matching the current game state.

On every subsequent click, the system advances through the established play order and fires the next sequential segment while temporarily locking out further inputs mid-animation to preserve the integrity of the motion. Once the animation segment completes, control is automatically handed back to the idle loop, returning the character to a state of readiness. For the mega squeeze feature, background bars loop on a specific frame range until the player triggers the final release sequence, culminating in a hard reset of the animation state.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

The Responsive Benefit of DOM Elements

Another major factor informing this architectural decision was responsive behavior across diverse viewports. By building the application within the DOM, the developers entirely bypassed the notorious complexities of scaling bounding boxes and collision vectors across a fragmented landscape of mobile and desktop devices.

The team handled responsive resizing entirely through CSS custom properties. By recalculating these variables dynamically on every window resize event, the underlying layout smoothly reacted to the updated dimensions, allowing the Lottie SVGs to scale naturally inside their containers without ever losing their active states.

Mobile Performance Optimization: The Cost of Lottie

While this DOM-and-Lottie architecture granted the development team total control over the art direction and tactile fidelity, it simultaneously introduced a notable technical challenge regarding file size and performance overhead. Lottie JSON files can inherently carry significant weight, and the project featured 21 distinct character animations alongside multiple explosion variants that all required efficient loading.

Building Tactile UX: Honoring Intentional Design With Lottie — Smashing Magazine

To ensure the user experience remained fluid and responsive, particularly on resource-constrained mobile devices, the engineering team implemented aggressive optimization strategies. They adjusted rendering quality parameters downward during heavy multi-animation states, such as the character selection shelf where numerous animations played simultaneously, while reserving full-quality rendering for the single focused character during active gameplay sessions. These adjustments successfully minimized interpolation calculations and reduced the number of frame calculations required per second.

Ultimately, the development of Stress Release underscored a fundamental principle in modern web development: when determining the technology stack for a highly interactive and gamified web experience, design requirements must dictate the technical implementation. By opting for programmatic state control over emergent physical simulation, Isadora Agency empowered its animators to dictate the exact emotional and visual feel of the product, leaving the underlying code to perform its core responsibilities of listening, calculating, and triggering with absolute precision.

Share:

Raul Delapena Setiawan writes for Tech Maze.

Leave a comment