mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(globe): bring the Navara engine up to the shell contract
- camera.livePosition: one engine-owned Cartesian3, refreshed on read (the model replaces its state on every move); camera.height() - render.request(reason) takes the diagnostic reason and ignores it - maps.current() returns the sources as passed: the base imagery on the globe (none while tiles replace it) and the tiles shown - maps.releasePhotorealTiles forgets a source and takes its tiles away if they show - base imagery and photoreal share one switch order; tiles off brings back the last base imagery with its credit; imagery chosen while tiles show waits hidden, credit included - Navara QA runs the contract's maps checks with a Google 3D tiles source on the dev server's browser key: 58/58
This commit is contained in:
1 parent
a4ac0b9b0d
commit
840e34a881
5 files changed
+130
-10
No files matched your search
@@ -439,3 +439,21 @@ test('rounding noise in the drawn camera is no movement, so moveEnd still fires'
|
||||
assert.equal(clock.time >= 960, true);
|
||||
assert.equal(ends, 1, 'moveEnd did not fire while Navara redrew the pose');
|
||||
});
|
||||
|
||||
test('livePosition is one engine-owned object holding the current position; height() reads it', () => {
|
||||
const { camera, port, frame } = setup();
|
||||
const live = camera.livePosition;
|
||||
const destination = cartesian3.fromDegrees(20, 10, 12345);
|
||||
camera.setView({ destination });
|
||||
assert.equal(camera.livePosition, live, 'not the same object');
|
||||
near(cartesian3.distance(live, destination), 0, 1e-9, 'follows setView');
|
||||
near(camera.height(), 12345, 1e-6, 'height');
|
||||
frame();
|
||||
const moved = cartesian3.fromDegrees(21, 11, 9e5);
|
||||
port.drawn = { position: moved, ...orientationVectors(moved, 0.3, -1, 0) };
|
||||
frame();
|
||||
near(cartesian3.distance(camera.livePosition, moved), 0, 1e-9, 'follows Navara');
|
||||
near(camera.height(), 9e5, 1e-6, 'height after a user move');
|
||||
const pose = camera.pose();
|
||||
assert.notEqual(pose.position, live, 'pose shares the live object');
|
||||
});
|
||||
Reference in new issue
Block a user