Skip to content

Commit b39ffa7

Browse files
committed
Handle null data in tessy callbacks
1 parent 77c6836 commit b39ffa7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/webgl/p5.RendererGL.js

+1
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,7 @@ p5.RendererGL.prototype._initTessy = function initTesselator() {
14541454
const result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
14551455
for (let i = 0; i < weight.length; i++) {
14561456
for (let j = 0; j < result.length; j++) {
1457+
if (weight[i] === 0 || !data[i]) continue;
14571458
result[j] += data[i][j] * weight[i];
14581459
}
14591460
}

0 commit comments

Comments
 (0)