UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

32 lines (31 loc) 1.45 kB
import { BaseConnectionPoint } from './_Base'; import { ParamType } from '../../../../poly/ParamType'; import type { EventContext } from '../../../../../core/event/EventContextType'; export declare enum EventConnectionPointType { BASE = "base", DRAG = "drag", KEYBOARD = "keyboard", MOUSE = "mouse", POINTER = "pointer" } export declare const EVENT_CONNECTION_POINT_TYPES: Array<EventConnectionPointType>; export interface EventConnectionPointData<T extends EventConnectionPointType> { name: string; type: T; isArray?: boolean; } export declare class EventConnectionPoint<T extends EventConnectionPointType> extends BaseConnectionPoint { protected _name: string; protected _type: T; protected _event_listener?: ((event_context: EventContext<any>) => void) | undefined; protected _json: EventConnectionPointData<T> | undefined; constructor(_name: string, _type: T, // protected _init_value?: ConnectionPointInitValueMapGeneric[T] _event_listener?: ((event_context: EventContext<any>) => void) | undefined); type(): T; get param_type(): ParamType; are_types_matched(src_type: string, dest_type: string): boolean; get event_listener(): ((event_context: EventContext<any>) => void) | undefined; toJSON(): EventConnectionPointData<T>; protected _createJSON(): EventConnectionPointData<T>; } export type BaseEventConnectionPoint = EventConnectionPoint<EventConnectionPointType>;