add line opacity as an optional parameter
This commit is contained in:
parent
0b19a6c98f
commit
08add145c1
2 changed files with 5 additions and 5 deletions
|
|
@ -226,20 +226,20 @@
|
|||
|
||||
function doRender(widget) {
|
||||
widget.slices.forEach(slice => {
|
||||
const render = slice.output();
|
||||
const render = slice.output(), lopacity = 0.6, line = 0x010101;
|
||||
|
||||
if (slice.unioned) {
|
||||
slice.unioned.forEach(poly => {
|
||||
poly = poly.clone(true);//.move(widget.track.pos);
|
||||
render
|
||||
.setLayer("layers", { line: 0x010101, face: 0x0099cc, opacity: 0.4 })
|
||||
.setLayer("layers", { line, face: 0x0099cc, lopacity })
|
||||
.addAreas([poly], { outline: true });
|
||||
});
|
||||
} else if (slice.tops) {
|
||||
slice.tops.forEach(top => {
|
||||
let poly = top.poly;//.clone(true).move(widget.track.pos);
|
||||
render
|
||||
.setLayer("layers", { line: 0x010101, face: 0xfcba03, opacity: 0.4 })
|
||||
.setLayer("layers", { line, face: 0xfcba03, lopacity })
|
||||
.addAreas([poly], { outline: true });
|
||||
});
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@
|
|||
if (slice.supports) {
|
||||
slice.supports.forEach(poly => {
|
||||
render
|
||||
.setLayer("support", { line: 0x010101, face: 0xfcba03, opacity: 0.4 })
|
||||
.setLayer("support", { line, face: 0xfcba03, lopacity })
|
||||
.addAreas([poly], { outline: true });
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue