File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
apps/typegpu-docs/src/content/docs/tooling Expand file tree Collapse file tree 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
66import { FileTree } from ' @astrojs/starlight/components' ;
77import FileDiff from ' ../../../components/FileDiff.astro' ;
88
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.
1211
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
1416
15- Using npm:
17+ ## Installation
1618
19+ You can use it directly through ` npx ` :
20+ ``` bash
21+ npx tgpu-gen path/to/shader.wgsl
22+ ```
23+ Or install it globally:
1724``` bash
1825npm install -g tgpu-gen
26+ tgpu-gen path/to/shader.wgsl
1927```
2028
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-
2829## Example
2930
3031Let's assume the following directory structure:
You can’t perform that action at this time.
0 commit comments