mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Stack sprite layers by draw order, flights on top
Each sprite layer's icon or dot set is now made at a draw order taken from SPRITE_LAYER_ORDER through the renderer's per-set drawOrder: flights over military, vessels, directions, transit, bikeshare, FIRMS and CCTV, whichever layer was turned on first. Picks name the topmost first. The orders are negative, so selection highlights, route endpoints, the tracked plane and every other set at the default order still draw over all sprite layers, as they did before. The raise-to-top restorer, the sprite registry and the primitive-name lookups are gone, which takes spriteOrder.js off the viewer-access list. Before, the restorer raised the layers to the bottom of the scene in the order they were enabled, so flights usually ended up under the others.
This commit is contained in:
1 parent
657ef94f77
commit
c073064507
40 files changed
+271
-562
No files matched your search
@@ -722,7 +722,8 @@ export function createCesiumDraw({
|
||||
slot >= 0 && slot + 1 < scene.primitives.length
|
||||
? scene.primitives.get(slot + 1)
|
||||
: null;
|
||||
// Named for code that orders the scene's primitives (`spriteOrder.js`).
|
||||
// Named for code that finds a set's host among the scene's primitives
|
||||
// (`uploadProbe.js`).
|
||||
host.drawSetId = record.spec.id;
|
||||
// Only old ground primitives wait for the new ones: the rest of the old
|
||||
// host goes now, as the new host's own parts draw at once.
|
||||
@@ -765,9 +766,8 @@ export function createCesiumDraw({
|
||||
* higher order goes earlier; of one order, in the order they were made.
|
||||
* The hosts trade places among the slots they hold, so nothing else in
|
||||
* the scene moves. Nothing moves while every set is at 0 (unless an order
|
||||
* just changed, `changed`), so sets at 0 stack as they were first drawn
|
||||
* (and as the sprite order raises them); nor while the hosts are already
|
||||
* in order.
|
||||
* just changed, `changed`), so sets at 0 stack as they were first drawn;
|
||||
* nor while the hosts are already in order.
|
||||
* Translucent ones blend order-independently, whatever their order, and
|
||||
* items in different view frustums stack nearer frustum first.
|
||||
* @param {boolean} [changed]
|
||||
|
||||
Reference in new issue
Block a user