Could anyone explain why the output vector from the function TriangulosParaLinhas
is not being stored in the vector Lines?
if (lineMode == true) {
var lines = triangulosParaLinhas(vertices);
}
function triangulosParaLinhas(vertices) {
var points = [];
for (var i = 0; i < vertices.length / 3; i = +3) {
points.push(vertices[i]);
points.push(vertices[i + 1]);
points.push(vertices[i + 1]);
points.push(vertices[i + 2]);
points.push(vertices[i + 2]);
points.push(vertices[i]);
}
return points;
}