ZERO: The Engineering Behind a Defiant Interactive Narrative Demo

In a groundbreaking demonstration of web technology, a new interactive narrative experience, "ZERO," has emerged, meticulously engineered to challenge conventional educational pathways while pushing the boundaries of immersive digital storytelling. Developed over four months, this ambitious project, spearheaded by Atul Khola’s team, transforms over a gigabyte of raw 3D assets into a remarkably compact 10MB web experience, running at a fluid 60 frames per second even on budget mobile devices. The project stands as a testament to advanced web graphics, meticulous optimization, and the evolving role of artificial intelligence in contemporary development workflows, setting a new benchmark for rich, performance-driven online content.
The Genesis of an Idea: Challenging Traditional Education
The concept for "ZERO" originated from a compelling vision: to create an immersive scrolling experience that fundamentally questions the traditional degree path. This narrative resonates deeply with a global conversation about the efficacy and value of higher education, student debt crises, and the rapidly changing demands of the modern job market. Many are seeking alternative routes to career success, and "ZERO" aims to visually articulate the perceived shortcomings of conventional academic trajectories while hinting at new possibilities.
The initial pitch, rather than a conventional presentation, involved a proof of concept. Within a mere 48 hours, the development team crafted a working prototype featuring the core "draw a zero" interaction. This rapid prototyping, significantly accelerated by artificial intelligence, proved instrumental in securing the project. AI tools facilitated quick generation of initial code, allowing the team to dedicate more time to critical refinement and iterative testing, particularly for nuanced effects like the frost animation. This shift in methodology—from building to refining—became a hallmark of the project, enabling developers to explore multiple versions of complex visual elements like burning money effects and glass shatters before settling on optimal designs.
A New Paradigm for Web Interaction: The "Draw a Zero" Unlock

Upon arriving at the "ZERO" experience, users are met not with a conventional "enter" button, but a prompt to draw a zero on a locked screen. This unconventional gateway serves as an immediate, engaging hook. As the user completes the circular gesture, a captivating frost effect emanates from the stroke, gradually revealing the underlying experience. This innovative interaction, novel in its application, masterfully captures visitor attention within seconds, offering an immediate and satisfying reward for engagement.
The technical implementation of this gesture recognition is surprisingly streamlined. The system evaluates just three critical parameters: the total signed angle, indicating a full turn; the roundness, measured by the standard deviation of radii to prevent scribbles; and the closure, ensuring the stroke’s beginning and end points are sufficiently close. If these checks are met, the stroke’s centroid becomes the origin point for the intricate frost shader, initiating the visual reveal. This elegant solution exemplifies how seemingly complex interactions can be achieved with efficient, well-designed algorithms.
Under the Hood: A Deep Dive into the Technical Architecture
Following the unique unlock, the "ZERO" experience unfolds as a single, continuous scroll, seamlessly transitioning from the loading screen to an interactive city map. A pivotal architectural decision was to eschew the browser’s native scroll mechanism entirely. Instead, wheel and touch inputs dynamically update a virtual scroll value, which then smoothly eases towards its target. This virtual scroll value acts as the central orchestrator, driving every facet of the experience—from asset loading and animations to shader timings, text reveals, and overlay displays.
The entire narrative is modularized into nine self-contained segments, each possessing an optional lifecycle. This structure includes methods for asynchronous Three.js object construction (enter), local progress scrubbing (scrub), per-frame updates for idle animations (update), and resource disposal for seamless transitions (teardown). This segment-based approach significantly enhanced codebase maintainability, especially during later development stages, and streamlined debugging. Crucially, navigating to any stage intelligently replays the lifecycle of preceding segments, ensuring the experience is always initialized as if the user had naturally progressed through it, thereby preventing jarring visual or functional inconsistencies. The core development leveraged a robust stack including Three.js for 3D rendering, GSAP for sophisticated animations, Howler for audio management, and Vite for a fast development build process.
Mastering 3D Assets for Web Performance

A substantial portion of the four-month development cycle—particularly the initial month—was dedicated to the meticulous preparation and optimization of 3D assets. The project’s source files originated as high-fidelity Blender scenes, featuring uncompressed geometry, 8K textures, and baked animations, collectively amounting to over a gigabyte of data. This posed a significant challenge for web deployment, where bandwidth and device resources are often constrained. The team’s expertise in asset pipeline management proved critical in transforming this massive dataset into a lean, performant web application.
The strategy involved a multi-faceted approach:
- Geometry Compression: All geometry was compressed using DRACO, with self-hosted decoders. This decision to bundle decoders locally, rather than relying on CDNs like
gstaticorunpkg, was a direct response to past experiences where external CDN slowdowns caused decoding failures, underscoring the importance of pipeline control. - Texture Optimization: Textures, often the largest contributors to GPU memory footprint, received significant attention. While a PNG might be small on disk, it decompresses fully in GPU memory (e.g., a 2048×2048 texture occupies approximately 16MB of VRAM). The solution adopted was KTX2 with ETC1S compression, which keeps textures compressed on the GPU, drastically reducing memory usage and accelerating upload times.
- Custom Compression Previewer: Recognizing the inherent challenges of ETC1S, a lossy format lacking easy local preview, the team developed an internal converter and previewer dashboard. This tool allowed developers to display compressed and uncompressed images and videos side-by-side, facilitating precise fine-tuning of ETC1S settings for each asset. This granular control enabled selective, heavier compression where visual impact was minimal, while preserving quality for hero assets, and disabling mipmaps where unnecessary. This bespoke tool, rarely discussed in standard WebGL workflows, proved invaluable to the final build’s efficiency.
- Texture Atlasing: Related textures were consolidated into shared atlases. For instance, all hand textures were packed into a single 4×4 atlas, with individual meshes referencing their sections via UV offsets and scaling. This technique was extended to text sprites, certificates, paper shreds, clouds, coins, and glass shards, reducing over fifty individual images to a dozen atlases. Gradient backgrounds were further replaced with concise GLSL code.
These rigorous optimizations collectively reduced early builds from 35-40MB to under 10MB. The interactive world map, being a substantial component, was isolated in its own loading group to prevent it from blocking the critical path of the initial experience.
Optimizing for Speed: The Unseen Battle Against Latency
Beyond download size, the team addressed the often-overlooked challenge of texture uploads to the GPU. Even compressed textures require main thread processing for GPU transfer, which can easily block rendering for tens of milliseconds, leading to noticeable frame drops. To mitigate these "stutters," particularly when textures are first needed during scrolling, a three-pronged strategy was implemented:
- Prioritized Uploads: Textures critical for the initial loading sequence were explicitly uploaded during the boot phase.
- Idle Time Processing: A
requestIdleCallbackmechanism was used to drain the upload queue during the browser’s idle periods, ensuring that non-critical textures were uploaded without impacting active rendering. - Synchronous Flushing: For known stage transitions (e.g., after the loader or during gate animations), the upload queue was synchronously flushed. This pre-emptively ensures all required textures are on the GPU before they appear on screen, preventing first-time upload hitches during user interaction.
Furthermore, an adaptive quality manager was integrated to dynamically adjust rendering quality based on device performance. The renderer continuously monitors frame times via a rolling buffer. If average frame times exceed 22ms (indicating less than ~45fps), the quality tier is lowered. Conversely, if performance stabilizes below 12ms (above ~83fps), quality is scaled up. A cooldown mechanism prevents rapid, distracting switching between tiers. These tiers adjust visual elements like pixel ratio, blur samples, geometry detail, and text resolution, preserving the core narrative experience across a wide range of devices, from flagship smartphones to budget Android phones. Targeted optimizations, such as temporarily lowering pixel ratio and disabling blur/frost during the glass shatter interaction, cleverly hide performance costs within the gesture itself. Extensive profiling on a budget Android device during the final month helped identify and eliminate performance bottlenecks, including a critical 157ms frame spike.

Artistry in Code: Crafting Immersive Visual Effects with Shaders
The visual richness of "ZERO" is largely attributable to its sophisticated post-processing chain and custom shaders. Each frame is constructed through a sequence of passes:
- Render Pass: The primary 3D scene.
- Background Pass: Procedurally generated backgrounds.
- Frosting Pass: Manages the "draw a zero" frost and subsequent melt.
- Lens Blur Pass: Depth-of-field effects, dynamically tier-gated.
- Foreground Pass: Applies grain and tone mapping.
- Text Pass: Composites narrative text after tone mapping.
- Glass Pass: Slots in after the background for specific effects.
- Shatter Pass: The final, overarching break effect.
These passes are initialized lazily and warmed up during idle times, keeping them off the critical loading path. AI provided initial versions for many shaders, but each underwent rigorous refinement to achieve the desired aesthetic and performance.
- The Frost Unlock: The frost effect utilizes a ping-pong buffer across four passes (horizontal, vertical, two diagonals). Each pass expands the stroke by propagating the brightest neighboring pixels, creating an octagonal growth pattern. This expansion is modulated by a frost texture, imparting a natural, crystalline appearance. The stroke’s centroid then becomes the origin for a radial melt effect.
- Lighting the Hands Without Lights: To achieve precise lighting without the expense of real-time skinned mesh lighting, the team baked lighting into textures. Two texture slots are used, with the incoming slot updated for each keyframe and smoothly crossfaded. Premultiplying alpha before blending prevents dark halos around transparent edges. Both lighting textures are stored within a single atlas, optimizing GPU memory and reducing texture binding calls.
- Burning Money: This effect uses a noise-driven distance field to progressively dissolve each bill. A glowing HDR ember rim appears just before an area burns, followed by a charred surface. Fragments are discarded early if they are outside the burn threshold to optimize FBM (fractal Brownian motion) calculations.
- Shredding Certificates: Each vertex is assigned a strip index. As a shred front moves, each strip detaches and falls independently with its own rotation, creating the illusion of a certificate tearing into ribbons. Lighting normals are analytically generated from the animation’s wave function, eliminating the need for stored normal maps.
- The Tunnel: The tunnel geometry is an extrusion of the ZERO logo’s cross-section. A brightness pulse travels through the tunnel, driven by the geometry’s world-space Z coordinate, ensuring a seamless effect even with repeating sections.
- Text That Pulls into Focus: Narrative text employs a seven-tap hexagonal blur. The blur radius is controlled by the reveal progress, allowing text to gradually sharpen into view rather than appearing abruptly. This blur is skipped entirely when no text is visible to conserve rendering resources.
A notable debugging challenge involved shader precision on mobile GPUs (Adreno and Mali), where mediump floats were often treated as true 16-bit, leading to visual artifacts like identical strip movement or banding. This highlighted the crucial need for early and continuous testing on actual mobile devices.
Designing Engagement: Intuitive Interactions and Narrative Flow
The interaction design for "ZERO" was developed from scratch, given that the source material primarily consisted of static images and videos. Most interactive gates leverage a configurable press-and-hold system. A shared configuration dictates prompt appearance and hold duration, while each gate implements its unique visuals through a set of hooks.

During the hold sequence, the entire frame subtly shifts to a dark red hue. When the glass shatters, this color snaps back in approximately 200ms, creating a powerful, synchronized effect where the shards appear to break away the darkness. A longer 400ms transition was found to be less impactful. Crucially, the shatter sound is synchronized with the first rendered frame of the animation, rather than a fixed timer. This prevents audio from playing prematurely on slower devices, ensuring a cohesive and impactful user experience.
The Payoff: An Interactive World and Future Implications
The narrative culminates in a final launch sequence that transports the user into an open sky. As stage four progresses, clouds part to reveal a sprawling city, with "ZERO’s" central tower dominating the skyline. A halo appears above the tower, marking the final gate before the camera settles into an interactive world map.
Stage five grants users full control, allowing them to pan, zoom, and freely explore the meticulously rendered city. Each marker on the map reveals a card detailing roles, scenarios, and tools, complete with a "Join Beta" button. A persistent join bar transforms into a waitlist signup. After guiding the user through a thought-provoking narrative, the experience concludes by empowering them to explore its implications for themselves.
Lessons Learned and the Evolving Role of AI
The "ZERO" project offers profound lessons for the future of web development, particularly in the realm of immersive 3D experiences. The development team underscored that asset preparation and GPU uploads are as critical as the rendering process itself. Tools like the custom compression previewer, the strategic use of self-hosted decoders, the sophisticated upload queue management, and the adaptive quality manager were not glamorous components but were indispensable in transforming a gigabyte of source material into a sub-10MB, high-performance web application. This comprehensive approach to performance optimization is a blueprint for achieving smooth, high-fidelity experiences on diverse hardware.

Regarding the role of artificial intelligence, "ZERO" illustrates its emerging utility as a powerful accelerant. AI efficiently generated initial code versions, significantly speeding up the prototyping phase and contributing directly to the project’s successful pitch. However, the project also vividly demonstrates AI’s current limitations. The "real work," as developers noted, involved extensive human judgment, meticulous refinement of interactions, aesthetic improvements, detailed performance profiling, and making hundreds of subtle decisions that only become apparent through iterative testing on real devices. AI can generate quickly, but crafting a truly polished, engaging, and performant interactive experience still relies heavily on expert engineering judgment and creative human iteration. "ZERO" therefore stands not just as a technical marvel, but as a compelling case study in the symbiotic relationship between advanced technology and human ingenuity in the evolving digital landscape.
Credits
- Atul Khola’s team
- Codrops for publication







