mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Keep shape radii, rim gradients, depth-fail looks, sweep cadence and step camera moves out of the renderer contract
Shapes take their radii in metres; the world annotation ring follows the camera height itself (ringRadiusAt), resizing on preRender. The radial rim preset and depthBias go: the launch pad zone draws a canvas image fill made by the layer. Solid and dashed lines take one depthFail look (solid or dash) in place of depthFailColor and depthFailDash. sonarCadenceHz goes from the quality settings: nothing set it, and the sweep moves every 80 ms. Camera move, look, rotateAround and zoom leave the camera port: the app's pans, in-place turns, globe turns and zooms are setView views summed over the pose (geo/eyeMoves), and the Cesium port places a view by direction and up exactly rather than through heading, pitch and roll. The conformance driver runs those script steps through setView; the lookAt script turns in place where it turned about the frame-local axis, and its reference is recorded again.
This commit is contained in:
1 parent
7a376ebefc
commit
c8346c9fda
44 files changed
+810
-799
No files matched your search
@@ -92,7 +92,7 @@ test('the sector is the sweep the HUD shows, in CSS pixels and radians', () => {
|
||||
* viewer: its frame's preUpdate is ticked by hand and its effects record
|
||||
* each sector.
|
||||
*/
|
||||
function fixture({ modulation = true, lists = true, cadenceHz } = {}) {
|
||||
function fixture({ modulation = true, lists = true } = {}) {
|
||||
const previous = {
|
||||
document: globalThis.document,
|
||||
matchMedia: globalThis.matchMedia,
|
||||
@@ -137,7 +137,6 @@ function fixture({ modulation = true, lists = true, cadenceHz } = {}) {
|
||||
const unbind = bindRenderer(viewer, {
|
||||
canvas,
|
||||
effects,
|
||||
quality: { get: () => (cadenceHz ? { sonarCadenceHz: cadenceHz } : {}) },
|
||||
frame: {
|
||||
on(phase, cb) {
|
||||
assert.equal(phase, 'preUpdate');
|
||||
@@ -277,27 +276,6 @@ test('the sweep sets its sector on drawing ticks and at the cadence, and changes
|
||||
}
|
||||
});
|
||||
|
||||
test('the renderer cadence paces the idle sweep', () => {
|
||||
const f = fixture({ cadenceHz: 4 });
|
||||
const now = performance.now;
|
||||
let clock = 0;
|
||||
performance.now = () => clock;
|
||||
try {
|
||||
const dispose = createCyberSonarScene(f.viewer);
|
||||
f.tick();
|
||||
clock += CYBER_SONAR_RENDER_INTERVAL_MS;
|
||||
f.tick();
|
||||
assert.equal(f.sets.length, 1, '4 Hz waits 250 ms');
|
||||
clock += 250 - CYBER_SONAR_RENDER_INTERVAL_MS;
|
||||
f.tick();
|
||||
assert.equal(f.sets.length, 2);
|
||||
dispose();
|
||||
} finally {
|
||||
performance.now = now;
|
||||
f.restore();
|
||||
}
|
||||
});
|
||||
|
||||
test('a sector the renderer does not list is unsupported: cleared, and the sweep stops', () => {
|
||||
const f = fixture({ lists: false });
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user