Radix examples

Pages built on the @sparkjsdev/radix library bundle: static HTML and JavaScript with an import map, no server code needed. Their sources are TypeScript in examples/; npm run build builds the bundle and these pages (types stripped, file by file) into dist/ and build/examples/, and npm run serve serves the repo. Each page runs on WebGPU; its WebGL2 link starts it on three's WebGL2 backend (?gpu=webgpu-gl), which sorts on the CPU. The MPM water simulation needs WebGPU's compute shaders.

DocumentationHow Radix works, the API reference, recipes, and the comparison with SparkJS. Spark examplesThe SparkJS 2.3.1 examples ported to Radix as it is, with what Radix lacks for the rest.

Examples

The viewers' samples are single-file RDX files of ext splats: butterfly-ai.rdx and ceramic.rdx without spherical harmonics, and scans with SH3 (extSh, in rdx-sh/): sutro-2m.rdx, and in the splats viewer also grace-interior-10m.rdx, bicycle.rdx and garden.rdx. ?url= opens any other file, its spherical harmonics included. The SOG and LCC viewers have samples of their own. The Doom and Quake pages read their levels from the same hosted folder (built by the original Radix repo's tools); ?data=<url> reads a copy from elsewhere. The GPU test and benchmark pages (build/test/gpu/index.html, build/test/bench/index.html, from test/) are bundled from the library's sources by npm run build:test: the tests reach into its internals, outside the bundle.

Spark examples on Radix

Each line opens the port on WebGPU, or on WebGL2. The full list also has the examples that are not ported and why, Spark's sources, and the shared helpers.