mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 16:52:20 +00:00
Give each engine its own extensions in place of the navaraViews map
What only one engine has now travels with the engine instead of a WeakMap in navaraMode.js: engine.extensions.navara holds Navara's view, its SDK classes and the daylight reset, engine.extensions.cesium the Cesium viewer. The contract documents the field as outside the contract, and the coupling report counts its reads outside src/globe in place of the navaraViews reads (27, unchanged).
This commit is contained in:
1 parent
2213be6566
commit
48988015f1
6 files changed
+61
-47
No files matched your search
@@ -248,6 +248,23 @@ export async function createNavaraGlobe({ container, search, hd = false }) {
|
||||
throw error;
|
||||
}
|
||||
let destroyed = false;
|
||||
// What only Navara has, for the code written against Navara itself (its
|
||||
// layer renderers): the view, the SDK classes and the daylight reset.
|
||||
engine.extensions = Object.freeze({
|
||||
navara: Object.freeze({
|
||||
view,
|
||||
MeshDesc,
|
||||
NavaraColor,
|
||||
EffectDesc: layerEffectDesc(EffectDesc),
|
||||
NavaraEffect,
|
||||
DrapedMesh,
|
||||
setupMaterialForDrape,
|
||||
alignDaylightToRestoredView() {
|
||||
look.resetDaylight();
|
||||
engine.render.request('restored-daylight');
|
||||
},
|
||||
}),
|
||||
});
|
||||
return {
|
||||
view,
|
||||
engine,
|
||||
|
||||
Reference in new issue
Block a user