mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix knife tool on cubes issues
This commit is contained in:
parent
b31ff76124
commit
91000d50d7
@ -751,10 +751,10 @@ class KnifeToolCubeContext {
|
||||
}
|
||||
}
|
||||
addPoint(data) {
|
||||
if (!data?.element) return;
|
||||
if (!this.first_point_set) {
|
||||
this.first_point_set = true;
|
||||
} else {
|
||||
//this.hover(data);
|
||||
this.apply();
|
||||
}
|
||||
}
|
||||
@ -772,10 +772,11 @@ class KnifeToolCubeContext {
|
||||
let duplicate = this.cube.duplicate();
|
||||
selected.push(duplicate);
|
||||
elements.push(duplicate);
|
||||
let offset_lerp = Math.getLerp(this.cube.from[this.axis], this.cube.to[this.axis], this.offset);
|
||||
let offset = this.offset + this.cube.origin[this.axis];
|
||||
let offset_lerp = Math.getLerp(this.cube.from[this.axis], this.cube.to[this.axis], offset);
|
||||
|
||||
this.cube.to[this.axis] = this.offset;
|
||||
duplicate.from[this.axis] = this.offset;
|
||||
this.cube.to[this.axis] = offset;
|
||||
duplicate.from[this.axis] = offset;
|
||||
|
||||
function modifyUV(face, index, inverted) {
|
||||
index = (index - (face.rotation/90) + 8) % 4;
|
||||
|
Loading…
Reference in New Issue
Block a user