This is an open-source project bringing unsophisticated billiards physics written in typescript to a browser near you. Play pool, snooker, or 3-cushion online for free!
- Backspin and sidespin well modeled.
- Presentation using WebGL in any modern browser on mobile, linux, mac or windows.
- Record and playback breaks.
- Two player online mode with node websocket server.
- Nine ball, Snooker and three cushion billiards rules.
- Deploys to github pages, vercel.com and render.com with github actions.
Demos run in all major desktop and mobile browsers and uses WebGL
- Nine ball ⬀ make a break and share replay link with friends
- Three cushion billiards ⬀ the ultimate test of physics and player (average on both counts)
- Snooker ⬀ we await the first 147 submission to the leaderboard.
- 4-ball Straight pool ⬀.
- Inspect physics and tweak constants using diagrams.
- Try to get on the leaderboard of highest breaks hosted on vercel.com
- Try two player online hosted on render.com
- Papers on ball mechanics Han 2005 with important corrections by Kiefl.
- cushions, max spin, simulation and constants 1 2 3 4 5
- 3D graphics uses three.js
- Inline LaTeX editor for equations in README.md
Based on Han 2005 paper
where
nvm use v18.17.1
yarn install
yarn dev
yarn gltfpack
This generates artefacts in /dist for prod deployment (e.g. on github static pages)
yarn serve
Then open http://localhost:8080/ in your browser to play
yarn test
yarn coverage
yarn deps
yarn upgrade -L
yarn prettify
yarn websocket
the client uses query parameter ?websocketserver=wss://some-host
to locate
a websocket server, open http://localhost:8888/dist/multi.html to see options
Use mouse, touch screen or keyboard:
⇦ ⇨ Aim
Control ⇦ ⇨ Fine aim
⇧ ⇩ Topspin and backspin
Shift ⇦ ⇨ Side spin
Space Hit - hold for more power
July 2018
July 2019
March 2021
August 2023 (mobile)
top | aim |
---|---|
![]() |
![]() |
Star History
This project is open source and licensed under the GNU General Public License - see the LICENSE file for details. Contributions welcome.