Skip to content

robotlabs/gpu-lab

Repository files navigation

WebGPU Playground

A low-level playground to experiment with the WebGPU API.
This project initializes a WebGPU context and provides rendering primitives such as cubes, textured or solid planes, and animated pixel grids.


Working on: interaction. Time to build a game with this

πŸš€ Getting Started

# Install dependencies
yarn

# Start the development server
yarn serve

πŸ“ Project Structure

gpu-lab/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ gpulab/
β”‚   β”‚   β”œβ”€β”€ core/          # webgpu engine
β”‚   β”‚   β”‚   β”œβ”€β”€ camera/
β”‚   β”‚   β”‚   β”œβ”€β”€ engine/
β”‚   β”‚   β”‚   β”œβ”€β”€ scene/
β”‚   β”‚   β”‚   β”œβ”€β”€ ...../
β”‚   β”‚   β”œβ”€β”€ objects/        # Cubes, planes, grids
β”‚   β”‚   β”‚   β”œβ”€β”€ cubes/
β”‚   β”‚   β”‚   β”œβ”€β”€ grids/
β”‚   β”‚   β”‚   β”œβ”€β”€ planes/
β”‚   β”œβ”€β”€ gui/                # GUIView and parameter controls (tweakpane)
β”‚   β”œβ”€β”€ shaders/            # WGSL shader modules
β”‚   └── main.ts             # Application bootstrap
β”œβ”€β”€ index.html              # HTML entry point
β”œβ”€β”€ tsconfig.json           # TypeScript configuration
β”œβ”€β”€ vite.config.ts          # Vite bundler configuration
└── package.json            # Project metadata and dependencies

✨ Features

  • WebGPU rendering context
  • Cubes, planes and grids rendering with WGSL shaders
  • Real-time camera and object control via Tweakpane
  • GSAP integration for smooth animations
  • Modular structure to support shader and object experimentation

πŸ› οΈ Built With


πŸ“„ License

MIT Β© robotlabs

About

webGPU Playground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published