decrease trace opacity. raise hover/selected polys for better contrast. unpop on add/done
This commit is contained in:
parent
552cb1f8c0
commit
516ab3178f
1 changed files with 7 additions and 1 deletions
|
|
@ -434,6 +434,7 @@
|
||||||
// TRACE FUNCS
|
// TRACE FUNCS
|
||||||
let traceOn = false, lastTrace;
|
let traceOn = false, lastTrace;
|
||||||
func.traceAdd = (ev) => {
|
func.traceAdd = (ev) => {
|
||||||
|
func.unpop();
|
||||||
func.tabDone();
|
func.tabDone();
|
||||||
func.traceDone();
|
func.traceDone();
|
||||||
alert = api.show.alert("analyzing parts...", 1000);
|
alert = api.show.alert("analyzing parts...", 1000);
|
||||||
|
|
@ -442,7 +443,7 @@
|
||||||
CAM.traces((ids) => {
|
CAM.traces((ids) => {
|
||||||
api.hide.alert(alert);
|
api.hide.alert(alert);
|
||||||
alert = api.show.alert("[esc] cancels trace editing");
|
alert = api.show.alert("[esc] cancels trace editing");
|
||||||
KIRI.api.widgets.opacity(0.5);
|
KIRI.api.widgets.opacity(0.8);
|
||||||
KIRI.api.widgets.for(widget => {
|
KIRI.api.widgets.for(widget => {
|
||||||
if (ids.indexOf(widget.id) >= 0) {
|
if (ids.indexOf(widget.id) >= 0) {
|
||||||
unselectTraces(widget);
|
unselectTraces(widget);
|
||||||
|
|
@ -499,6 +500,7 @@
|
||||||
if (!traceOn) {
|
if (!traceOn) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
func.unpop();
|
||||||
traceOn.classList.remove("editing");
|
traceOn.classList.remove("editing");
|
||||||
traceOn = false;
|
traceOn = false;
|
||||||
KIRI.api.widgets.opacity(1);
|
KIRI.api.widgets.opacity(1);
|
||||||
|
|
@ -525,6 +527,7 @@
|
||||||
color.r = colorSave.r;
|
color.r = colorSave.r;
|
||||||
color.g = colorSave.g;
|
color.g = colorSave.g;
|
||||||
color.b = colorSave.b;
|
color.b = colorSave.b;
|
||||||
|
lastTrace.position.z -= 0.05;
|
||||||
}
|
}
|
||||||
if (data.type === 'platform') {
|
if (data.type === 'platform') {
|
||||||
lastTrace = null;
|
lastTrace = null;
|
||||||
|
|
@ -534,6 +537,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastTrace = data.int.object;
|
lastTrace = data.int.object;
|
||||||
|
lastTrace.position.z += 0.05;
|
||||||
if (lastTrace.selected) {
|
if (lastTrace.selected) {
|
||||||
let event = data.event;
|
let event = data.event;
|
||||||
let target = event.target;
|
let target = event.target;
|
||||||
|
|
@ -568,11 +572,13 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (obj.selected) {
|
if (obj.selected) {
|
||||||
|
obj.position.z += 0.05;
|
||||||
color.r = colorSave.r = 0.9;
|
color.r = colorSave.r = 0.9;
|
||||||
color.g = colorSave.g = 0;
|
color.g = colorSave.g = 0;
|
||||||
color.b = colorSave.b = 0.1;
|
color.b = colorSave.b = 0.1;
|
||||||
if (!skip) wlist.push(poly._trace);
|
if (!skip) wlist.push(poly._trace);
|
||||||
} else {
|
} else {
|
||||||
|
obj.position.z -= 0.05;
|
||||||
color.r = colorSave.r = 0xaa/255;
|
color.r = colorSave.r = 0xaa/255;
|
||||||
color.g = colorSave.g = 0xaa/255;
|
color.g = colorSave.g = 0xaa/255;
|
||||||
color.b = colorSave.b = 0x55/255;
|
color.b = colorSave.b = 0x55/255;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue