ZERO: The Engineering Behind a Defiant Interactive Narrative | Codrops

A Narrative Built on Defiance
The thematic core of ZERO is a critique of the traditional degree-oriented educational path. The experience is structured as a journey through disillusionment, beginning with the standard societal promise: academic excellence leads to corporate success. However, as the user interacts with the site, this promise is systematically deconstructed.
The narrative unfolds across six distinct scrolling stages, punctuated by five interactive "gates" that require user participation to proceed. These gates—drawing a zero, holding to shatter glass, and launching through a cinematic tunnel—act as metaphorical transitions. The story begins with a visual representation of a degree, which eventually shatters to reveal real-world unemployment statistics. As the user progresses, certificates are shredded and money is burned, symbolizing the perceived loss of value in traditional credentials. The journey culminates in a transition through a "ZERO" shaped tunnel into a futuristic city map, where users are invited to join a new type of educational ecosystem.
Chronology of Development: From Concept to Launch
The development of ZERO followed a non-traditional path, beginning with a high-stakes pitch rather than a static presentation. The creative team, led by Atul Khola, opted to deliver a working proof of concept (POC) within 48 hours. This initial prototype featured the "draw a zero" interaction, which used a frost shader to reveal the site. The success of this POC secured the project and set the tone for the subsequent four months of development.

The timeline was divided into three primary phases:
- Asset Audit and Pipeline Establishment (Month 1): The team received source files from Blender that exceeded one gigabyte. This phase focused on determining compression formats and establishing a 3D pipeline that could survive the web environment.
- Narrative Construction and Shader Iteration (Months 2-3): This period involved the creation of the six narrative stages and the refinement of the interactive gates. It was during this time that the team utilized Artificial Intelligence to rapidly prototype code structures and shader logic.
- Optimization and Mobile Profiling (Month 4): The final month was dedicated to ensuring the experience performed reliably on a wide range of devices. The team conducted extensive testing on budget Android phones, identifying and eliminating "frame spikes" to ensure a fluid user experience.
Technical Architecture: The Power of a Single Variable
A defining characteristic of ZERO’s architecture is its departure from native browser scrolling. Traditional tools like ScrollTrigger were abandoned in favor of a "virtual scroll" system. In this model, all mouse wheel and touch inputs update a single numerical value. This value serves as the "heartbeat" of the entire experience, driving animations, asset loading, shader timings, and text overlays.
The project is organized into nine self-contained segments. Each segment possesses a lifecycle—comprising enter, scrub, update, and teardown functions—allowing for modular maintenance. This architecture ensures that if a user jumps to a specific stage, the system replays the lifecycle of all preceding segments in the background, maintaining state integrity without requiring a full reload or "teleportation" glitches.
Asset Optimization: Reducing the Digital Footprint
To achieve the goal of a sub-10MB payload, the engineering team implemented a multi-layered optimization strategy. The primary challenge was the 1GB of source data, which included uncompressed geometry and 8K textures.

Geometry and Textures
All 3D geometry was compressed using the DRACO algorithm. Crucially, the team hosted the Draco and KTX2/Basis decoders locally rather than relying on external Content Delivery Networks (CDNs), a move designed to prevent pipeline failures caused by third-party server downtime.
Textures, which typically consume the most Video RAM (VRAM), were converted to KTX2 format with ETC1S compression. Unlike standard PNGs, which decompress fully in GPU memory, KTX2 remains compressed, significantly reducing the memory overhead. To manage the lossy nature of this compression, the team developed a custom internal dashboard—a compression previewer—that allowed them to compare compressed and uncompressed assets side-by-side and fine-tune settings for each individual texture.
Texture Atlasing
To minimize the number of draw calls and GPU state changes, the team consolidated over fifty individual images into approximately a dozen texture atlases. For example, all character hand textures were packed into a single 4×4 grid. This approach was extended to text sprites, certificates, and environmental elements like clouds and shards.
Performance Engineering and GPU Management
A common pitfall in WebGL development is the "stutter" caused by uploading large textures to the GPU. Even if a file is small on disk, the act of moving it to the GPU can block the main thread for 50 milliseconds or more, leading to visible frame drops. ZERO addressed this through a three-pronged strategy:

- Lazy Initialization: Assets are only prepared when they are nearing the viewport.
- Idle-Time Uploads: The system utilizes
requestIdleCallbackto upload queued textures only when the processor has spare cycles. - Synchronous Flushing: During transition gates where the user is already paused, the system flushes the upload queue to ensure all necessary assets are ready for the next stage.
Adaptive Quality Manager
Recognizing the vast disparity in hardware capabilities among users, the team implemented an adaptive quality manager. The system monitors frame times using a rolling buffer. If the average frame time exceeds 22ms (indicating a drop below 45fps), the engine automatically downgrades visual settings, such as pixel ratio and blur samples. Conversely, if performance remains stable under 12ms, the quality is scaled back up. This ensures that the narrative remains accessible regardless of whether the user is on a flagship smartphone or a budget device.
Advanced Shader Engineering
The visual fidelity of ZERO is largely driven by custom GLSL shaders, many of which were developed to mimic complex lighting and physics without the computational cost of real-time simulation.
- Frost Effect: This uses a ping-pong buffer to propagate a "drawn" stroke across the screen. The expansion follows an octagonal pattern modulated by a noise texture to create a crystalline, organic growth look.
- Baked Lighting for Skinned Meshes: Real-time lighting on moving character models is traditionally expensive. The team bypassed this by baking lighting into textures and using a shader to crossfade between different lighting "states" as the animation progressed.
- The Burning Money Effect: This utilizes a noise-driven distance field (FBM) to dissolve assets. A thin, high-dynamic-range (HDR) "ember rim" is calculated at the edge of the dissolve to simulate the look of glowing, charred paper.
- Hexagonal Text Blur: To create a cinematic "pull-into-focus" effect for narrative text, a seven-tap hexagonal blur shader was used. This effect is dynamically tied to the scroll progress, sharpening the text as the user reaches the relevant section of the story.
Analysis of Implications: AI and the Future of Web Design
The development of ZERO highlights a shifting paradigm in the role of Artificial Intelligence in creative engineering. The developers noted that AI has fundamentally changed the "first draft" phase of coding. By using AI to generate initial versions of shaders and interaction logic, the team was able to bypass the "easy part" of writing code and focus their energy on the "real work": evaluation, refinement, and performance profiling.
This project suggests that the future of the web lies in highly optimized, narrative-driven experiences that bridge the gap between cinema and traditional browsing. As mobile hardware continues to improve, the techniques used in ZERO—such as virtual scrolling, GPU-managed texture queues, and adaptive quality scaling—are likely to become standard practice for brands looking to capture user attention in an increasingly crowded digital landscape.

Conclusion and Credits
ZERO stands as a testament to the fact that high-end 3D storytelling does not require massive download sizes or top-tier hardware. Through meticulous engineering and a "mobile-first" optimization mindset, the team successfully delivered a defiant narrative that remains fluid and responsive.
The project was a collaborative effort involving several key contributors:
- Concept and Design: Atul Khola
- Development Team: Thanos Papavasileiou, Jitu Raut, and the wider engineering group.
- Audio and Sound Design: Integrated via the Howler.js library to provide a synchronized auditory experience.
By prioritizing the technical "plumbing" of the site—asset compression, GPU uploads, and memory management—as much as the visual output, the creators of ZERO have provided a blueprint for the next generation of interactive web narratives.







