Skip to content

Getting Started

Installing locally

Install TypeGPU using the package manager of your choice.

npm install typegpu

You can then import it in JavaScript/TypeScript code.

main.ts
import tgpu from 'typegpu';
// ...

Online sandbox

You can play with TypeGPU right in the browser using our StackBlitz example.

Troubleshooting

WebGPU types are not available

If WebGPU types, such as GPUDevice or GPUBuffer, are not recognized in your project, make sure to install the @webgpu/types npm package and include it as a type root in your tsconfig.json file.

{
"compilerOptions": {
"typeRoots": ["./node_modules/@webgpu/types", "./node_modules/@types"]
}
}

If you encounter any other issues, make sure to look into the rest of our docs, as well as the WebGPU or the react-native-wgpu documentations. For any further questions, you can contact us via the Software Mansion Community Discord or on GitHub.