spatial-controls
Version:
Configurable 3D movement controls.
102 lines (101 loc) • 2.29 kB
TypeScript
import { EventDispatcher } from "three";
import { SettingsEventMap } from "./SettingsEventMap.js";
/**
* Zoom settings.
*
* @group Settings
*/
export declare class ZoomSettings extends EventDispatcher<SettingsEventMap> {
/**
* Triggers when the settings are changed.
*
* @event
*/
static readonly EVENT_CHANGE = "change";
/**
* @see {@link enabled}
*/
private _enabled;
/**
* @see {@link inverted}
*/
private _inverted;
/**
* @see {@link minDistance}
*/
private _minDistance;
/**
* @see {@link maxDistance}
*/
private _maxDistance;
/**
* @see {@link sensitivity}
*/
private _sensitivity;
/**
* @see {@link damping}
*/
private _damping;
/**
* Constructs new zoom settings.
*/
constructor();
/**
* Indicates whether zooming is enabled.
*/
get enabled(): boolean;
set enabled(value: boolean);
/**
* Indicates whether the zoom controls should be inverted.
*/
get inverted(): boolean;
set inverted(value: boolean);
/**
* The minimum zoom distance.
*/
get minDistance(): number;
set minDistance(value: number);
/**
* The maximum zoom distance.
*/
get maxDistance(): number;
set maxDistance(value: number);
/**
* Sets the minimum and maximum zoom distance.
*
* @param min - The minimum distance.
* @param max - The maximum distance.
*/
setRange(min: number, max: number): void;
/**
* The zoom sensitivity.
*/
get sensitivity(): number;
set sensitivity(value: number);
/**
* The damping factor.
*/
get damping(): number;
set damping(value: number);
/**
* Copies the given zoom settings.
*
* @param settings - Zoom settings.
* @return This instance.
*/
copy(settings: ZoomSettings): ZoomSettings;
/**
* Clones this zoom settings instance.
*
* @return The cloned zoom settings.
*/
clone(): ZoomSettings;
/**
* Copies the given JSON data.
*
* @param json - The JSON data.
* @return This instance.
*/
fromJSON(json: ZoomSettings): ZoomSettings;
toJSON(): Record<string, unknown>;
}