Case // 07
samydev.com
This site: a 3D Earth, a data lab and five languages.
Fact sheet
My portfolio, rebuilt from scratch on React 19 and React Three Fiber. One persistent WebGL scene runs behind every page, and the Mission page plots United Nations demographic records on the globe.
- Context
- Independent product
- Role
- Design and development
- Team
- Solo
- Period
- 2022-2026
- Status
- Live
- 13documented bugs fixed in the rebuild
- ~10%of UN records recovered by name reconciliation
- 1persistent WebGL scene across all pages
- 5languages
Challenge
01The first version bridged a vanilla Three.js singleton into React through global variables. The data demo duplicated its markers on every mouse move until the tab froze, lighting disagreed between layers, and about one country in ten silently disappeared from the dataset.
Approach
02A single R3F canvas mounted at the app root, driven by a SceneContext instead of window globals. Shaders are bundled at build time and share one sun direction. The UN data goes through pure, memoised functions, an alias table joins country names to coordinates, and markers use a clamped square-root scale with native pointer events.
Outcome
03Thirteen documented bugs fixed, about 10% of the UN records recovered, smooth navigation between pages without reloading the 3D scene, and content in English, French, German, Spanish and Italian.
Architecture
SCHEMA- Interface
- React pagesRouter, transitions, filters
- react-i18nextEN, FR, DE, ES, IT
- Data
- UN data adapterPure, memoised filtering
- Geo joinCoordinates and alias table
- State
- SceneContextAmbient or mission mode
- Rendering
- GLSL shadersEarth, atmosphere, clouds
- R3F CanvasOne persistent WebGL scene
- Data markersPointer events, sqrt scale
Swipe sideways to explore the diagram
What I did
- Refactor from imperative globals to declarative React Three Fiber
- Custom GLSL: day and night terminator, Fresnel atmosphere, clouds lit by the same sun
- Data quality work: name reconciliation, no duplicate Total, Urban and Rural rows, sensible default filters
- Internationalisation in five languages with react-i18next
- Every fix documented in the repository with its root cause
Stack
- Front end
- React 19
- Vite
- React Router
- framer-motion
- react-i18next
- 3D and graphics
- Three.js
- React Three Fiber
- drei
- GLSL
- Data
- UN demographic dataset
- Infrastructure
- Vercel
Gallery
Related services
Need something similar? These are the services this project demonstrates.
Get in touch