mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 17:22:19 +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
@@ -118,8 +118,9 @@ export function createRendering({
|
||||
* far-LOD Google-3D mesh sits above the true ground and swallowed
|
||||
* ground-anchored icons); the set culls the far side of the globe and
|
||||
* refreshHorizonCulling thins the rest.
|
||||
* The set stacks under the other sprite layers (`spriteDrawOrder`).
|
||||
* @param {object} viewer The layer's viewer.
|
||||
* @returns {string} The icon set's id, for the sprite order.
|
||||
* @returns {string} The icon set's id.
|
||||
*/
|
||||
function createCameraIcons(viewer) {
|
||||
// A re-init against a new viewer replaces the icons; the old ones go.
|
||||
@@ -127,9 +128,10 @@ export function createRendering({
|
||||
const set = drawOf(viewer).icons({
|
||||
id: `cctv:${++iconSets}:icons`,
|
||||
horizonCull: true,
|
||||
drawOrder: services.sprites?.spriteDrawOrder?.('cctv') ?? 0,
|
||||
});
|
||||
// Columns of no rows put the set's host in the scene now, where the
|
||||
// sprite order finds it, rather than with its first camera.
|
||||
// Columns of no rows put the set's host in the scene now, rather than
|
||||
// with its first camera.
|
||||
set.setColumns?.({ ids: [] });
|
||||
layerState._icons = createIconBook(set);
|
||||
return set.id;
|
||||
|
||||
Reference in new issue
Block a user