React/three.js dice roller with physics in an HTML canvas

Graphics programming is a kind of visual problem-solving that really feels like play to me. Creating a 10-Sided Die with React, Part 1 has been my favorite blog post to write here so far. If you haven’t read it yet, please check it out! It’s a tutorial about the math that goes into making a custom geometry in react-three-fiber, a 3D web renderer for React.

The latest source code is here. I encourage you to read the blog post for full context and detail.

I’ve been stuck on how to add textures to the dice since publishing that post, but I believe the way forward involves decoding UV arrays in the source code I’m adapting.

More projects