In the contemporary landscape of front-end development, the pursuit of "tactile" web interfaces—those that respond to user input with a sense of weight, elasticity, or physical resistance—has traditionally been the domain of complex physics engines. Frameworks such as Matter.js and Cannon.js, or bespoke WebGL-based solutions, have long served as the industry standard for creating immersive, gamified environments. However, a recent architectural shift led by the team at Isadora Agency suggests that for projects requiring high levels of artistic precision, the "plausible motion" of a physics engine may actually hinder the "intentional motion" envisioned by designers.
The development of "Stress Release," a digital stress-relief application featuring a cast of interactive, squishy characters, provides a case study in this alternative architectural philosophy. Led by Alexey Kopytin, the engineering team opted to bypass traditional physics simulations entirely. Instead, they constructed a highly responsive experience using programmatic Lottie state controls, native Document Object Model (DOM) manipulation, and distance-based mathematics. This approach prioritizes deterministic control over algorithmic approximation, ensuring that every frame of animation remains faithful to the animator’s original vision while maintaining the performance required for a seamless user experience.
The Philosophical Divergence: Plausible vs. Intentional Motion
The fundamental challenge in building tactile UX lies in the tension between realism and intent. Physics engines excel at "plausible motion"—they calculate how an object should move based on mass, friction, and gravity. In the context of a game where objects bounce unpredictably, this is ideal. However, for a brand-driven experience like Stress Release, where characters possess specific personalities and "squish" in bespoke ways, the randomness of a physics engine can become a liability.

When the Isadora Agency team began prototyping, they found that physics engines often overwrote the subtle nuances crafted by their animators. A character designed to have a specific 181-frame "mega-squeeze" build-up would lose its rhythmic integrity if subjected to the real-time calculations of a gravity-based engine. By pivoting to Lottie—a mobile library developed by Airbnb that renders After Effects animations in real-time—the team was able to treat the animation timeline as a programmable state machine. This allowed the interaction layer to act as a precise trigger for specific frame ranges, maintaining the "hand-crafted" feel of the motion.
Chronology of Development: From Physics Prototyping to Lottie Integration
The development of Stress Release followed a non-linear path that reflects the evolving needs of the project. The timeline of the build can be divided into four distinct phases:
Phase 1: Conceptualization and Art Direction
The project began with the creation of 21 unique characters, each with its own visual identity and intended reaction to stress. Animators produced high-fidelity .json files using Adobe After Effects and the Bodymovin plugin. At this stage, the focus was purely on the "feel" of the squash-and-stretch principles, independent of any coding constraints.

Phase 2: The Physics Engine Experiment
Initial technical explorations involved Matter.js. The goal was to create a bounding box for each character and allow the user to "hit" the object. While the collision detection worked, the visual feedback felt generic. The characters reacted like standard rubber balls rather than the expressive entities the designers had envisioned. The team realized that to honor the design, the code had to serve the art, not the other way around.
Phase 3: Implementing Radial Input Mapping
After scrapping the physics engine, the team moved toward a math-based approach within the DOM. They implemented a "concentric zone system" for hit detection. This involved translating page-level click coordinates into the local coordinate space of the character. By utilizing the Pythagorean theorem to calculate the straight-line distance from the character’s center, the team could determine the intensity of the "hit" and trigger the corresponding animation segment.
Phase 4: Optimization and Mobile Refinement
The final phase focused on the performance costs of Lottie. With 21 animations on a single "shelf" screen, the memory overhead was significant. The team implemented aggressive optimization strategies, including reducing interpolation quality and slowing down frame rates for non-essential background animations to preserve CPU cycles for the primary interaction.

Technical Architecture: The Mechanics of Tactile Feedback
The success of the "Stress Release" interface relies on a tripartite system of radial math, frame-segmentation, and responsive CSS variables. Unlike WebGL, which renders to a single canvas, this architecture uses SVG elements managed directly within the DOM, allowing for native event listening and easier debugging.
Radial Hit Detection and Scoring
To create a satisfying feedback loop, the application calculates the distance of a click from the center of the character using the formula Math.hypot(a, b), where ‘a’ and ‘b’ represent the horizontal and vertical offsets. This single numerical value drives three critical outputs:
- Scoring: A "bullseye" (distance < 10px) yields maximum points, while outer rings provide diminishing returns.
- Feedback Intensity: The distance determines which Lottie segment is played (e.g., a light tap vs. a heavy distortion).
- Visual Alignment: The "explosion" or particle effect Lottie is dynamically repositioned to the exact (x, y) coordinates of the click, reinforcing the spatial accuracy of the interaction.
Deterministic State Control
The engineering team treated the Lottie JSON files as a collection of "play segments." Each character’s animation was divided into specific frame ranges: an idle loop (frames 0-40), a light reaction (41-80), a medium reaction (81-120), and an end state (161-200).

When a user clicks, the system halts the current idle loop and forces a jump to the specific reaction segment. By setting playChar.loop = false and calling playChar.playSegments(playNow, true), the developer ensures that the animation is executed immediately and with frame-perfect accuracy. Once the reaction completes, an onComplete callback returns the character to its idle state, creating a seamless, interruptible loop.
Performance Data and Mobile Optimization Strategies
While Lottie offers unparalleled design fidelity, it is notoriously resource-intensive due to the complexity of rendering SVG paths in real-time. This is particularly evident on mobile devices where CPU and memory are limited. To maintain a fluid 60 frames per second (FPS), the Isadora Agency team employed several data-driven optimization techniques.
On the "character shelf" screen, where 21 animations play simultaneously, the team reduced the Lottie quality setting to 0.5 (50%). This reduction limits the precision of path interpolation, significantly lowering the computational load without a perceived loss in visual quality on smaller screens. Additionally, the animation speed was reduced to 0.6x, further decreasing the number of frame calculations required per second.

In contrast, when a user selects a single character to "play" with, the system focuses all resources on that individual element. The quality is restored to 1.0 (100%), and the animation speed is normalized. This dynamic resource allocation ensures that the most interactive part of the experience feels the most polished.
Responsive Design through CSS Variables
One of the secondary benefits of a DOM-based Lottie architecture is the ease of responsive scaling. In a WebGL environment, developers must manually scale bounding boxes and raycasting vectors to match the viewport. In this project, the team utilized CSS custom properties (variables) to handle resizing.
By calculating the window’s inner height and width and assigning them to variables like --doc-height, the entire layout remains reactive. The Lottie SVGs scale naturally within their CSS-defined containers. Because the hit detection math is based on the relative offset of the element ($("#playChar").offset()), the interaction remains accurate regardless of whether the user is on a 27-inch monitor or a 6-inch smartphone.

Implications for the Future of Web Interaction
The methodology used in the development of Stress Release highlights a growing trend in high-end digital production: the move away from "black box" engines toward transparent, developer-controlled logic. By mapping Lottie’s native timeline capabilities directly to DOM events, developers can bridge the gap between static design and dynamic interaction.
Industry analysts suggest that this approach could redefine how brand-heavy websites are built. When the goal is not to simulate a world, but to communicate a specific brand "feeling" or "vibe," deterministic control is superior to simulation. This project demonstrates that with a firm grasp of basic geometry and the native capabilities of modern browsers, it is possible to build world-class, tactile experiences without the overhead of heavy physics libraries.
Ultimately, the architecture of Stress Release serves as a reminder that in the intersection of art and code, the technology should always be subservient to the intent. By choosing math and Lottie over emergent physics, the team at Isadora Agency ensured that the final product was not just a game that worked, but an experience that felt exactly as its creators intended. This "intentional motion" represents a high-water mark for tactile UX, providing a blueprint for future projects that refuse to compromise on art direction for the sake of technical convenience.
