spatial-controls
Version:
Configurable 3D movement controls.
86 lines (85 loc) • 2.09 kB
TypeScript
import { EventDispatcher, Vector3 } from "three";
import { SettingsEventMap } from "./SettingsEventMap.js";
/**
* Translation settings.
*
* @group Settings
*/
export declare class TranslationSettings extends EventDispatcher<SettingsEventMap> {
/**
* Triggers when the settings are changed.
*
* @event
*/
static readonly EVENT_CHANGE = "change";
/**
* @see {@link enabled}
*/
private _enabled;
/**
* @see {@link sensitivity}
*/
private _sensitivity;
/**
* @see {@link boostMultiplier}
*/
private _boostMultiplier;
/**
* @see {@link axisModifier}
*/
private _axisWeights;
/**
* @see {@link damping}
*/
private _damping;
/**
* Constructs new translation settings.
*/
constructor();
/**
* Indicates whether positional translation is enabled.
*/
get enabled(): boolean;
set enabled(value: boolean);
/**
* The translation sensitivity.
*/
get sensitivity(): number;
set sensitivity(value: number);
/**
* The translation boost multiplier.
*/
get boostMultiplier(): number;
set boostMultiplier(value: number);
/**
* Weights that influence movement along each axis.
*/
get axisWeights(): Vector3;
set axisWeights(value: Vector3);
/**
* The damping factor. Range is [0.0, +Infinity]. Set to 0 to disable.
*/
get damping(): number;
set damping(value: number);
/**
* Copies the given translation settings.
*
* @param settings - Translation settings.
* @return This instance.
*/
copy(settings: TranslationSettings): TranslationSettings;
/**
* Clones this translation settings instance.
*
* @return The cloned translation settings.
*/
clone(): TranslationSettings;
/**
* Copies the given JSON data.
*
* @param json - The JSON data.
* @return This instance.
*/
fromJSON(json: TranslationSettings): TranslationSettings;
toJSON(): Record<string, unknown>;
}