|
@@ -37,6 +37,10 @@ export class AxisScaleGizmo extends Gizmo {
|
|
|
* If the scaling operation should be done on all axis (default: false)
|
|
|
*/
|
|
|
public uniformScaling = false;
|
|
|
+ /**
|
|
|
+ * Custom sensibility value for the drag strength
|
|
|
+ */
|
|
|
+ public sensibility = 1;
|
|
|
|
|
|
private _isEnabled: boolean = true;
|
|
|
private _parent: Nullable<ScaleGizmo> = null;
|
|
@@ -92,7 +96,7 @@ export class AxisScaleGizmo extends Gizmo {
|
|
|
this.dragBehavior.onDragObservable.add((event) => {
|
|
|
if (this.attachedMesh) {
|
|
|
// Drag strength is modified by the scale of the gizmo (eg. for small objects like boombox the strength will be increased to match the behavior of larger objects)
|
|
|
- var dragStrength = event.dragDistance * ((this.scaleRatio * 3) / this._rootMesh.scaling.length());
|
|
|
+ var dragStrength = this.sensibility * event.dragDistance * ((this.scaleRatio * 3) / this._rootMesh.scaling.length());
|
|
|
|
|
|
// Snapping logic
|
|
|
var snapped = false;
|