add notes on how to improve path visuals and speed up compute time

This commit is contained in:
Stewart Allen 2022-09-27 23:35:51 -04:00
commit a15b47c05e
3 changed files with 16 additions and 2 deletions

View file

@ -191,7 +191,7 @@ class Stack {
const { index, faces, z, colors } = path;
const geo = new THREE.BufferGeometry();
geo.setAttribute('position', new THREE.BufferAttribute(faces, 3));
geo.setIndex(index);
if (index.length) geo.setIndex(index);
geo.computeVertexNormals();
if (cpath) {
cpath.forEach((c, i) => geo.addGroup(c.start, c.count, i));