Lurker News
Hello HN! We’re a small creative studio specializing in real-time 3D experiences. Netlify approached us to design and build an interactive experience to celebrate reaching 5 million developers.

Inspired by the classic game Marble Madness, we created a gamified experience where users control a ball through playful, interactive levels. The goal was to blend marketing content with the look and feel of a game to engage users.
The app is built with Three.js [1], using our custom render pipeline and shaders, and uses Rapier for physics simulation [2]. The 2D content is overlaid on the WebGL view using CSS 3D transforms for a seamless integration with the 3D view.
We’d love for you to try it out and share your thoughts!
[1] https://threejs.org
[2] https://rapier.rs
EDIT: More info on this project here: https://www.littleworkshop.fr/projects/5milliondevs/

Comments (230) 91 threads

Earlier comments
sergiotapia#
This is so cool, it feels great! The ball has the "feel" of a putty ball, bouncy but not a lot just enough. Probably a lot of thought went into this and it shows.
Keyframe2 replies#
i got a few questions:

- you say it's built with three.js but you also use rapier. How does that work / integrate? I see one is JS frontend thing, the other rust engine
- how did you design levels, with what?

franck2 replies#
The rendering engine is using Three.js which is a WebGL library. The physics/collision detection code is using Rapier through a WebAssembly module available on npm [1], which means that it can be used on the web even though it's originally written in Rust.

The levels were built inside the Unity Editor, then exported to FBX, then went through a pipeline based on Blender python scripting that optimized their geometry, assigned materials and exported them to GLTF (the final format that we load in the browser).
[1] https://rapier.rs/docs/user_guides/javascript/getting_starte...

Keyframe1 reply#
thanks for answering! Interesting you used unity for level layout. Interested to hear the advantage here. Considering you already use Blender down the pipe, how come you haven't used Blender for it or any other dcc app lile maya, max, whatever?
franck1 reply#
The main draw of the Unity Editor for us is how it auto-reloads assets, like 3D models, as soon as the asset file is updated. So the workflow is having your DCC app open in which you model things and export assets from, and Unity Editor to design your level where every model is always up-to-date.

This is not possible with Blender because it contains all models inside a single .blend file, so assets must be manually re-imported each you change them. There is a Link feature in Blender but in my experience it's not as good as what Unity does out of the box.

Continue this thread — 1 reply

ivanjermakov1 reply#
How did you assemble Rapier colliders from GLTFs?
franck#
Nothing complicated, we simply have initialization code that parses the GLTF scene on startup by iterating over the children of a specific group, and creating Rapier colliders for each of them (Triangle Mesh Colliders to be specific, in order to allow things such as curved ramps). Since their geometry is very simple, we can use directly the rendering geometry for the collider geo.
skydhash#
Not the dev, but Rapier has a JavaScript binding through WASM. And you can design the levels with a 3d tool like Blender, then script out the animation.
noctane#
Great work. Are there any plans to convert some of the code to OSS?
pbronez1 reply#
I got stuck in the second chapter. Went into a tube leading to a spiraling green slide and my ball reset... to the interior of the block. Oh well, cool project.
franck#
Thanks and sorry you got stuck, we made our best effort to prevent these situations from happening but apparently they still do.

Load more comments