A React Three Fiber project that creates immersive ice/frost visual effects when wrapping content with the <Frozen> component. This project transforms any 3D scene into a frozen winter wonderland with realistic ice textures, frost effects, and interactive touch-based audio feedback.
Basic usage:
<Frozen>
<MainScene />
</Frozen>- React Three Fiber: 3D rendering framework
- Three.js: WebGL 3D library
- TypeScript: Type-safe development
- Zustand: State management
- GSAP: Animation library
- Vite: Build tool and dev server
The frost effect is achieved through multiple rendering passes:
- Scene Rendering: Base scene content
- Blur Effects: Multi-pass blur for depth
- Frost Overlay: Ice crystal textures and normal maps
- Noise Generation: Procedural frost patterns
- Interactive Pointer: Touch-responsive frost spreading
- Final Composition: Combined output with lighting effects
-
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Build for production:
npm run build
src/
├── Frozen/ # Core frost effect system
│ ├── components/ # UI components
│ ├── hooks/ # Custom React hooks
│ ├── materials/ # Shader materials
│ └── utils/ # Utility functions
├── MainScene/ # Example scene implementation
└── UI/ # User interface components
The frost effect can be customized through various parameters:
- Frost intensity and spread patterns
- Ice crystal textures and normal maps
- Interactive response sensitivity
- Visual blur and distortion levels
Experience the magic of interactive frost effects in your browser! ❄️✨