Unsophisticated billiards with spinning ball physics written in typescript.
- Backspin and sidespin well modeled.
- Presentation using WebGL in any modern browser or mobile.
- Record and playback breaks.
- Two player online mode with node websocket server.
- Nine ball and three cushion billiards rules
Demos run in all major browsers and use WebGL
- Nine ball ⬀
- Three cushion billiards ⬀.
- 6-red Snooker ⬀.
- 4-ball Straight pool ⬀.
- Inspect physics using diagrams.
- Compare highest breaks
- 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
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 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