Skip to content

Commit 2030ad6

Browse files
committed
code comment
1 parent e0c001f commit 2030ad6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/traces/parcoords/lines.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ function renderBlock(regl, glAes, renderState, blockLineCount, sampleCount, item
8282
}
8383

8484
function adjustDepth(d) {
85+
// WebGL matrix operations use floats with limited precision, potentially causing a number near a border of [0, 1]
86+
// to end up slightly outside the border. With an epsilon, we reduce the chance that a line gets clipped by the
87+
// near or the far plane.
8588
return Math.max(depthLimitEpsilon, Math.min(1 - depthLimitEpsilon, d));
8689
}
8790

0 commit comments

Comments
 (0)