An interactive 3D scene built with React Three Fiber featuring a skybox environment, a real-time reflective sphere, and a rotating cube. Based on Paul Henschel's cube camera / render target example.
The scene includes:
- A 360° skybox made from 6 cubemap textures
- A reflective sphere that captures the environment in real time
- A rotating cube with standard lighting
- Mouse-controlled orbit camera
- Node.js v16 or later
- npm (comes with Node.js)
-
Clone the repository
git clone <repo-url> cd lingmell
-
Install dependencies
npm install
-
Start the development server
npm start
The app will open automatically at http://localhost:3000.
- Left-click + drag — orbit around the scene
- Right-click + drag — pan
- Scroll wheel — zoom in/out
src/
App.js # All 3D scene logic (SkyBox, Sphere, Cube components)
index.js # React entry point
public/
px/nx/py/ny/pz/nz.jpg # Cubemap skybox textures (6 faces)
| Command | Description |
|---|---|
npm start |
Start development server at localhost:3000 |
npm run build |
Create an optimised production build |
npm test |
Run tests |
- React 18
- React Three Fiber — React renderer for Three.js
- Three.js — 3D graphics library
- @react-three/drei — helpers and abstractions for R3F