๐บ 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!