Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alaingalvan/webgpu-seed
πΊπ± An example on how to render a hello triangle with WebGPU.
https://github.com/alaingalvan/webgpu-seed
definitions dts types typescript typescript-definitions typings webgpu
Last synced: 20 days ago
JSON representation
πΊπ± An example on how to render a hello triangle with WebGPU.
- Host: GitHub
- URL: https://github.com/alaingalvan/webgpu-seed
- Owner: alaingalvan
- License: unlicense
- Created: 2019-12-20T04:49:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T21:56:31.000Z (over 1 year ago)
- Last Synced: 2024-07-31T19:49:50.369Z (4 months ago)
- Topics: definitions, dts, types, typescript, typescript-definitions, typings, webgpu
- Language: TypeScript
- Homepage: https://alain.xyz/blog/raw-webgpu
- Size: 185 KB
- Stars: 296
- Watchers: 7
- Forks: 28
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
- awesome - alaingalvan/webgpu-seed - πΊπ± An example on how to render a hello triangle with WebGPU. (TypeScript)
README
![Cover Art](https://alain.xyz/blog/raw-webgpu/assets/cover.jpg)
# πΊ WebGPU Seed
[![License][license-img]][license-url]
[![Unit Tests][travis-img]][travis-url]A WebGPU repo you can use to get started with your own renderer.
- [π³ Codepen Example](https://codepen.io/alaingalvan/pen/GRgvLGw)
- [π¬ Blog Post](https://alain.xyz/blog/raw-webgpu)
## Setup
First install:
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/en/)
- A Text Editor such as [Visual Studio Code](https://code.visualstudio.com/).
Then type the following in any terminal your such as [VS Code's Integrated Terminal](https://code.visualstudio.com/docs/editor/integrated-terminal).
```bash
# π 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](https://alain.xyz/blog/designing-a-web-app) 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](https://alain.xyz/blog/game-engine-architecture) and this one on [real time renderer architecture](https://alain.xyz/blog/realtime-renderer-architectures) for more details.
```bash
ββ π 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!
```[license-img]: https://img.shields.io/:license-unlicense-blue.svg?style=flat-square
[license-url]: https://unlicense.org/
[travis-img]: https://img.shields.io/travis/com/alaingalvan/webgpu-seed.svg?style=flat-square
[travis-url]:https://www.travis-ci.com/github/alaingalvan/webgpu-seed