Untitled
This example shows a static soccer pitch drawn on a Canvas element, with a white ball and a player marker that move toward a target point. The pitch includes all standard markings—midline, center circle, penalty areas, goal boxes, and corner arcs—rendered with Canvas 2D `rect`, `arc`, and `lineTo` calls. A `requestAnimationFrame`-driven loop animates the ball’s movement, which uses trigonometry to calculate direction and applies a speed decay factor, while the player moves linearly toward its destination. The code uses plain JavaScript and the Canvas API directly without any external libraries.