Add a Navara HD renderer choice, release a parked engine after three minutes, and cut Navara's memory

Navara now draws at CSS pixels without MSAA, like Cesium; Navara HD keeps the device pixel ratio and MSAA 4. Only one Navara variant is ever kept. A parked engine is released after three minutes and its WebGL context is lost. Three leaks that kept a released Navara alive are fixed, the canvas context drops its unused antialias buffer, cloud shadows use two 256 px cascades, and the tile cache is budgeted from the screen buffers.
This commit is contained in:
German Khokhlov committed 2026-11-06 14:41:16 +04:00
1 parent a6c64713ee
commit 9825b02aab
22 files changed
+657 -58

No files matched your search

+5 -3
View File
@@ -21,8 +21,9 @@ import { loadCesium } from './loadCesium.js';
/**
* Construct the application globe using the caller's local configuration.
* `engineKind` 'navara' builds the experimental Navara engine instead of the
* Cesium viewer: the scene then has no viewer (`viewer: null`).
* `engineKind` 'navara' or 'navara-hd' (the page's engine choice,
* src/app/engineChoice.js) builds the experimental Navara engine instead of
* the Cesium viewer: the scene then has no viewer (`viewer: null`).
*/
export async function createApplicationScene({
requestServices,
@@ -113,7 +114,7 @@ async function createRenderer({
}) {
// The Navara mode's own code loads only in that mode, with Navara itself,
// so the Cesium-mode bundle carries none of it.
if (engineKind === 'navara') {
if (engineKind === 'navara' || engineKind === 'navara-hd') {
const scene = await (
await import('./navaraMode.js')
).createNavaraScene({
@@ -124,6 +125,7 @@ async function createRenderer({
mapOptions,
loaderStatus,
loadNavaraGlobe,
hd: engineKind === 'navara-hd',
signal,
defer,
});