inspect-threejs-canvas.mjs

Tools · A check on the result · MIT

What it does

Opens a running page in headless Chromium, checks the canvas is not blank, and measures the picture: color entropy, share of the dominant color, edge density and luminance contrast, plus draw calls, triangles, geometries and textures against a desktop or phone budget. Writes a JSON report and a PNG per capture; a manifest file lets it capture several named states in one run. Works on any page; named states need the five test hooks.

Get it

node skills/threejs-qa-release/scripts/inspect-threejs-canvas.mjs --url http://<your-dev-server>:5188 [--mobile] [--state active-play] [--seed 42] [--manifest artifacts/evidence.json]

Source on GitHub
Needs

Node; @playwright/test and pngjs installed in the project; Chromium (npx playwright install --no-shell chromium)

License

MIT

License notes are on the pack's page

From

Three.js Game Skills

Everything from Three.js Game Skills in the gallery

Back to the Asset Library