# OpenSpec Change: enterprise-gaming-r3f-character - **Change ID**: enterprise-gaming-r3f-character - **Package**: `@suaveplan/r3f-character` - **Category**: gaming/character - **Target path**: `gaming/character/r3f-character` - **Status**: PROPOSED - **Date**: 2026-04-24 - **Reference spec**: `/mnt/s/web/suaveplan/enterprise/r3f-character.md` --- ## Summary Deliver `@suaveplan/r3f-character` on the genesis branch from scratch at enterprise quality. The package provides a full character controller for 3D games in React Three Fiber. It wires `@suaveplan/character-physics` (capsule controller) to a Rapier rigid body via the `@suaveplan/r3f-physics-rapier` backend; drives Three.js `AnimationMixer` for locomotion blend tree (idle/walk/run/jump/fall); applies `@suaveplan/animation-events` foot IK and procedural modifiers; and exposes a `Character` component and `useCharacter()` hook. Genesis adds structured errors, OTel frame-time histogram, and 100% coverage. --- ## Available workspace deps `@suaveplan/error`, `@suaveplan/types`, `@suaveplan/character-physics`, `@suaveplan/animation-events`, `@suaveplan/ik-solver`, `@suaveplan/events`, `@suaveplan/r3f-physics-rapier`, react, `@react-three/fiber`, `@react-three/drei`, three. --- ## Public API surface ```ts function Character(props: CharacterProps): JSX.Element // model, animations, controller, physicsBackend function useCharacter(): CharacterContext // position, velocity, isGrounded, activeAnimation, playEmote() ``` --- ## File layout ```text gaming/character/r3f-character/ package.json / tsconfig.json / vitest.config.ts src/ index.ts / error-codes.ts types/common.ts + md core/ locomotion/ (ts + md + types + test + index) animation-mixer-driver/ (ts + md + test + index) context/ character-provider.tsx + md + test hooks/use-character.ts + md + test components/ Character/ (tsx + md + test + stories + index) tests/integration.test.ts ```