mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Bin Navara ground corridors set-wide and give corridors glow, pulse and dash
Navara's ground pass cut each corridor into chunks and tested them per screen cell, so dense corridor sets were slow (10,000 cost about 150 ms a frame). A corridor set is now cut into pieces along its great circles, sorted into lon/lat tiles, each with a pyramid of bins listing the segment runs within its margin; a pixel takes its tile and the finest bin that covers its reach and tests only those runs. At 10,000 corridors a frame now takes 11.8 ms still (Cesium 23 ms), at 15,000 17.9 ms. A pixel corridor's width is measured across the line, so diagonal lines no longer draw up to 1.4 times wider. Pixel corridors take three looks, evaluated on the GPU from a time uniform: Cesium's PolylineGlow falloff (glow), an alpha pulse and the annotation route's flowing dash. While a shown set pulses or flows the engine draws continuously, as Cesium did. Traffic's jam lines take the glow and pulse again and the Directions route its flowing dash and render hold, so on Cesium both match the drawing before they moved to the contract pixel for pixel. The contract suite passes on both engines (Cesium 69/69, Navara 72/72).
This commit is contained in:
1 parent
48885d9e61
commit
47d63128ff
30 files changed
+2501
-391
No files matched your search
+15
-2
@@ -489,7 +489,19 @@
|
||||
* - cell: `west`, `south`, `east`, `north` (west > east across the
|
||||
* antimeridian), edges along meridians and parallels;
|
||||
* - corridor: `positions` (a line), `color`, and `widthPx` (CSS pixels) or
|
||||
* `widthM` (metres).
|
||||
* `widthM` (metres). A `widthPx` corridor may take a look that Cesium's
|
||||
* ground polyline materials drew, worked out on the GPU each frame:
|
||||
* `glow` ({ power, taper = 1 }: PolylineGlow's glowPower and
|
||||
* taperPower, brighter toward the centre line and fading to its
|
||||
* edges), `pulse` ({ periodMs, min, max }: the alpha times a factor
|
||||
* going from min to max and back, a sine of the page's monotonic clock,
|
||||
* performance.now()) and `dash` ({ cells, duty, speed = 0,
|
||||
* gapAlpha = 0, emission = 0 }: `cells` dashes along the whole line,
|
||||
* each lit for its first `duty` with an edge of 0.08 of a cell, moving
|
||||
* toward the line's end at `speed` cells a second; between them the
|
||||
* alpha times `gapAlpha`; a lit dash brightened by `emission` times its
|
||||
* colour). A shown set with a pulse or a dash keeps the engine drawing
|
||||
* a frame after every frame, as Cesium's continuous render did.
|
||||
* Polygons, discs and cells take `fill` (omitted: none) and `outline`
|
||||
* ({ color, widthPx }, a ground line on the boundary of every ring;
|
||||
* omitted: none). Every kind takes `pickId`: what a pick of the item
|
||||
@@ -511,7 +523,8 @@
|
||||
*
|
||||
* @typedef {object} GlobeGround
|
||||
* @property {(options: GroundSetOptions) => GroundSet} createSet
|
||||
* @property {() => { id: string, kind: string, count: number, shown: boolean, order: number }[]} list
|
||||
* @property {() => { id: string, kind: string, count: number, shown: boolean, order: number, animated: boolean }[]} list
|
||||
* `animated`: the last commit has a pulse or a dash.
|
||||
*
|
||||
* @typedef {{ west: number, south: number, east: number, north: number }} DegreeRectangle
|
||||
* Degrees; south below north; west > east crosses the antimeridian.
|
||||
|
||||
Reference in new issue
Block a user