Initial Commit
This commit is contained in:
53
openspec/changes/enterprise-gaming-r3f-parallax/proposal.md
Normal file
53
openspec/changes/enterprise-gaming-r3f-parallax/proposal.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# OpenSpec Change: enterprise-gaming-r3f-parallax
|
||||
|
||||
- **Change ID**: enterprise-gaming-r3f-parallax
|
||||
- **Package**: `@suaveplan/r3f-parallax`
|
||||
- **Category**: gaming/effects
|
||||
- **Target path**: `gaming/effects/r3f-parallax`
|
||||
- **Status**: PROPOSED
|
||||
- **Date**: 2026-04-24
|
||||
- **Reference spec**: `/mnt/s/web/suaveplan/enterprise/r3f-parallax.md`
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
Deliver `@suaveplan/r3f-parallax` on the genesis branch from scratch at enterprise quality. The package provides interior parallax components for React Three Fiber: `WindowParallax` (shared ray-marched room behind an array of portal quads using a single depth-layered texture atlas) and `GridParallax` (tiled M×N grid of parallax rooms on one plane). Both components are GPU-friendly, declarative R3F JSX. Configurable: lighting within rooms, depth layers, room-layout generation, and texture-atlas helpers. Storybook-driven with interactive controls for room parameters. 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 WindowParallax(props: WindowParallaxProps): JSX.Element
|
||||
// columns, rows, roomDepth, atlasTexture, lightColor, lightIntensity
|
||||
|
||||
function GridParallax(props: GridParallaxProps): JSX.Element
|
||||
// tileSize, roomDepthLayers, atlas
|
||||
|
||||
function generateRoomAtlas(rooms: RoomDefinition[], options: AtlasOptions): AtlasResult
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## File layout
|
||||
|
||||
```text
|
||||
gaming/effects/r3f-parallax/
|
||||
package.json / tsconfig.json / vitest.config.ts
|
||||
src/
|
||||
index.ts
|
||||
types/common.ts + md
|
||||
shaders/parallax.vert.ts + parallax.frag.ts
|
||||
utils/room-atlas-generator.ts + md + test
|
||||
components/
|
||||
WindowParallax/ (tsx + md + test + stories + index)
|
||||
GridParallax/ (tsx + md + test + stories + index)
|
||||
tests/integration.test.ts
|
||||
```
|
||||
21
openspec/changes/enterprise-gaming-r3f-parallax/tasks.md
Normal file
21
openspec/changes/enterprise-gaming-r3f-parallax/tasks.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Tasks: enterprise-gaming-r3f-parallax
|
||||
|
||||
## 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 + parallax shaders
|
||||
|
||||
## Phase 2 — Room atlas generator utility
|
||||
|
||||
## Phase 3 — `WindowParallax` component + story
|
||||
|
||||
## Phase 4 — `GridParallax` component + story
|
||||
|
||||
## Phase 5 — Pre-publish gate
|
||||
|
||||
- [ ] `bunx turbo lint typecheck test --filter=@suaveplan/r3f-parallax` green
|
||||
- [ ] 100% coverage
|
||||
- [ ] Publish: `bun scripts/publish.ts --package @suaveplan/r3f-parallax`
|
||||
Reference in New Issue
Block a user