mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(globe): harden the Navara engine after review
- maps: photoreal hides the base imagery layer instead of deleting it, and a new base layer goes in before the old one goes: deleting the last raster layer stops Navara 0.2.1 loading terrain at the current view, which left terrainHeight undefined under the tiles - Google 3D tiles open Navara's attribution card so the tiles' copyright lines are on screen, as Cesium shows them; onScreen credits do the same - setCameraInputs merges into the camera options set through the engine (new setCameraOptions extension) instead of resetting them - createNavaraGlobe disposes the view and canvas if the engine throws - the pin test checks the installed Navara version and catches bracketed private access - QA: draw-match checks at the nadir clamp, after a Navara flight and after a mouse drag; terrain under photoreal set right away; the copyright lines on screen; create/destroy/create leaves no canvas, frames, animation frames, workers or console errors (54/54)
This commit is contained in:
1 parent
90c8e7763a
commit
a4ac0b9b0d
8 files changed
+148
-25
No files matched your search
@@ -42,6 +42,7 @@ export async function createNavaraGlobe({ container, effects, pixelRatio }) {
|
||||
const plan = navaraScenePlan(effects);
|
||||
const canvas = preservedCanvas(container);
|
||||
let view;
|
||||
let engine;
|
||||
try {
|
||||
view = new ThreeView(navaraViewOptions({ container, canvas, pixelRatio }));
|
||||
const plugin = new DefaultPlugin();
|
||||
@@ -53,15 +54,15 @@ export async function createNavaraGlobe({ container, effects, pixelRatio }) {
|
||||
for (const name of plan.lights) view.addLight({ [name]: {} });
|
||||
for (const name of plan.effects) view.addEffect({ [name]: {} });
|
||||
}
|
||||
engine = createNavaraEngine(view, {
|
||||
hooks: navaraHooks(view),
|
||||
container,
|
||||
});
|
||||
} catch (error) {
|
||||
view?.dispose();
|
||||
canvas.remove();
|
||||
throw error;
|
||||
}
|
||||
const engine = createNavaraEngine(view, {
|
||||
hooks: navaraHooks(view),
|
||||
container,
|
||||
});
|
||||
let destroyed = false;
|
||||
return {
|
||||
view,
|
||||
|
||||
Reference in new issue
Block a user