# AGENTS.md

JavaScript 3D Library.

## Setup

```
npm ci
```

## Commands

```
npm run dev          # run locally
npm run start        # run the app
npm run build        # produce a build
npm run test         # run the test suite, must pass before any commit
npm run lint         # lint
npm run build-docs
npm run build-llms
npm run preview
```

## Layout

- `src/`      752 source files
- `examples/` 470 source files
- `test/`     295 source files
- `editor/`   122 source files
- `manual/`   36 source files
- `utils/`    8 source files

## Conventions

- Tests live alongside the code they cover, following `examples/materialx/standard_surface_color3_vec3_cm_test.mtlx`.
- CI defines what passing means. See `.github/workflows/ci.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- Generated output is committed (`build/`). Search will return the compiled copy, so edit the source, not that.
- `build/three.webgpu.js` is 2204KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
