Repository navigation
Kosta/fix index creation (fix for #13) - #14
Conversation
|
Thanks! Looks good to me. I'll now check if we can avoid getting vertex length on each vertex twice, and calculate dimensionality once instead... |
|
how about this? |
|
you could also make the number of dimensions variable (but the same for all vertices) and not just limiting it to 2 and 3 by explicitly using vertices.push(node.p[0]);
vertices.push(node.p[1]);
if (node.p.length > 2) vertices.push(node.p[2]);by vertices.concat(node.p); |
|
|
|
ah yeah, right about I could imagine to store additional data with the vertices, such as normals, colors, uv-coordinates for texture mapping, and then use interleaved buffer arrays for that data to render it with WebGL... But leaving that out for now works for me. If/when I have a concrete use case for that I can create another PR... |
Kosta/fix index creation (fix for #13)
|
Published in 1.4.0. Also fixed the code to work with any number of dimensions. |
This is a potential fix for #13