Skip to content

Commit

Permalink
add default plane distances for drawing if no splits created
Browse files Browse the repository at this point in the history
  • Loading branch information
austinEng committed Feb 1, 2017
1 parent 0b44434 commit aee3c96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/Scene/DebugCameraPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define([
}

var scratchColor = new Color();

var scratchSplits = [1.0, 100000.0];
/**
* @private
*/
Expand All @@ -128,6 +128,10 @@ define([

var frustumSplits = frameState.frustumSplits;
var numFrustums = frustumSplits.length - 1;
if (numFrustums <= 0) {
frustumSplits = scratchSplits; // plane distances if no splits have been created
numFrustums = 1;
}

var positions = new Float64Array(3 * 4 * (numFrustums + 1));
var f;
Expand Down

0 comments on commit aee3c96

Please sign in to comment.