UNPKG

@polygonjs/polygonjs

Version:

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

46 lines (45 loc) 2.42 kB
import { NodeContext, NodeContextUnion } from '../../../../poly/NodeContext'; import { BaseGlConnectionPoint, GlConnectionPointType, GlConnectionPoint } from './Gl'; import { BaseJsConnectionPoint, JsConnectionPointType, JsConnectionPoint } from './Js'; import { BaseEventConnectionPoint, EventConnectionPoint, EventConnectionPointType } from './Event'; type ConnectionPointTypeMapGeneric = { [key in NodeContext]: BaseEventConnectionPoint | BaseGlConnectionPoint | BaseJsConnectionPoint | undefined; }; export interface ConnectionPointTypeMap extends ConnectionPointTypeMapGeneric { [NodeContext.ANIM]: undefined; [NodeContext.AUDIO]: undefined; [NodeContext.COP]: undefined; [NodeContext.EVENT]: BaseEventConnectionPoint; [NodeContext.GL]: BaseGlConnectionPoint; [NodeContext.JS]: BaseJsConnectionPoint; [NodeContext.MANAGER]: undefined; [NodeContext.MAT]: undefined; [NodeContext.OBJ]: undefined; [NodeContext.POST]: undefined; [NodeContext.ROP]: undefined; [NodeContext.SOP]: undefined; } type ConnectionPointEnumMapGeneric = { [key in NodeContext]: EventConnectionPointType | GlConnectionPointType | JsConnectionPointType | undefined; }; export interface ConnectionPointEnumMap extends ConnectionPointEnumMapGeneric { [NodeContext.ANIM]: undefined; [NodeContext.AUDIO]: undefined; [NodeContext.COP]: undefined; [NodeContext.EVENT]: EventConnectionPointType; [NodeContext.GL]: GlConnectionPointType; [NodeContext.JS]: JsConnectionPointType; [NodeContext.MANAGER]: undefined; [NodeContext.MAT]: undefined; [NodeContext.OBJ]: undefined; [NodeContext.POST]: undefined; [NodeContext.ROP]: undefined; [NodeContext.SOP]: undefined; } type IConnectionPointEnumMap = { [key in NodeContextUnion]: ConnectionPointEnumMap[key]; }; export declare const DEFAULT_CONNECTION_POINT_ENUM_MAP: IConnectionPointEnumMap; export declare function createConnectionPoint<NC extends NodeContext>(context: NC, name: string, type: ConnectionPointEnumMap[NC]): GlConnectionPoint<GlConnectionPointType> | JsConnectionPoint<JsConnectionPointType> | EventConnectionPoint<EventConnectionPointType> | undefined; export declare function paramTypeToConnectionPointTypeMap<NC extends NodeContext>(context: NC): import("./Js").IJsParamTypeToConnectionPointTypeMap | import("./Gl").IGLParamTypeToConnectionPointTypeMap | undefined; export {};