Checks#

Radix has three sets of checks: core checks in Node (no browser), GPU checks in the browser on both backends, and a check of these docs. Performance is measured separately, by the benchmarks at the end.

WhatCommandNeeds
core checksnpm run check:coreNode
GPU checks, both backendsnpm run check:test (scripts/check-test.mjs)npm run build:test, npm run serve and Chrome
GPU checks, one backendopen http://localhost:8000/build/test/gpu/index.html?gpu=webgpu or ?gpu=webgpu-glnpm run build:test and npm run serve
example pages, both backendsnpm run check:examples (scripts/check-examples.mjs)npm run build, npm run serve and Chrome
docsnpm run check:docsNode
typesnpm run typecheck (tsconfig.lib.json, tsconfig.core.json, tsconfig.examples.json, tsconfig.test.json)Node
lintnpm run lint (the types, then eslint .)Node

check:core: core checks in Node#

npm run check:core (scripts/check-core.ts) runs without a browser. It checks:

tsconfig.core.json also typechecks the script, so its @ts-expect-error lines test the types.

/build/test/gpu/index.html: GPU checks in the browser#

/build/test/gpu/index.html?gpu=webgpu and ?gpu=webgpu-gl run the checks in test/gpu/: tests.ts, then splatTests.ts, shTests.ts, wgpuTests.ts, renderTests.ts, sceneTests.ts, and controlsTests.ts, with helpers in renderUtils.ts. ?run=0 loads the page without running them. The checks:

WebGPU only (wgpuTests.ts). These are skipped on WebGL2, where storage: true must throw instead:

Projection, sorting, and drawing (renderTests.ts; the WebGPU-only checks are skipped on WebGL2):

Collections, renderers, and views (sceneTests.ts):

snorm8 is skipped on WebGL2, where it cannot be read back. npm run check:test runs the page headless on both backends and prints the failures and totals (it needs npm run build:test and npm run serve).

The docs check#

npm run docs (scripts/build-docs.mjs) writes the HTML version of every page to docs/ref/, which is gitignored; npm run build runs it too. npm run check:docs (--check) writes the pages and fails when:

Benchmarks#

Performance is measured by benchmarks rather than by the checks: npm run bench:core (core benchmarks in Node, on files in splats/ or given with --file) and npm run bench -- --matrix <name> (/build/test/bench/index.html in headless Chrome, on the hosted samples). A summary of the results is in Performance. Radix is compared with SparkJS and PlayCanvas on the same scenes and camera paths in bench.html, the summary, and bench-report.html, every result.

Source: docs/checks.md