TypeGPU を中心に技術を学びながら、Web での表現方法を模索する Playground プロジェクトです。
このプロジェクトは、Next.js、TypeScript、TailwindCSS を基盤とし、TypeGPU(WebGPU/WGSL)を中心に、CSS filter/backdrop-filter、Canvas API も組み合わせて靄・ブラー表現とアニメーションを実装する Playground です。
- Next.js 16 (App Router)
- TypeScript
- TailwindCSS
- TypeGPU - WebGPU API の型安全ラッパー
- @webgpu/types - WebGPU 型定義
- WebGPU API - WGSL シェーダー
- 靄表現 (Fog Effect) - ノイズベースの靄効果
- ブラー表現 (Blur Effect) - ガウシアンブラー効果
- アニメーション効果 - 時間に基づく動的な色とブラーの組み合わせ
filter: blur()- 要素全体にブラーを適用backdrop-filter: blur()- 背景にブラーを適用- 動的なブラー強度の調整
- Canvas 2D API を使ったブラー表現
- アニメーションループ
- リアルタイムでのブラー強度の調整
- Node.js 20.9.0 以上
- WebGPU をサポートするブラウザ(Chrome 113+, Edge 113+, Safari 18+)
npm installnpm run devブラウザで http://localhost:3000 を開きます。
playground-type-gpu/
├── app/
│ ├── layout.tsx
│ ├── page.tsx (メインPlayground)
│ ├── typegpu/
│ │ ├── page.tsx (TypeGPU基本サンプル)
│ │ ├── fog/
│ │ │ └── page.tsx (靄表現)
│ │ └── blur/
│ │ └── page.tsx (ブラー表現)
│ ├── css/
│ │ └── page.tsx (CSS filterサンプル)
│ └── canvas/
│ └── page.tsx (Canvas APIサンプル)
├── components/
│ ├── typegpu/
│ │ ├── FogEffect.tsx
│ │ ├── BlurEffect.tsx
│ │ └── AnimatedEffect.tsx
│ ├── css/
│ │ └── BlurEffect.tsx
│ ├── canvas/
│ │ └── CanvasBlur.tsx
│ └── common/
│ └── WebGPUCheck.tsx
├── shaders/
│ ├── fog.wgsl
│ ├── blur.wgsl
│ └── animated.wgsl
└── lib/
└── typegpu-setup.ts
MIT