The portfolio of Mohammad AlOulabi, a tech manager in Riyadh, told as one scroll show about gravity.
You bring the point. I bring the gravity. The light you make on the first screen is your idea. Every figure shows something gravity does to it, until the whole system is one star among his projects and your point settles into the real sky over Riyadh tonight. Gravity is Mohammad: he never appears on screen, only what he holds together.
- One scene, twelve figures. A single WebGL canvas, scrubbed by the page's own scroll. No snapping, nothing scrolls by itself, and scrolling back unwinds it.
- One gesture to begin, the rest optional. The page waits on the first screen for your hold or click. After that a small ring offers one gesture at a time, and untouched, each figure plays out as you scroll.
- Your point is the thread. The light you let go stays marked from spark to sky. On a return visit it is still among the stars, and "Keep your sky" saves that sky as a PNG.
- A GPU particle simulation. Up to 262,144 motes in one points draw. They start as the sky over Riyadh at the moment the page loads: the 9,096 stars of the Yale Bright Star Catalogue in their real places, the Milky Way along the galactic plane, faint stars, a little dust and lights on the horizon.
- An ink journal over the 3D. Fine ink draws itself like an astronomer's notebook: circles, dashed orbits, leader lines and small notes, pinned to objects in the scene and moving with them. Its notes follow the show as it plays: your point's speed through each flyby, the cities as they light.
- A live score. Written out in D major and synthesized with the Web Audio API, with no audio files. Your first gesture starts it, and a switch turns it off.
- Readable anywhere. With reduced motion, without JavaScript or on a GPU that cannot run the show, the journal is
printed as still plates. Every line of the show is in English with the Arabic beneath, and
/llms.txtserves the profile as markdown.
Figures 2, 4 and 6 (a hundred versions, gathering and the window) play between these frames. Every figure, with its gestures, lines and ink, is in docs/STORY.md.
- Tap to begin. On a touch screen a tap gives the whole bang and starts the music.
- Drag sideways to turn the system, the world and the sky, or to lead the flock. An upright drag scrolls the story on.
- Tap a star once to name it, and again to open it in Work.
- Sized for the phone. Touch screens top out at the medium tier and a pixel ratio of 1.25. If iOS drops the WebGL context, the show is built again when it comes back.
- One clock.
src/lib/clock.tsruns everything from GSAP's ticker, in one order, every frame: Lenis's smooth scroll, story time, the DOM bridges and the score, then the render, by calling React Three Fiber'sadvanceon a canvas set toframeloop="never". - Story time.
src/lib/story.tsreads the natural scroll position as a figure positionT(figure i spans[i, i + 1)) and follows it with a critically dampedTsthat, inside the show, never moves faster than about a figure and a half a second. Everything animated readsTs. The story only reads the scroll; it never moves it. - One contract.
src/lib/journey.tsholds each figure's length, its inner beats, its gesture windows and the hand-offs between modules (your point touches the world's night side at exactlyT = 7). The GL, the DOM and the ink read their windows from there, never from literals. - Figures as functions.
src/gl/show/engine.tsorchestrates the core show. Each figure's controller (figures/), shaders (glsl/) and camera (poses/) are functions of story time and your choices, which is why scrolling back unwinds them. The Earth, its city lights and the storm aresrc/gl/world/. - The particles.
src/gl/show/sim.tssteps position and velocity textures on three.js'sGPUComputationRenderer: 512 × 512 motes on the high tier, 256 × 256 on medium, 128 × 128 on low. The vertex order is bit-reversed, so any prefix of it is an even spread of the motes and the watchdog can halve them without a pop. - The ink. The marks are data in
src/content/ink.ts. The GL writes the 3D points they follow (src/lib/anchors.ts),src/gl/project.tsprojects them once the frame is drawn, andsrc/bridges/ink.tsdraws them in an SVG in that same frame, so a circle never slides off its knot. Strokes are scrubbed: scrolling back undraws them. - The gate.
src/lib/gate.tskeeps the page on the first screen until your own hold or click, which also starts the score. Skip the show, a link or a deep link always go through. - Content. Every fact on the page comes from
src/content/site.ts, built from the CV.
Frame loops never touch React state and are written to avoid allocating per frame.
Quality tiers and fallbacks
src/lib/tier.ts picks a tier once, at load:
- static without WebGL 2 (or with a major performance caveat), on a software renderer, or on the weakest GPUs.
- low when the browser asks to save data.
- Otherwise by the benchmark tier of @pmndrs/detect-gpu, read from
/benchmarkswith a 1.2 s timeout: high, medium or low on a desktop, medium or low on a touch screen. Safari names every Apple GPU the same way, so an Apple desktop with eight or more cores is trusted with high.
?q=high, ?q=medium, ?q=low or ?q=static forces one. While it runs:
- The pixel ratio is capped at 2, 1.5 and 1.25 by tier, and at 1.25 on touch screens.
- A watchdog steps down after about two seconds of long frames (above 21.5 ms on average): first a lower pixel ratio, then half the motes, then a pixel ratio of 1 and a quarter of the motes, with a lighter nebula at each step. It only ever steps down.
- Every shader program is compiled before the reveal, so no figure hitches on its first frame.
- Without
EXT_color_buffer_floatthe simulation runs in half floats. - A lost WebGL context (iOS under memory pressure, a tab in the background) rebuilds the engine when it comes back.
Project structure
src/
app/ routes: the page, the 404, /llms.txt, /llms-full.txt, robots, sitemap, manifest, icons; globals.css
components/ the page: chrome, cursor, experience (boots it all), full-cv (+ full-cv.css), ink, spine, stills
sections/ show (a section per figure), record, ending
ui/ cv-button, gap, motion-toggle, sound-toggle, star-card, riyadh-time
bridges/ imperative DOM <-> GL bridges, no React state: boot, cut, ink, ink-geom, record, show-dom, spine,
star-card
gl/ stage.tsx (the canvas), precompile, project (the ink's projector), shared (GL <-> DOM state)
post/ effects.tsx: bloom, tone mapping, a vignette and dither finish, and the sky's long exposure
show/ the core show: engine, camera, the GPU sim (sim, sim-shaders, point-shaders), figures/, glsl/, poses/
world/ the Earth, its city lights and the storm
lib/ clock, story, stations, journey (the timeline contract), anchors, gate, hold, scroll, restart, show,
tier, and small helpers
content/ site.ts (every fact on the page), ink.ts (the journal), seo.ts, llms.ts, cv-text.ts
audio/ the synthesized score, its instruments and its QA meter
scripts/ shots.mjs (visual QA); bake-bsc5.mjs, bake-earth.mjs, bake-stills.mjs (asset bakes)
data-src/ the Yale Bright Star Catalogue, input of bake:stars
public/ served as is: data/, benchmarks/, stills/, work/, cv/, me.webp, og.jpg, icons
docs/ STORY.md (the creative spec) and images/ (the frames on this page)
- Framework. Next.js 16.4 (App Router, static export, Turbopack), React 19.3, TypeScript 6.
- 3D. three.js r187 on WebGL 2 with custom GLSL, React Three Fiber 9.8, postprocessing 6.39 for bloom and tone mapping.
- Motion. GSAP 3.15, whose ticker drives the frame, and Lenis 1.3 for smooth scroll.
- Sound. The Web Audio API.
- Quality tier. @pmndrs/detect-gpu 6.0.
- Measurement. Vercel Web Analytics and Speed Insights.
- Tooling. bun 1.4 for packages and scripts, Biome 2.6 for linting and formatting, Playwright 1.65 for the screenshot scripts.
You need bun 1.4.4 and Node.js 22.18 or newer: bun run starts Next.js and
the other tools on Node, and the scripts in scripts/ run on Node.
git clone https://github.com/MohOulabi/oulabi.dev.git
cd oulabi.dev
bun install
bun run dev # http://localhost:3000
bun run build # static export to out/
bun run start # serves out/It is bun run build, never bun build (that is Bun's own bundler). bun run dev -p 4317 picks another port. Add
?q=high, ?q=medium, ?q=low or ?q=static to the address to force a quality tier.
Every script
| Command | What it does |
|---|---|
bun run dev |
Next.js dev server with Turbopack |
bun run build |
Static export to out/ |
bun run start |
Serves out/ with serve |
bun run typecheck |
tsc --noEmit |
bun run lint |
Biome: lint, format and import order (biome check) |
bun run lint:fix |
Biome: apply the safe fixes and the formatting |
bun run format |
Biome: format every file |
bun run shots |
Screenshots of the running site at chosen story times |
bun run bake:stars |
Builds the star data from the Yale Bright Star Catalogue |
bun run bake:earth |
Bakes the Earth's map and the cities' distance to the sea |
bun run bake:stills |
Shoots the printed layout's stills of the Earth from the live show |
Biome formats at 100 columns with 2 spaces, double quotes, trailing commas and semicolons, and file names are
kebab-case. The repository's .vscode settings make Biome the formatter in VS Code. CI runs the lint, the typecheck
and the build on every push and pull request to main.
Visual QA
scripts/shots.mjs drives the installed Google Chrome on macOS through Playwright (no browser download; it asks for
the Metal backend) and saves a screenshot at each story time.
bun run build
bun run start -l 4317
bun run shots --url "http://localhost:4317/?qa" --t 0,1,2,3,4,12,13,14 --size 1440x900 --out shotsStory time T counts figures from 0; past 11 it reads on into the ending and the record. Other options: --q (the
tier, high by default), --dpr, --settle (ms to wait at each time) and --reduce 1 (reduced motion). The QA
hooks are on in dev builds, or in a production build opened with ?qa: window.__story.jump(T) sets story time,
window.__story.stats() returns the tier, the motes drawn, the watchdog's level, the frame time and the draw calls,
and window.__sound measures the score. ?wd=0 turns the watchdog off.
Asset bakes
The baked files are committed, so you only need these to change them.
bun run bake:starsreadsdata-src/bsc5.datand writespublic/data/bsc5.json: every star with coordinates, brightest first. Run it from the repository root.bun run bake:earthrasterizes Natural Earth's 1:50m land (fromworld-atlas, decoded withtopojson-client) intopublic/data/earth.png, a signed distance to the coast plus where people live, and writes how far each city insrc/gl/world/places.tsstands from the sea intosrc/gl/world/inland.ts. It imports that TypeScript file directly, hence Node 22.18 or newer. It fails if a city is not on land.bun run bake:stills --url http://localhost:4317shoots the printed layout's plates of the Earth (figs. 8 and 9) from the running site intopublic/stills/. Likeshots, it needs macOS and Google Chrome; on a production build, add?qato the URL.
bun run build writes a static export to out/ (output: "export" in next.config.ts), so any static host can
serve it. The site runs on Vercel, configured in vercel.json: it sends www.oulabi.dev and his other addresses to
oulabi.dev, serves /llms.txt and /llms-full.txt as markdown and keeps the RSC payload files out of search.
NEXT_PUBLIC_SITE_URL sets the site's address (see .env.example). The Vercel Web Analytics and Speed Insights
components load their scripts from paths only Vercel serves, so remove them from src/app/layout.tsx if you host it
elsewhere.
- Stars. The Yale Bright Star Catalogue, 5th Revised Edition (Hoffleit and Warren, 1991), NASA ADC / CDS catalogue V/50. Public domain.
- The Earth. Made with Natural Earth 1:50m land (public domain), through world-atlas by Michael Bostock and topojson-client (both ISC).
- GPU benchmarks. The data of @pmndrs/detect-gpu by Tim van Scherpenzeel (MIT), from GFXBench.
- Simplex noise. webgl-noise by Ashima Arts and Stefan Gustavson (MIT).
- Fonts. Archivo, Newsreader, IBM Plex Mono and Alexandria from Google Fonts through
next/font(SIL Open Font License 1.1). - Libraries. GSAP by GreenSock, under its standard license; three.js, React Three Fiber, postprocessing and Lenis.
- Made with coding agents. Mohammad directed it and built it with Claude Code, as the colophon at the end of the show says.
The code is under the MIT license. The personal content is not: the copy, the CV, the ink journal, the
creative spec, the portrait, the social card, the icons and the frames of the show (public/stills/ and the
screenshots in docs/images/) are Mohammad AlOulabi's, all rights reserved, as are his name and likeness. The
screenshots in public/work/ belong to the sites they show. NOTICE.md has the details.
If you fork it, the code is yours to learn from and reuse. Replace the content with your own before you publish anything:
src/content/: the copy, the CV text, the ink journal and the text of/llms.txtdocs/STORY.mdanddocs/images/public/cv/,public/work/,public/og.jpgandpublic/me.webppublic/stills/(bake your own withbun run bake:stills)- the icons:
public/icon-*.png,src/app/icon.svg,src/app/favicon.icoandsrc/app/apple-icon.png
Then remove the redirects in vercel.json, which send www.oulabi.dev and his other addresses to oulabi.dev, and set
NEXT_PUBLIC_SITE_URL to your own address.
To report a security issue, see SECURITY.md.











