Skip to main content
Version: 1.0.14

Intro

Do you love TTRPGTable Top Role Playing Game and wish you had some 3D dice to incorporate into your side projects? That's exactly why I started this project. This is a high performance 3D dice roller made with BabylonJS, AmmoJS and implemented with lightning fast web workers and offscreenCanvas. Designed to be easy to integrate into your own JavaScript app with a package payload under 1 megabyte after compression.

Open Source

Everything in the @3d-dice suite falls under the MIT license or the CC0 license license. This means it's free for commercial use and redistribution. I've benefited from open source software for years and this is my "give back".

Die Types

This documentation makes frequent reference to common dice notations such as 5d6 where the first number represents the number of dice to roll and the d# represents the number of sides on a die. The default theme dice are d4, d6, d8, d10, d12, d20, and d100.

Feature Requests

This project id under active development with more features in the pipeline. Feel free to add feature requests into the Github issue tracker.

Show me some code

See the kitchen sink code demo here: https://codesandbox.io/s/3d-dice-demo-v1-0-2-sm4ien

Here's a simple React Demo for rolling attributes (using 3d6): https://codesandbox.io/s/react-roller-attributes-v1-0-2-65uqhv

Here's a React Demo with support for advanced dice notation: https://codesandbox.io/s/react-roller-advanced-notation-v1-0-2-rz0nmr