add notes on how to improve path visuals and speed up compute time
This commit is contained in:
parent
89960ee784
commit
a15b47c05e
3 changed files with 16 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue