mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
style: format the phase 2 files and add them to the format scope
Prettier on the 13 new test files that failed --check; format-scope.json now lists every file phase 2 added (src/globe/**, engineChoice, navaraMode, cameraAngles, the QA scripts and pages, build/navaraAssets and tests).
This commit is contained in:
1 parent
312ed416e9
commit
80cc0b536e
14 files changed
+229
-46
No files matched your search
+12
-3
@@ -21,20 +21,29 @@ test('orbit locks onto the target every frame from the current heading, and stop
|
||||
});
|
||||
const target = geo.cartesian3.fromDegrees(-97.74, 30.27, 30);
|
||||
const orbit = new OrbitController(engine);
|
||||
assert.equal(orbit.toggle(target, { radius: 800, pitch: -20, speed: 10 }), true);
|
||||
assert.equal(
|
||||
orbit.toggle(target, { radius: 800, pitch: -20, speed: 10 }),
|
||||
true,
|
||||
);
|
||||
assert.ok(getRenderGovernorDiagnostics().holds.includes('camera-orbit'));
|
||||
t.mock.timers.tick(500);
|
||||
engine.fake.frame();
|
||||
const [first] = engine.fake.callsOf('camera.lookAt');
|
||||
assert.deepEqual(first.args[0], target);
|
||||
assert.ok(Math.abs(first.args[1].heading - (0.4 + geo.math.toRadians(5))) < 1e-9);
|
||||
assert.ok(
|
||||
Math.abs(first.args[1].heading - (0.4 + geo.math.toRadians(5))) < 1e-9,
|
||||
);
|
||||
assert.equal(first.args[1].pitch, geo.math.toRadians(-20));
|
||||
assert.equal(first.args[1].range, 800);
|
||||
assert.equal(orbit.toggle(), false);
|
||||
assert.equal(engine.fake.callsOf('camera.release').length, 1);
|
||||
assert.ok(!getRenderGovernorDiagnostics().holds.includes('camera-orbit'));
|
||||
engine.fake.frame();
|
||||
assert.equal(engine.fake.callsOf('camera.lookAt').length, 1, 'no frames after stop');
|
||||
assert.equal(
|
||||
engine.fake.callsOf('camera.lookAt').length,
|
||||
1,
|
||||
'no frames after stop',
|
||||
);
|
||||
});
|
||||
|
||||
test('orbit needs a target', () => {
|
||||
|
||||
Reference in new issue
Block a user