import { Vector3d } from "./vector3d"; /** * Function type for the observable vector update callback. * @param options - The update options. * @param options.newX - The new x value. * @param options.newY - The new y value. * @param options.newZ - The new z value. * @param options.currentX - The current x value. * @param options.currentY - The current y value. * @param options.currentZ - The current z value. * @returns - The updated values or undefined. If the values are returned, they will become the new x,y and z values. */ export type ObservableVector3dUpdateFn = (options: { newX: number; newY: number; newZ: number; currentX: number; currentY: number; currentZ: number; }) => { x?: number | undefined; y?: number | undefined; z?: number | undefined; } | void; export interface ObservableVector3d extends Vector3d { /** * Returns a `Vector3d` copy of this `ObservableVector3d` object. * @returns - The new Vector3d. */ toVector3d(): Vector3d; /** * Sets the vector value without triggering the callback. * @param x - The x value of the vector. * @param y - The y value of the vector. * @returns - Reference to this object for method chaining. */ setMuted(x: number, y: number, z: number): ObservableVector3d; /** * Returns a clone copy of this vector. * @returns - The cloned vector. */ clone(): ObservableVector3d; /** * Negates the vector values. * @returns - The negated vector. */ negate(): ObservableVector3d; /** * Ceils the vector values. * @returns - The ceiled vector. */ ceil(): ObservableVector3d; /** * Floors the vector values. * @returns - The floored vector. */ floor(): ObservableVector3d; /** * Clamps the vector values within the specified value range. * @param low - The lower bound. * @param high - The upper bound. * @returns - The clamped vector. */ clamp(low: number, high: number): ObservableVector3d; } interface CreateObservableVector3dOptions { target: Vector3d; updateFn: ObservableVector3dUpdateFn; } /** * Creates an observable vector. * This function wraps a given `Vector3d` object with a proxy that intercepts changes to the `x`, `y`, and `z` properties, * allowing for custom update logic via the provided `updateFn` callback. * @param options - The options for creating the observable vector. * @param options.target - The target vector to be made observable. * @param options.updateFn - The update function to be called whenever the vector's properties change. * @returns - The observable vector with additional methods for vector manipulation. */ export declare const createObservableVector3d: (options: CreateObservableVector3dOptions) => ObservableVector3d; export {}; //# sourceMappingURL=observableVector3d_old.d.ts.map