@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
43 lines (42 loc) • 2.04 kB
TypeScript
import { Object3D } from 'three';
import { Constructor, ConvertToStrings } from '../../../../../types/GlobalTypes';
import { BaseRayObjectIntersectionsController } from './_BaseRayObjectIntersectionsController';
import { ObjectOptions, GPUOptions, CPUOptions, PriorityOptions, ButtonsAndModifierOptions, ButtonsAndModifierOptionsAsString } from './Common';
interface ClickOptions {
maxCursorMoveDistance: number;
maxDuration: number;
callback: () => void;
}
export interface ObjectToMouseClickOptions extends ObjectOptions {
click: ClickOptions;
config: ButtonsAndModifierOptions;
}
export interface ObjectToClickOptionsAsString {
priority: ConvertToStrings<PriorityOptions>;
cpu?: ConvertToStrings<CPUOptions>;
gpu?: ConvertToStrings<GPUOptions>;
click: ConvertToStrings<ClickOptions>;
config: ButtonsAndModifierOptionsAsString;
}
export declare function ClickParamConfig<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
/** @param max cursor move distance */
maxCursorMoveDistance: import("../../../../nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../../index_all").ParamType.FLOAT>;
/** @param max duration */
maxDuration: import("../../../../nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../../index_all").ParamType.INTEGER>;
};
} & TBase;
export declare class RayObjectIntersectionsMouseClickController extends BaseRayObjectIntersectionsController {
protected _propertiesListByObject: Map<Object3D, ObjectToMouseClickOptions[]>;
protected _intersectedStateOnMousedownByObject: Map<Object3D, boolean>;
protected _intersectedStateOnMouseupByObject: Map<Object3D, boolean>;
private _objectsMatchingEventConfig;
private _objectsIntersectedOnMousedown;
private _cursorMoveMonitor;
private _mousedownEvent;
private _mousedownReceivedAt;
private _bound;
onMousedown(event: Readonly<PointerEvent | MouseEvent | TouchEvent>): void;
private _onMouseup;
}
export {};