add shaped path routing

This commit is contained in:
Stewart Allen 2020-11-06 23:51:58 -05:00
commit 64380b6ef6
4 changed files with 157 additions and 25 deletions

View file

@ -125,7 +125,14 @@
polys: encode(layer.polys, state),
lines: encodePointArray(layer.lines, state),
faces: codec.allocFloat32Array(layer.faces),
color: layer.color
color: layer.color,
paths: layer.paths.map(path => {
return {
index: path.index,
faces: path.faces,
z: path.z
}
})
} })
};
return enc;
@ -138,7 +145,8 @@
polys: decode(v.data[i].polys, state),
lines: decodePointArray(v.data[i].lines),
faces: v.data[i].faces,
color: v.data[i].color
color: v.data[i].color,
paths: v.data[i].paths
};
}
return render;