prepare line rendering for multi color options

This commit is contained in:
Stewart Allen 2020-11-09 09:46:27 -05:00
commit 3781f7ce30
3 changed files with 33 additions and 13 deletions

View file

@ -78,8 +78,11 @@
return this.addPaths(polys, options);
}
polys = flat(polys);
if (options && options.thin && options.z !== undefined) {
polys.forEach(p => p.setZ(options.z));
if (options) {
polys.forEach(p => {
if (options.z !== undefined) p.setZ(options.z);
if (options.color) p.color = options.color;
});
}
this.current.polys.appendAll(polys);
this.stats.line_poly += polys.length;