<commit_before>import type { Observer } from "../Misc/observable";
import { Observable } from "../Misc/observable";
import type { Nullable } from "../types";
import type { PointerInfo } from "../Events/pointerEvents";
import { Vector3, Matrix } from "../Maths/math.vector";
import type { AbstractMesh } from "../Meshes/abstractMesh";
import type { Node } from "../node";
import { Mesh } from "../Meshes/mesh";
import type { LinesMesh } from "../Meshes/linesMesh";
import { CreateBox } from "../Meshes/Builders/boxBuilder";
import { CreateCylinder } from "../Meshes/Builders/cylinderBuilder";
import { StandardMaterial } from "../Materials/standardMaterial";
import { PointerDragBehavior } from "../Behaviors/Meshes/pointerDragBehavior";
import type { GizmoAxisCache, IGizmo } from "./gizmo";
import { Gizmo } from "./gizmo";
import { UtilityLayerRenderer } from "../Rendering/utilityLayerRenderer";
import type { ScaleGizmo } from "./scaleGizmo";
import { Color3 } from "../Maths/math.color";
import type { TransformNode } from "../Meshes/transformNode";

/**
 * Interface for axis scale gizmo
 */
export interface IAxisScaleGizmo extends IGizmo {
    /** Drag behavior responsible for the gizmos dragging interactions */
    dragBehavior: PointerDragBehavior;
    /** Drag distance in babylon units that the gizmo will snap to when dragged */
    snapDistance: number;
    /**
     * Event that fires each time the gizmo snaps to a new location.
     * * snapDistance is the the change in distance
     */
    onSnapObservable: Observable<{ snapDistance: number }>;
    /** If the scaling operation should be done on all axis */
    uniformScaling: boolean;
    /** Custom sensitivity value for the drag strength */
    sensitivity: number;
    /** The magnitude of the drag strength (scaling factor) */
    dragScale: number;
    /** If the gizmo is enabled */
    isEnabled: boolean;
};


/**
 * Single axis scale gizmo
 */
export class AxisScaleGizmo extends Gizmo implements IAxisScaleGizmo {
    /**
     * Drag behavior responsible for the gizmos dragging interactions
     */
    public dragBehavior: PointerDragBehavior;
    protected _pointerObserver: Nullable<Observer<PointerInfo>> = null;
    /**
     * Scale distance in babylon units that the gizmo will snap to when dragged (Default: 0)
     */
    public snapDistance = 0;
    /**
     * Event that fires each time the gizmo snaps to a new location.
     * * snapDistance is the the change in distance
     */
    public onSnapObservable = new Observable<{ snapDistance: number }>();
    /**
     * If the scaling operation should be done on all axis (default: false)
     */
    public uniformScaling = false;
    /**
     * Custom sensitivity value for the drag strength
     */
    public sensitivity = 1;
    /**<commit_msg>Fix spacing inconsistency between IAxisScaleGizmo and AxisScaleGizmo definitions<commit_after>import type { Observer } from "../Misc/observable";
import { Observable } from "../Misc/observable";
import type { Nullable } from "../types";
import type { PointerInfo } from "../Events/pointerEvents";
import { Vector3, Matrix } from "../Maths/math.vector";
import type { AbstractMesh } from "../Meshes/abstractMesh";
import type { Node } from "../node";
import { Mesh } from "../Meshes/mesh";
import type { LinesMesh } from "../Meshes/linesMesh";
import { CreateBox } from "../Meshes/Builders/boxBuilder";
import { CreateCylinder } from "../Meshes/Builders/cylinderBuilder";
import { StandardMaterial } from "../Materials/standardMaterial";
import { PointerDragBehavior } from "../Behaviors/Meshes/pointerDragBehavior";
import type { GizmoAxisCache, IGizmo } from "./gizmo";
import { Gizmo } from "./gizmo";
import { UtilityLayerRenderer } from "../Rendering/utilityLayerRenderer";
import type { ScaleGizmo } from "./scaleGizmo";
import { Color3 } from "../Maths/math.color";
import type { TransformNode } from "../Meshes/transformNode";

/**
 * Interface for axis scale gizmo
 */
export interface IAxisScaleGizmo extends IGizmo {
    /** Drag behavior responsible for the gizmos dragging interactions */
    dragBehavior: PointerDragBehavior;
    /** Drag distance in babylon units that the gizmo will snap to when dragged */
    snapDistance: number;
    /**
     * Event that fires each time the gizmo snaps to a new location.
     * * snapDistance is the the change in distance
     */
    onSnapObservable: Observable<{ snapDistance: number }>;
    /** If the scaling operation should be done on all axis */
    uniformScaling: boolean;
    /** Custom sensitivity value for the drag strength */
    sensitivity: number;
    /** The magnitude of the drag strength (scaling factor) */
    dragScale: number;
    /** If the gizmo is enabled */
    isEnabled: boolean;
}

/**
 * Single axis scale gizmo
 */
export class AxisScaleGizmo extends Gizmo implements IAxisScaleGizmo {
    /**
     * Drag behavior responsible for the gizmos dragging interactions
     */
    public dragBehavior: PointerDragBehavior;
    protected _pointerObserver: Nullable<Observer<PointerInfo>> = null;
    /**
     * Scale distance in babylon units that the gizmo will snap to when dragged (Default: 0)
     */
    public snapDistance = 0;
    /**
     * Event that fires each time the gizmo snaps to a new location.
     * * snapDistance is the the change in distance
     */
    public onSnapObservable = new Observable<{ snapDistance: number }>();
    /**
     * If the scaling operation should be done on all axis (default: false)
     */
    public uniformScaling = false;
    /**
     * Custom sensitivity value for the drag strength
     */
    public sensitivity = 1;
    /**
{'fraction_non_alphanumeric': 0.1112290008841733, 'fraction_numerical': 0.0017683465959328027, 'mean_word_length': 3.327467482785004, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4661140', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1513, 'n_words': 561}