# Basketball > A 3D browser reimplementation of basketball SHOOTING - the free throw, the NBA three-point > contest, around the world and HORSE - built at the dimensions of the FIBA Official Basketball > Rules. Pure client-side JavaScript with a hand-written WebGL2 renderer; no libraries, no network > calls, no model, no account, no cost. ## What is faithful, and to what Every dimension comes from an article of the FIBA Official Basketball Rules or its Basketball Equipment appendix, and the app names the article for each. The ring is a real TORUS of 18 mm steel with a 450 mm hole (Art. 1.2.1) whose top edge is 3.050 m up (Art. 1.2.4) and whose centre is 376 mm from the backboard face (Art. 1.2.5 gives 151 mm to the nearest inside point, not the 150 mm that circulates). The board is 1,800 x 1,050 mm with a 590 x 450 mm inner rectangle (Art. 1.1.3, 1.1.5). The free throw is taken 4.224 m from the ring centre - derived from Art. 2.5.3's 5.800 m and Equipment Art. 1.1.8's 1,200 m, and cross-checked against Art. 2.5.4's independent statement that the ring centre is 1.575 m inside the endline, which agrees to a millimetre. The goal test implements both clauses of Art. 16.1.1: the ball must enter FROM ABOVE and pass ENTIRELY through. Art. 16.1.2 makes that a statement about the ball, not its centre, so the centre must pass within 104.0 mm of the axis - the hole radius less the ball radius. ## The one number worth knowing about FIBA publishes no coefficient of restitution. It publishes a drop test (Equipment Art. 2.4): from 1,800 mm measured to the ball's UNDERSIDE, rebounding to 1,035-1,085 mm, ALSO to the underside. Both ends to the same surface, so the ball's radius cancels and e = sqrt(h/H) = 0.758 to 0.776. The NCAA writes the same test from the BOTTOM to the TOP, where a whole diameter has to come out, and gets 0.740 to 0.787 - a band containing FIBA's. Read the NCAA numbers as if they were centre heights and you get 0.825 to 0.866: 11% high in restitution, 23% high in energy. This app ships FIBA's band midpoint, 0.767, and its harness reproduces the test in the shipped integrator. The NBA rulebook, incidentally, has no drop test at all - only a 7.5 to 8.5 psi pressure clause. The 6 ft / 49-54 in test usually attributed to it is the NCAA's. ## What is reconstructed The net (a linear damper; Art. 1.3.1 says only that the net "checks the ball momentarily"), rim and board friction (no published measurement exists), the Magnus lift scale (no rotating-basketball wind tunnel exists; the scale is fitted to a published 5-15 cm displacement figure), around the world and everything in HORSE beyond the four rules the NBA published for its 2020 HORSE Challenge, the difficulty levels' error sigmas, and all colours except the ball's orange and the board's white lines. CREDITS.txt lists all of them. ## The optimisation The app searched its own engine for the release that maximises make probability under a stated release error, and compares it with Tran & Silverberg (J. Sports Sci. 26(11):1147-1155, 2008): 52 degrees against their 52, 7.27 m/s against their ~7.2, 4 cm beyond the ring centre against their "at least 5.3". Backspin is where they part - this engine finds a sharp knee at exactly their 3 Hz and then a shallow tail worth 4 more points out to 8 Hz, which agrees with Okubo & Hubbard rather than with Silverberg's plateau. Turning the Magnus force off leaves most of the gain, so the benefit is at the rim rather than in the air. ## Files - `/` the game - `/CREDITS.txt` every source by article, and every calibrated and reconstructed figure - `/LICENSE.txt` MIT, for the app's own code and art - `/js/basketball.js` the engine: pure, deterministic, DOM-free, SI units, mulberry32 seeding - `/js/render.js` the renderer: hand-written WebGL2, six primitives, one draw call - `/js/spec.js` the provenance register the Help panel prints ## Notes for machines There is no API and no model. The page runs entirely in the browser, stores nothing but your settings and best scores in localStorage, and makes no network request after load.