File tree 1 file changed +13
-12
lines changed
apps/typegpu-docs/src/content/docs/tooling
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -6,25 +6,26 @@ description: A guide on how to use the TypeGPU Generator CLI
6
6
import { FileTree } from ' @astrojs/starlight/components' ;
7
7
import FileDiff from ' ../../../components/FileDiff.astro' ;
8
8
9
- TypeGPU Generator (tgpu-gen) is a command-line interface for the TypeGPU code generator.
10
- It provides a way for a highly automated migration process and is a great tool
11
- for existing WebGPU projects that want to start taking advantage of type-safe TypeGPU features.
9
+ TypeGPU Generator (tgpu-gen) is a CLI companion tool that transforms WGSL code files into
10
+ matching TypeGPU definitions. It can be used for integrating TypeGPU into established WebGPU projects, or automating the migration process.
12
11
13
- ## Installation
12
+ - ✨ Generate TypeGPU definitions from WGSL shaders
13
+ - 👀 Continuously watch for changes in WGSL files and update the generated definitions
14
+ - 🌲 Specify input and output using glob patterns
15
+ - 🎯 Choose the output extension and CJS or ESM format
14
16
15
- Using npm:
17
+ ## Installation
16
18
19
+ You can use it directly through ` npx ` :
20
+ ``` bash
21
+ npx tgpu-gen path/to/shader.wgsl
22
+ ```
23
+ Or install it globally:
17
24
``` bash
18
25
npm install -g tgpu-gen
26
+ tgpu-gen path/to/shader.wgsl
19
27
```
20
28
21
- ## Feature overview
22
-
23
- - Generate TypeGPU definitions from WGSL shaders
24
- - Continuously watch for changes in WGSL files and update the generated definitions
25
- - Specify input and output using glob patterns
26
- - Choose the output extension and CommonJS or ES module format
27
-
28
29
## Example
29
30
30
31
Let's assume the following directory structure:
You can’t perform that action at this time.
0 commit comments