This is post is part of the ‘one threex a day’ challenge. This challenge is to publish every day one game extension for three.js! One per day, every day and that for 2month! In this post, we gonna talk about threex.poolball. threex.poolball is a three.js games extension which helps you build pool balls. It provides dynamically generated models of pool balls, so no model download needed. It may be fun to play with when you start with three.js, funnier than a plain sphere for sure :) You can use it for your bar games, having your characters bet when playing pool, or even your Marble Table games, as I did, adding cool granular sounds when the balls roll.
To see the other posts about one threex a day and forget our moto! “A THREEx extension a day, gets your game on its way!”
Show Don’t Tell
- examples/basic.html [view source] : It shows a basic usage of this extension
- examples/demo.html [view source] : It shows multiple pool balls setup like on a pool table :)
How To Install It
You can install it via script tag
Or you can install with bower, as you wish.
How To Use It
Here is the default usages
this is with custom arguments
1 2 3 4 5 6
Some ball description are already done.
cuewill return an unstripped white ball
blackwill return an unstripped black ball
9will assign the official colors for nine-ball pool