3d-dice / dice-box-threejs

3D Dice implemented with ThreeJS and Cannon ES
MIT License
34 stars 12 forks source link

Handle multiple rolls with different dice textures #6

Open pachyderme opened 1 year ago

pachyderme commented 1 year ago

Hello, your library is awesome !

Is it possible to throw multiple roll at same time with different dice configuration ? (colors, textures...) I searched in your code and tried to update the configuration after a roll but without any success.

Dyljyn commented 10 months ago

+1 I'm looking for the same

frankieali commented 10 months ago

Hey. I think this is possible. Is this what you're looking for? https://codesandbox.io/p/sandbox/three-rolls-wlmscc

edit: Sorry, I forgot to check which repo this was in. It is possible with my original dice-box. Not sure with dice-box-threejs. I'll have to dig into that, but I suspect that only one roll can be run at a time.

frankieali commented 10 months ago

Sorry, but it looks like dice groups and multiple dice themes are not supported in this code base.

frankieali commented 10 months ago

You could run multiple Dice Boxes so it appears that they are all rolling in the same space. However, there will be no physics interaction between dice in the different boxes. The dice might also render over top of each other. https://codesandbox.io/p/sandbox/multiple-rolls-lys936

azriel49 commented 1 month ago

No plan to implement this feature ? I need it so much. :p