0) {
- let quaternion = new THREE.Quaternion();
-
+ let selection_rotation = space == 3 && el.getSelectionRotation();
Project.selected_vertices[el.uuid].forEach(key => {
if (space == 2) {
el.vertices[key][axis] += difference;
+ } else if (space == 3) {
+ let m = vector.set(0, 0, 0);
+ m[getAxisLetter(axis)] = difference;
+ m.applyEuler(selection_rotation);
+ el.vertices[key].V3_add(m.x, m.y, m.z);
+
} else {
- let m = new THREE.Vector3();
+ let m = vector.set(0, 0, 0);
m[getAxisLetter(axis)] = difference;
m.applyQuaternion(el.mesh.getWorldQuaternion(quaternion).invert());
el.vertices[key].V3_add(m.x, m.y, m.z);
@@ -646,7 +653,7 @@ function moveElementsInSpace(difference, axis) {
if (space == 2 && !group_m) {
if (el instanceof Locator) {
- let m = new THREE.Vector3();
+ let m = vector.set(0, 0, 0);
m[getAxisLetter(axis)] = difference;
m.applyQuaternion(el.mesh.quaternion);
el.from.V3_add(m.x, m.y, m.z);
@@ -668,7 +675,7 @@ function moveElementsInSpace(difference, axis) {
if (group_m) {
var m = group_m
} else {
- var m = new THREE.Vector3();
+ var m = vector.set(0, 0, 0);
m[getAxisLetter(axis)] = difference;
let parent = el.parent;
diff --git a/lang/en.json b/lang/en.json
index b51b9ff..751b40b 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1026,6 +1026,8 @@
"action.invert_face.desc": "Invert the selected faces to make them face the opposite direction",
"action.extrude_mesh_selection": "Extrude Selection",
"action.extrude_mesh_selection.desc": "Extrude the selected parts of the mesh",
+ "action.inset_mesh_selection": "Inset Selection",
+ "action.inset_mesh_selection.desc": "Inset the selected parts of the mesh",
"action.loop_cut": "Loop Cut",
"action.loop_cut.desc": "Split the mesh in a loop across the selected line",
"action.split_mesh": "Split Mesh",