Skip to content

justinhardin/p5js-diceroller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dice Roller

Diceroller is a simple p5.js sketch that rolls a 3d die and keeps track of the rolled value

Drag Racing

To install

  1. npm install (installs dependencies)
  2. npm run build (builds the dist folder)

To run

  1. npm run start (starts up a local webpack dev server)

To use

  1. This component will render inside of an element with the id 'diceroller-container'
  2. One running, click anywhere in the sketch to roll. The dice will slow down and 'snap' to a face, and the fallow should appear in the lower right corner.
  3. With the sketch 'in focus' hit the space bar, this will pause the roll

That's it!