Skip to content

Add mouse events for hover and click - #17

Open
drdreo wants to merge 14 commits into
3d-dice:mainfrom
drdreo:main
Open

Add mouse events for hover and click#17
drdreo wants to merge 14 commits into
3d-dice:mainfrom
drdreo:main

Conversation

@drdreo

@drdreo drdreo commented Mar 29, 2025

Copy link
Copy Markdown

I have had the needs to have a player select dice they want to re-roll or put aside for later rolls.
Let me know if you think this would be a nice addition to this library or if i should publish a new package myself.

  • adds hover detection of dice
  • adds click event on dice
  • adds custom highlight possibility
  • improved playground with a predefined index.html - pnpm dev and it opens the page
  • added TypeScript typings

Edit: published as a new package, but would be glad if we have less duplicate packages

@Heilemann

Copy link
Copy Markdown

I love this; so much more intuitive to be able to interact with them as you would real dice.

@drdreo

drdreo commented Nov 22, 2025

Copy link
Copy Markdown
Author

Published it as a new package in the meantime https://www.npmjs.com/package/@drdreo/dice-box-threejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants