A Three.js Tribute to Viral Zero-Budget Film 'Niu Lai'
The demo is a compact, self-contained example of several real-time 3D techniques that trip up web developers: instanced rendering for large object counts, frame-rate-independent camera smoothing, procedural texture generation on a canvas, and proper GPU resource disposal. The full source code is provided, making it a practical reference for anyone building a third-person browser experience with Three.js.
A developer built a browser-based 3D tribute to the viral Chinese film *Niu Lai*, a movie made by a two-person crew that went from a 342-yuan opening day to a trending topic and 168 nationwide screenings. The demo loads a custom 3D character model into a Three.js scene with a procedural dirt ground texture and instanced grass that spawns dynamically as the player moves. A third-person camera follows the character with a frame-rate-independent smoothing coefficient, while keyboard input drives movement, jumping with gravity integration, and a crouch mechanic that scales the character model around its feet. The entire interaction loop is encapsulated in a `GameWorld` class that manages the renderer, scene, input state, and cleanup to prevent memory leaks.
Using `frustumCulled = false` on the grass `InstancedMesh` is a necessary hack; otherwise the entire grass field can vanish when its bounding sphere leaves the camera frustum, even if individual blades are still visible.
The pixel ratio is capped at 2 to prevent high-DPI devices from tanking performance, a small detail that many WebGL tutorials omit but which matters on modern 4K and mobile screens.
Generating the ground texture procedurally on a canvas avoids an external image dependency and keeps the demo self-contained, but the 2,600-iteration loop per texture creation is a one-time cost that could be cached in a real application.
The conversation splits between appreciation for the Three.js tribute and a desire for more authentic, rough-hewn detail. One thread pushes for a bipedal walking animation, while another argues the model is too polished and lacks the original character's pockmarked texture. A separate promotional comment for a visualization collection draws attention, and a spam link gets called out.
Can you make it walk on two legs? I really need this
You need to build the walking animation into the model when you create it
That has to be done during modeling — the skeleton, the walking animation
Still too polished, missing that pockmarked charm [mischievous grin]
My modeling skills are limited, a veteran artist is still a veteran artist [thumbs up]
Really not bad, thumbs up. Recommending a popular tool used by many front-end devs: visualization-collection, an app focused on front-end visual effects. It contains hundreds of cases including rich CSS animations, Canvas animations, Three.js 3D, and more — open-source and free. App URL (desktop): https://hepengwei.cn Source code: https://github.com/hepengwei/visualization-collection