0.0.17 • Published 1 year ago

realm15-dicebox v0.0.17

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

realm15-dicebox

3D Dice implemented with ThreeJS and Cannon ES

Based on Major's 3D Dice and https://github.com/3d-dice/dice-box-threejs

Install using NPM

npm i realm15-dicebox

Config Options

const defaultConfig = {
	framerate: (1/60),
	sounds: false,
	volume: 100,
	color_spotlight: 0xefdfd5,
	shadows: true,
	theme_surface:  "green-felt",
	sound_dieMaterial: 'plastic',
	theme_customColorset: null,
	theme_colorset: "white",
	theme_texture: "",
	theme_material: "glass", // "none" | "metal" | "wood" | "glass" | "plastic"
	gravity_multiplier: 400,
	light_intensity: 0.7,
	baseScale: 100,
	strength: 1, // toss strength of dice
	onRollComplete: () => {}
}

Predetermined Outcomes

The notation to roll your predetermined outcomes looks like this:

Box.roll("6d6@4,4,4,4,4,4") // rolls six dice that will land on 4's
0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago