mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-11 16:12:06 +08:00
Fix #1766 UV faces rotate individually
Improve keybinding labels for international layouts
This commit is contained in:
parent
cc6937387c
commit
7a1bceb651
@ -162,11 +162,19 @@ class Keybind {
|
||||
case 19: return 'pause';
|
||||
case 1001: return 'mousewheel';
|
||||
|
||||
case 187: return '+';
|
||||
case 188: return ',';
|
||||
case 190: return '.';
|
||||
case 189: return '-';
|
||||
case 191: return '#';
|
||||
case 191: return '/';
|
||||
case 219: return '[';
|
||||
case 221: return ']';
|
||||
case 186: return ';';
|
||||
case 222: return "'";
|
||||
case 220: return '\\';
|
||||
case 187: return '=';
|
||||
case 226: return '\\';
|
||||
case 192: return '`';
|
||||
//case 187: return '+';
|
||||
default : return String.fromCharCode(key).toLowerCase();
|
||||
}
|
||||
}
|
||||
|
@ -1110,18 +1110,13 @@ const UVEditor = {
|
||||
})
|
||||
Canvas.updateUV(obj);
|
||||
})
|
||||
let rect = this.vue.getSelectedUVBoundingBox();
|
||||
let center = [(rect[0] + rect[2]) / 2, (rect[1] + rect[3]) / 2];
|
||||
Mesh.selected.forEach(mesh => {
|
||||
|
||||
mesh.forAllFaces((face, fkey) => {
|
||||
if (!UVEditor.selected_faces.includes(fkey)) return;
|
||||
if (face.vertices.length < 3) return;
|
||||
let center = [0, 0];
|
||||
face.vertices.forEach(vkey => {
|
||||
if (!face.uv[vkey]) return;
|
||||
center[0] += face.uv[vkey][0];
|
||||
center[1] += face.uv[vkey][1];
|
||||
})
|
||||
center[0] /= face.vertices.length;
|
||||
center[1] /= face.vertices.length;
|
||||
|
||||
face.vertices.forEach(vkey => {
|
||||
if (!face.uv[vkey]) return;
|
||||
|
Loading…
Reference in New Issue
Block a user