UNPKG

@polygonjs/polygonjs

Version:

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

42 lines (41 loc) 890 B
"use strict"; export class BaseConnectionPoint { constructor(_name, _type, _init_value) { this._name = _name; this._type = _type; this._init_value = _init_value; // protected _init_value: any; this._inNodeDefinition = false; } get init_value() { return this._init_value; } name() { return this._name; } type() { return this._type; } are_types_matched(src_type, dest_type) { return true; } inNodeDefinition() { return this._inNodeDefinition; } // get param_type(): IConnectionPointTypeToParamTypeMap[T] { // return ConnectionPointTypeToParamTypeMap[this._type]; // } // get init_value() { // return this._init_value; // } toJSON() { return this._json = this._json || this._createJSON(); } _createJSON() { return { name: this._name, type: this._type // isArray: false, }; } }