webgpu-seed
πΊπ± An example on how to render a hello triangle with WebGPU.
πΊ WebGPU Seed
A WebGPU repo you can use to get started with your own renderer.
Setup
First install:
-
A Text Editor such as Visual Studio Code.
Then type the following in any terminal your such as VS Code's Integrated Terminal.
# π Clone the repo git clone https://github.com/alaingalvan/webgpu-seed # πΏ go inside the folder cd webgpu-seed # π¨ Start installing dependencies, building, and running at localhost:8080 npm start
Refer to this blog post on designing web libraries and apps for more details on Node.js, packages, etc.
Project Layout
As your project becomes more complex, you'll want to separate files and organize your application to something more akin to a game or renderer, check out this post on game engine architecture and this one on real time renderer architecture for more details.
ββ π node_modules/ # πΆ Dependencies β ββ π gl-matrix # β Linear Algebra β ββ π ... # π Other Dependencies (TypeScript, Webpack, etc.) ββ π src/ # π Source Files β ββ π index.html # π Main HTML file β ββ π renderer.ts # πΊ Triangle Renderer ββ π .gitignore # ποΈ Ignore certain files in git repo ββ π package.json # π¦ Node Package File ββ π license.md # βοΈ Your License (Unlicense) ββ πreadme.md # π Read Me!
more like this
aperture
WebGPU-only, ECS-native 3D runtime where simulation is authoritative and rendering is a derived view.