Packaging, distribution, portability
The switch to vite simplified the project's build and test cycle enormously, and afforded some big changes:
- The bundled distros' asset caches are now preloaded with the shaders
- the REGL and WebGPU renderers are now vanilla JS classes
-
startandstopmethods control a single RAF, so configuring creates a new render function instead of a new RAF. (This code will get cleaner shortly.) - the WebGPU renderer debounces when the config changes rapidly, such as when responding to sliders, by detecting when the scoped config is stale and returning early.
-
- the React component also does some debouncing when swapping the renderer.
The React component test app contains some additional inputs to really put the renderers through their paces, and to help identify lingering problems. Currently, I believe there are none. But as soon as we add a speed control slider, it'll get wacky again, because currently each timed phenomenon (glyph cycling, rain falling, forward motion) uses a multiple of the current time instead of an accumulation of the multiplied delta time. The renderer base class will probably wind up governing speeds for this reason.
I'll keep the PR open for a week or so, in case @nohren has questions or feedback. Afterward, PRs should be much much smaller.