Contributors and other interested parties are welcome, but should not expect production-ready code and documentation.
There are a bunch of examples included in the demo app, which you can explore and tweak to become familiar with the library.
Use.GPU is still an alpha, but significant parts of its API have already stabilized. Until it reaches 1.0, breaking changes should be expected, but will be documented.
Not all contributions need to be in the main repo. Use.GPU heavily encourages using modules to assemble your solution à la carte. The built-in workbench components are just one way of doing things.
Questions? Join Use.GPU Discord
Here are some projects and initiatives that would be cool to work on:
Use.GPU has mainly been tested on webpack
with babel
. Other build systems and transpilers are untested or unsupported. New loader plug-ins, and/or guides on how to configure them for a certain target, are most welcome.
The data-driven geometry components are fully functional, suitable for both technical and mathematical use. Building or replicating common visualizations as examples would help a lot, both to test the library and to figure out what to prioritize.
A shader toy-like environment for WGSL / WebGPU, using the shader linker to do all the hard work. See if you can use the built-in render-to-texture components. RTT hasn't been used for anything really complicated, so this will likely reveal a few blind spots.
Basic Mapbox Vector Tiles support exists in @use-gpu/map
in alpha form. It can render styled lines and polygons, but no text or markers. This package also needs to be extended to allow control over what is rendered and how.
Use.GPU Plot is a continuation of MathBox, though only some of its components have been ported so far. A few nice pieces are missing: the set of 4D views, the array slicing/swizzling/resampling operators, etc. Use.GPU also has a basic implementation of e.g. presentation slides. Port MathBox 2 - The Good Parts to Use.GPU.
The repo is structured as a Yarn Workspace:
Code
/examples
- Example scaffolds/packages
- Main TS packages/public
- Assets for demo app/rust
- WASM/Rust codeMaintenance
/build
- Build output (generated)/scripts
- Build scripts/test
- Integration testsThe repo is a typical TS → JS build, but with additional requirements:
.wgsl
shaders into TS modules@use-gpu/glyph
)This is why the build process is pretty involved.
During development, the top-level webpack
server can build the entire workspace directly from the TS source. This allows for hot-reload.
This is the easiest way (yarn dev
).
To build the final packages:
yarn build
dispatches a yarn build
of each package/build/packages/$pkg
according to its own package.json
/scripts
:
/build/ts/$pkg
./build/packages/$pkg/mjs/
(ESM) + /build/packages/$pkg/cjs/
(CommonJS)package.json
is built from the source, with TS references/exports replaced by JS.Exceptions:
@use-gpu/wgsl
contains shaders in .wgsl
source form. It has a custom build step to generate the matching .d.ts
files.