Case study 03 / 25JS Front-End
A spill-to-river scenario site that a phone plays back in seconds
Whether a release reaches the river, shown on terrain 15× finer, and the river case opens on a phone in 3.6 s instead of 9.4 s.
My roleDesigned it and led a team of up to 3: set its standards, mentored it, agreed the roadmap with operations and the client, presented to leadership.
Stack
- JavaScript
- Node.js
- CesiumJS
- WebGL
- Web Workers
- Azure App Service
01 · How it works
- TodaytoChanged in this work
- Data flow
What it does
The spill-simulation twin I had built for a pipeline system and its channel, given its own site for one incident: a separate address, sign-in and deployment, with fine terrain under the leak. It answers two questions for the people deciding: how the real release spread and stopped, and how large a leak would have to be for its front to reach the river at a chosen hour, then how the river would dilute it.
Read more
I designed the site, the server that computes each case once, a phone view made for watching, and explainer images and videos that read every number from the model.
5 connections· select a part to trace it
- Fine terrain to Case server: ground under the release
- Case server to Stored cases: computes each case once
- Stored cases to Phone view: played back, not computed
- Stored cases to Desktop page: the same result, drawn
- Case server to Images and videos: numbers read, none typed
02Results
- R01Lower is better
River case ready on a phone
Before 9.4 s, after 3.6 s, 2.6× lower. Lower is better.BeforeAfter - R02Higher is better
Share of the phone screen that is map
Before 64.4%, after 82.5%, +28%. Higher is better.BeforeAfter - R03Lower is better
Modelled pond, distance from the photographed one
Before 25.2 m, after 0.8 m, 31× lower. Lower is better.BeforeAfter
What it achieved
- What the people deciding get: the real case and the river case on their own site, on terrain 15× finer (30 m → 2 m), with the modelled pond 25.2 m → 0.8 m from the one in the photographs
- Opening the river case on a phone: 9.4 s → 3.6 s, the server computing each case once and the page only drawing it
Read more
- Changing the river's flow: 4.5 s → 0.23 s, the river solved on its own instead of the whole chain
- The phone view: map 64.4 % → 82.5 % of the screen, controls 23 → 9, text fields 3 → 0
- Explainer images: what each title names 0.1–0.7 % → 3.8–19.7 % of the picture, with 34 numbers read from the model and 0 typed by hand
- A second visit downloads 7.0 MB → 0.04 MB
03Decisions and trade-offs
- Constraint
Every phone recomputed the whole model before showing anything.
DecisionThe server computes each case once and stores it; the page computes only if the server fails.
What it costA value nobody asked for before is still computed on the device.
- Constraint
On a phone, the controls and a sheet left the map 64.4 % of the screen.
DecisionRebuild the phone view for watching: the answer on top, a player below, details on demand.
What it costChanging values stays on the desktop.
- Constraint
Moving water makes the river readable.
DecisionAnimate it, at 30 frames a second.
What it costThe map now paints while idle; it rests after 3 minutes, and never animates on phones.
The challenge
The shared twin computed everything in each visitor's browser: on a phone the river case took 9.4 s to be ready, and changing the river's flow recomputed the whole chain in 4.5 s. Its 30 m terrain hid the road, the bank and the river flat where the release actually went, and on it the modelled pond sat 25.2 m from the one in the photographs.
Read more
The explanations did not help either. The explainer images showed the whole hill, so what each title named filled only 0.1–0.7 % of its picture, and on a phone the controls and a bottom sheet left the map 64.4 % of the screen.
What I learned
A scenario earns trust when every number can be traced: the images and videos read their figures from the model, and the river video's generator will not start if the solids do not balance. Moving the computation to the server began as a speed fix, but it also turned each case into a stored, repeatable answer that a phone only plays back.
Read more
And on a phone, less is a design decision: removing fields and buttons turned a calculator into something people can watch and understand together in a meeting.
Stack
- JavaScript
- Node.js
- CesiumJS
- WebGL
- Web Workers
- Azure App Service
Skills
- Geospatial simulation
- Scientific explainers
- Mobile-first UX
- Server-side precomputation
- Performance measurement

