mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Settle unchanging solid lines into static batches in the Cesium draw port
An undraped solid line (straight or geodesic, without a depth-fail colour, not revealed, at least half a pixel wide) is drawn by the set's polyline collection at once, as before. Once the set's lines have not changed for 30 drawn frames, every such line is built into static batches beside the collection: a primitive of polyline geometries for opaque colours and one for translucent ones, each line coloured and shown by its own instance attributes under the pick id it had. A batch builds hidden, off the main thread, and swaps in for the batch before it and the collection's polylines once it is ready, each line showing as its item then asks. A polyline collection works out every line's material every frame; a batch costs nothing until it changes. The data centre stems (4,362 lines) cost about 16 ms a frame in the collection and about 0.01 ms settled. A batched line changes its show, colour and meta in place. One that moves, or whose colour moves it between the opaque and translucent passes, leaves its batch, hidden there, for the collection until the set settles again; when a batch exists and fewer than 64 lines are left in the collection, they settle after 300 frames, as rebuilding the batch for a few lines costs more than drawing them. A line in the collection that moves or changes colour drops a batch still building; a show change does not. A colour-only change of such a line is now made in place in the collection too, where it rebuilt the set. A batch whose build fails is reported once and its lines stay in the collection. Glow, dash, arrow, flow, pattern, revealed and depth-fail lines draw as they did. The shared conformance suite checks solid lines left unchanged for many frames still pick, hide, recolour and move in place.
This commit is contained in:
1 parent
abef2800fb
commit
17364d1eee
4 files changed
+734
-34
No files matched your search
@@ -42,6 +42,7 @@ export const CESIUM_CHECKS = new Set([
|
||||
'draw.icons.distance',
|
||||
'draw.icons.update',
|
||||
'draw.lines.depthFailDash',
|
||||
'draw.lines.settled',
|
||||
'draw.lines.styles',
|
||||
'draw.lines.drape',
|
||||
'draw.lines.segments',
|
||||
|
||||
Reference in new issue
Block a user