How mohaminebrs/codrops-noise-transition works
This React/Three.js WebGL experiment renders an interactive energy-can model over a procedural radial-noise background. The user workflow enters through the app, reaches the 3D scene, and uses clicks to trigger model texture transitions or background color/progress changes; presentation controls allow the model to be manipulated. Separate shader materials implement the two visual effects, sharing procedural noise and palette data, while a small Zustand store gates animation. The README also identifies the can model and radial-noise effect as core capabilities. Arrows reflect shown imports, rendering composition, and state use; sampled files do not establish a direct connection between the frame’s button and canvas clicks.
Main entry points: Model.jsx Can Model · Background.jsx Radial Background · Scene.jsx Scene Canvas · App.jsx App Shell
Components 13
Application
- React Entry
src/main.jsx - App Shell
src/App.jsx - Demo Frame
src/CodropsFrame.jsx
3D Scene
- Scene Canvas
src/Scene.jsx - Can Model
src/Model.jsx
Visual Effects
- Radial Background
src/Background.jsx - Background Shader
src/BackgroundMaterial.js - Noise Functions
src/Noise.js
Shared State and Assets
- Can Asset
src/assets/models/energy-can.glb - HDR Environment
src/assets/envMap/potsdamer_platz_0.256k.hdr - Color Palette
src/data.js - Play State
src/store.js
Other components
- Visitor
Connections 16
- React Entry → App Shell: renders
src/main.jsx - App Shell → Demo Frame: renders
src/App.jsx - App Shell → Scene Canvas: renders
src/App.jsx - Scene Canvas → Can Model: renders
src/Scene.jsx - Scene Canvas → Radial Background: renders
src/Scene.jsx - Scene Canvas → HDR Environment: loads
src/Scene.jsx - Can Model → Can Asset: loads
src/Model.jsx - Can Model → Noise Functions: uses
src/Model.jsx - Radial Background → Background Shader: uses
src/Background.jsx - Background Shader → Noise Functions: uses
src/BackgroundMaterial.js - Can Model → Color Palette: reads
src/Model.jsx - Radial Background → Color Palette: reads
src/Background.jsx - Can Model → Play State: reads and updates
src/Model.jsx - Radial Background → Play State: reads
src/Background.jsx - Visitor → Can Model: clicks to transition
src/Model.jsx - Visitor → Radial Background: clicks to recolor
src/Background.jsx