fix lay flat

This commit is contained in:
Stewart Allen 2024-06-02 11:00:37 -04:00
commit 2f2009047e
3 changed files with 7 additions and 10 deletions

View file

@ -2760,7 +2760,7 @@ gapp.register("kiri.init", [], (root, exports) => {
}; };
$('context-duplicate').onclick = duplicateSelection; $('context-duplicate').onclick = duplicateSelection;
$('context-mirror').onclick = mirrorSelection; $('context-mirror').onclick = mirrorSelection;
$('context-layflat').onclick = layFlat; $('context-layflat').onclick = () => { api.event.emit("tool.mesh.lay-flat") };
$('context-setfocus').onclick = setFocus; $('context-setfocus').onclick = setFocus;
ui.modal.onclick = api.modal.hide; ui.modal.onclick = api.modal.hide;

View file

@ -126,8 +126,9 @@ api.event.on('mouse.hover', (ev) => {
pmesh.position.y = -v.z; pmesh.position.y = -v.z;
pmesh.position.z = v.y; pmesh.position.z = v.y;
} else { } else {
const zcomp = api.mode.get() === 'CAM' ? track.tzoff : 0;
pmesh.position.y = -point.z - opos.y + norm.y * 0.1; pmesh.position.y = -point.z - opos.y + norm.y * 0.1;
pmesh.position.z = point.y + track.tzoff + norm.z * 0.1; pmesh.position.z = point.y + zcomp + norm.z * 0.1;
} }
let q = new Quaternion().setFromUnitVectors(ZAXIS, let q = new Quaternion().setFromUnitVectors(ZAXIS,
new Vector3(norm.x,norm.y,norm.z) new Vector3(norm.x,norm.y,norm.z)

View file

@ -722,9 +722,6 @@ th, tr, td, label {
.movable { .movable {
margin: 5px; margin: 5px;
} }
.movable input {
background-color: rgba(255,255,255,0.5);
}
.movable .title { .movable .title {
color: white; color: white;
padding: 2px 3px 1px 3px; padding: 2px 3px 1px 3px;
@ -737,10 +734,9 @@ th, tr, td, label {
.movable .body { .movable .body {
margin: 0; margin: 0;
padding: 0 5px 0 0; padding: 0 5px 0 0;
background-color: rgba(245,245,245,0.8); background-color: #fff;
} border-left: 1px solid #eee;
.movable:hover .body { border-right: 1px solid #eee;
background-color: rgba(245,245,245,0.95);
} }
.movable .footer { .movable .footer {
height: 10px; height: 10px;
@ -780,7 +776,7 @@ th, tr, td, label {
#float-tools { #float-tools {
position: absolute; position: absolute;
margin: 0 0 0 5px; margin: 0;
top: 50px; top: 50px;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);