Skip to content

Commit

Permalink
Add regression test for issue CesiumGS#6812
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesanantonio committed Jul 26, 2018
1 parent 198cd4d commit 3f08132
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Specs/Scene/SceneSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,32 @@ defineSuite([
scene.destroyForSpecs();
});

it('changing the camera frustum does not cause continuous rendering in requestRenderMode', function() {
var scene = createScene();

scene.renderForSpecs();

var lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime);
expect(lastRenderTime).toBeDefined();
expect(scene._renderRequested).toBe(false);

scene.requestRenderMode = true;
scene.maximumRenderTimeChange = undefined;

scene.camera.frustum.near *= 1.1;

// Render once properly
scene.renderForSpecs();
expect(scene.lastRenderTime).not.toEqual(lastRenderTime);

// Render again - but this time nothing should happen.
lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime);
scene.renderForSpecs();
expect(scene.lastRenderTime).toEqual(lastRenderTime);

scene.destroyForSpecs();
});

it('successful completed requests causes a new frame to be rendered in requestRenderMode', function() {
var scene = createScene();

Expand Down

0 comments on commit 3f08132

Please sign in to comment.