Skip to main content

Version 1 Release

· 3 min read
Frank Ali
Front-End Developer

Big announcement. Version 1.0 has been released! The "last few things" took longer than expected. I really wanted to rework how themes were handled internally so different dice models could be used. I dug into supporting "levels of detail", "HD textures", "mobile textures" and many other things involved with over-engineering an idea. I'm happy with what I settled on which accomplishes the original goal of supporting different dice models.

Now, @3d-dice/dice-box only ships with the 'default' dice theme. All other themes I've develop have been moved into their own project at @3d-dice/dice-themes. This way, users can grab the themes they want and simply drop them into their themes folder. I even made a few custom color themes that really utilize the alpha channel in the diffuse texture. I was able to crete both color configurable textures that had a gritty overlay with the numbers. Check out the Rust and Rock themes if you're interested.

One of the hangups in my "last few things" was discovering that the dice models I had purchased from Sketchfab and CG Trader had royalty free licenses, but redistribution was not allowed. Finding good license free game dice was a problem. Thankfully, I had been collaborating with the dev team at Quest Portal. They recently implemented dice-box into their virtual table top platform. This was a great experience and helped to really test the project's overall viability and production readiness. More on that in another post. Anyway, the team at Quest Portal was kind enough to help me out with procuring some license free game dice models. They are now the 'default' set. The default set will soon have a couple of bonus dice, including a d2 a fate die and a d6 with pips. However, while I was waiting on those dice to be produced, I decided to learn how to make my own dice set as well. I really wanted to show off the ability to use wildly different dice models in the project.

Dice models in Blender

I learned soo much about Blender. Thank goodness for YouTube. While it was a struggle, I was finally able to create two sets of 3D dice models. One is the "smooth" set and the other is the "gemstone" set. Carving the numbers out of the faces and then generating proper normal maps was a real struggle. After that the struggle continued as I attempted to create smooth low-poly assets, but I finally made it across the finish line. What we have now are two CC0 dice model assets.

Gemstone models in Blender

Some other great features in 1.0

  • New config option for illumination level
  • New config option for shadow transparency
  • A truly random auto-generated fallback for non-standard/unsupported dice such as d5
  • New config option to suspend the 3D animation and just get the random numbers (using the new random auto-generated fallback)
  • Support for fate dice
  • Improved error catching and error messages
  • Multiple other bug fixes

In order to avoid a wall of text, I'm going to wrap up here. There are many other new features that came with version 1.0. BabylonJS finally did hit version 5.0. Yay! So this release will benefit from all the performance improvements in Babylon as well. I hope other devs find this project useful and that I'm able to continue to developing useful features.