|
@@ -88,16 +88,11 @@ export class AxisScaleGizmo extends Gizmo {
|
|
|
const lineScale = arrowTail.scaling.clone();
|
|
|
|
|
|
const increaseGizmoMesh = (dragDistance: number) => {
|
|
|
- const dragStrength = this.sensitivity * dragDistance * ((this.scaleRatio * 3) / this._rootMesh.scaling.length());
|
|
|
- const scalar = 1; // This will increase the rate of gizmo size on drag
|
|
|
- const originalScale = arrowTail.scaling.y;
|
|
|
- const newScale = originalScale + dragStrength * scalar;
|
|
|
- const newMeshPosition = arrowMesh.position.z + ((newScale - originalScale) / 4);
|
|
|
- if (newMeshPosition >= 0) {
|
|
|
- arrowMesh.position.z = newMeshPosition;
|
|
|
- arrowTail.scaling.y = newScale;
|
|
|
- arrowTail.position.z = arrowMesh.position.z / 2;
|
|
|
- }
|
|
|
+ const dragStrength = (dragDistance * (3 / this._rootMesh.scaling.length())) * 6;
|
|
|
+
|
|
|
+ arrowMesh.position.z += dragStrength / 3.5;
|
|
|
+ arrowTail.scaling.y += dragStrength;
|
|
|
+ arrowTail.position.z = arrowMesh.position.z / 2;
|
|
|
};
|
|
|
|
|
|
const resetGizmoMesh = () => {
|