Skip to content

Commit 3f08132

Browse files
Add regression test for issue CesiumGS#6812
1 parent 198cd4d commit 3f08132

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Specs/Scene/SceneSpec.js

+26
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,32 @@ defineSuite([
13571357
scene.destroyForSpecs();
13581358
});
13591359

1360+
it('changing the camera frustum does not cause continuous rendering in requestRenderMode', function() {
1361+
var scene = createScene();
1362+
1363+
scene.renderForSpecs();
1364+
1365+
var lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime);
1366+
expect(lastRenderTime).toBeDefined();
1367+
expect(scene._renderRequested).toBe(false);
1368+
1369+
scene.requestRenderMode = true;
1370+
scene.maximumRenderTimeChange = undefined;
1371+
1372+
scene.camera.frustum.near *= 1.1;
1373+
1374+
// Render once properly
1375+
scene.renderForSpecs();
1376+
expect(scene.lastRenderTime).not.toEqual(lastRenderTime);
1377+
1378+
// Render again - but this time nothing should happen.
1379+
lastRenderTime = JulianDate.clone(scene.lastRenderTime, scratchTime);
1380+
scene.renderForSpecs();
1381+
expect(scene.lastRenderTime).toEqual(lastRenderTime);
1382+
1383+
scene.destroyForSpecs();
1384+
});
1385+
13601386
it('successful completed requests causes a new frame to be rendered in requestRenderMode', function() {
13611387
var scene = createScene();
13621388

0 commit comments

Comments
 (0)