mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
perf(terrain): one shared, cached and budgeted terrain height reader for Transit, Rail, Bike Share and local data
globe.getHeight is a ray cast against the drawn tile's mesh and scene.sampleHeight a GPU depth render; several layers asked for them uncached and unbudgeted. The cache written for Transit moves to src/services/terrainSurface.js and is handed to every layer through the ground service, so layers share one cache and one read budget. - Rail reads each train on a ~4 m grid instead of every frame. - Local data layers read terrain floors through it and stop depth samples at 8 ms a frame. - Bike Share draws stations at once and finds their heights afterwards in 4 ms steps. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
d5f7926c7e
commit
0f4dda5cc6
22 files changed
+1257
-263
No files matched your search
@@ -50,6 +50,17 @@ export const DEFAULT_CAPACITY = 15;
|
||||
|
||||
export const POINT_HEIGHT_OFFSET_M = 2.0;
|
||||
|
||||
/**
|
||||
* Milliseconds one step may spend finding station ground heights. A height
|
||||
* the terrain globe cannot give is a depth render of a millisecond or more.
|
||||
*/
|
||||
|
||||
export const HEIGHT_REFINE_BUDGET_MS = 4;
|
||||
|
||||
/** Milliseconds between those steps, about a frame. */
|
||||
|
||||
export const HEIGHT_REFINE_INTERVAL_MS = 16;
|
||||
|
||||
/** Hard cap on total rendered station points across all cities. */
|
||||
|
||||
export const MAX_TOTAL_POINTS = 8000;
|
||||
|
||||
Reference in new issue
Block a user