<!-- Generated by scripts/sync-agent-content.mjs. Edit the shared public sources, then regenerate. -->
# PaddockJS

A reusable racing simulation for browsers and headless experiments.

- Dates: 2026
- Status: Open-source package
- Areas: Software engineering; AI / ML
- Stack: JavaScript · PixiJS
- Topics: JavaScript; PixiJS; Simulation; Web/API; Developer Tools; Games
- Public case study: https://mgiorgetti.com/project_details/project-paddockjs.html

## Problem

A racing simulation needs to support an interactive browser presentation and programmable experiments without maintaining separate simulation models.

## Contribution

Built a reusable JavaScript/PixiJS racing simulator with composable browser views and a shared headless reset/step API.

## Technical approach and public case study

The racing simulator behind this site’s project race. Use the full race view, arrange its components yourself, or run the simulation without a browser.

- Creator & maintainer

- JavaScript · PixiJS 8

- Apache-2.0

Both interfaces use the same simulation. Rendering belongs to the browser side.

### Full race view or individual components

#### A complete race

The complete browser view includes the track, cars, controls, and timing. On this site, selecting a driver opens its project.

#### Individual components

Mount the race canvas, timing, controls, and telemetry into separate parts of a page. A shared controller keeps each view connected to the same race.

### Headless control and browser playback

The headless environment exposes reset and step operations for custom controllers. It runs without PixiJS or a browser, with observations and actions for testing driving policies.

Bring the controller back to browser playback to inspect its braking, track limits, and recovery.

### Browse the grid without changing the race

Grid Walk presents the starting grid as an explorable project index. Switching between that view and the race preserves simulation time, random state, laps and pit state. Browsing is a presentation change, rather than a new simulation.

### A shared model with explicit boundaries

#### Arcade and advanced physics

The advanced mode models tire forces, combined grip, wheel geometry and contact impulses. It supports repeatable simulation experiments; it is not a calibrated replica of a real Formula 1 car.

#### Repeatable policy evaluation

Seeded scenarios, controlled drivers and reset/step observations let an external policy interact with the same core used in browser playback. Packaging checks exercise the browser, data and headless import boundaries.

## Results and limitations

The package powers this portfolio's project race. Its advanced physics supports repeatable experiments; it is not a calibrated model of a real Formula 1 car.

## Public supporting links

- [Portfolio case study](https://mgiorgetti.com/project_details/project-paddockjs.html)
- [View source](https://github.com/Inventure71/PaddockJS)
- [Open npm package](https://www.npmjs.com/package/@inventure71/paddockjs)
- [Matteo Giorgetti profile](https://mgiorgetti.com/profile.md)
