Skip to content

Commit 3931535

Browse files
author
HarshKhandeparkar
committed
fix: interpolation is not always white
1 parent 8e504e5 commit 3931535

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dist/gpujs-real-renderer-browser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,9 @@
683683
(Math.pow((X - x1), 2) + Math.pow((Y - y1), 2) <= Math.pow(lineHalfThickness, 2) ||
684684
Math.pow((X - x2), 2) + Math.pow((Y - y2), 2) <= Math.pow(lineHalfThickness, 2)))
685685
return [
686-
Math.max((lineColor[0] * distanceFactor + graphColor[0] * (1 - distanceFactor)), 1),
687-
Math.max((lineColor[1] * distanceFactor + graphColor[1] * (1 - distanceFactor)), 1),
688-
Math.max((lineColor[2] * distanceFactor + graphColor[2] * (1 - distanceFactor)), 1)
686+
Math.min((lineColor[0] * distanceFactor + graphColor[0] * (1 - distanceFactor)), 1),
687+
Math.min((lineColor[1] * distanceFactor + graphColor[1] * (1 - distanceFactor)), 1),
688+
Math.min((lineColor[2] * distanceFactor + graphColor[2] * (1 - distanceFactor)), 1)
689689
];
690690
else
691691
return graphColor;

0 commit comments

Comments
 (0)