Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
# OpenSpec Change: enterprise-gaming-r3f-shaders
- **Change ID**: enterprise-gaming-r3f-shaders
- **Package**: `@suaveplan/r3f-shaders`
- **Category**: gaming/effects
- **Target path**: `gaming/effects/r3f-shaders`
- **Status**: PROPOSED
- **Date**: 2026-04-24
---
## Summary
Deliver `@suaveplan/r3f-shaders` on the genesis branch from scratch at enterprise quality. The package provides a library of custom shader effects and materials for React Three Fiber: hologram, dissolve, outline, rim-light, toon, heat-distortion, and x-ray materials; GLSL utility functions (noise, rotation, gamma correction); a `ShaderMaterial` factory with hot-reload support in dev mode. Each shader is a typed React component that accepts uniform props. Genesis adds structured errors, and 100% coverage.
---
## Available workspace deps
`@suaveplan/error`, react, `@react-three/fiber`, `@react-three/drei`, three.
---
## Public API surface
```ts
function HologramMaterial(props: HologramMaterialProps): JSX.Element
function DissolveMaterial(props: DissolveMaterialProps): JSX.Element
function OutlineMaterial(props: OutlineMaterialProps): JSX.Element
function ToonMaterial(props: ToonMaterialProps): JSX.Element
function RimLightMaterial(props: RimLightMaterialProps): JSX.Element
function createShaderMaterial(vert: string, frag: string, uniforms?: Record<string, unknown>): THREE.ShaderMaterial
```
---
## File layout
```text
gaming/effects/r3f-shaders/
package.json / tsconfig.json / vitest.config.ts
src/
index.ts
types/common.ts + md
glsl/
noise.glsl.ts
utils.glsl.ts
materials/
hologram/ (tsx + md + test + stories + index)
dissolve/ (tsx + md + test + stories + index)
outline/ (tsx + md + test + stories + index)
toon/ (tsx + md + test + stories + index)
rim-light/ (tsx + md + test + stories + index)
utils/
shader-material-factory.ts + md + test
tests/integration.test.ts
```

View File

@@ -0,0 +1,21 @@
# Tasks: enterprise-gaming-r3f-shaders
## 0. Pre-flight (non-negotiable)
- [ ] 0.1 Confirm clean working tree (`git status` reports nothing) and no in-flight worktrees with uncommitted work (`git worktree list` then `git status` in each)
- [ ] 0.2 If any worktrees exist under `.claude/worktrees/`, account for each one: still-active agent, work-pending-merge, or stale-and-prune. Stale worktrees MUST be removed (`git worktree remove`) before opening a new one — code that has been lost twice on main is the failure mode this guards against.
- [ ] 0.3 Confirm the package set in `MANIFEST.md` matches `find packages -maxdepth 3 -name package.json` count. Drift here means a prior change archived without regenerating the manifest.
## Phase 1 — Scaffold + types + GLSL utils
## Phase 2 — `createShaderMaterial` factory + tests
## Phase 3 — Materials (each: component + GLSL + test + story)
- [ ] Hologram, Dissolve, Outline, Toon, RimLight
## Phase 4 — Pre-publish gate
- [ ] `bunx turbo lint typecheck test --filter=@suaveplan/r3f-shaders` green
- [ ] 100% coverage
- [ ] Publish: `bun scripts/publish.ts --package @suaveplan/r3f-shaders`