Bricks, its physics in Hazel
Hazel activities › Physics simulation · source on GitHub · hazeljs on npmMove the paddle under the ball and keep it in play: drag along the field, or ⬅️ ➡️; tap the field, ⬆️, or Enter to send the ball off; the space bar pauses. Where the ball meets the paddle sets its angle: near an end, off to that side. A brick takes one hit or two (the darker ones); grey posts never break. Break every brick to go on to the next of six levels. The levels, each step of the ball and the robot that plays for you are all Hazel (bricks/rules/Bricks.hz).
This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).
The vocabulary the module sees (bricks/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor; an edit changes the next step (interpreted, so slower).
loading preamble.hz…
loading Bricks.hz…
hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words, the icon) · by Matthew Hammer · an example for hazeljs