Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
interDatas[dataIndex].push(interpolate(
inputDataArray[i1], d1,
inputDataArray[i2], d2)
);
});
}
}
}
// Create triangles where data is equal to this.value
v1 = [interPoints[0], interPoints[1], interPoints[2]];
v2 = [interPoints[3], interPoints[4], interPoints[5]];
v3 = [interPoints[6], interPoints[7], interPoints[8]];
normal = [];
vec3.cross(
normal,
[v2[0]-v1[0], v2[1]-v1[1], v2[2]-v1[2]],
[v3[0]-v2[0], v3[1]-v2[1], v3[2]-v2[2]]
);
// Create new triangles
if (vec3.dot(Geometry.normalNonUnitV(
[0, 0, 0], v1, v2, v3), normal) < 0.0) {
// Create first triangle
surfaceCoordArray.push(
v1[0], v1[1], v1[2],
v2[0], v2[1], v2[2],
v3[0], v3[1], v3[2]
);
interDatas.forEach((interData, dataIndex) => {