UNPKG

@polygonjs/polygonjs

Version:

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

68 lines (67 loc) 1.76 kB
"use strict"; import { NodeInputsController } from "./InputsController"; import { OutputsController } from "./OutputsController"; import { ConnectionsController } from "./ConnectionsController"; import { SavedConnectionPointsDataController } from "./SavedConnectionPointsDataController"; import { ConnectionPointsController } from "./ConnectionPointsController"; export class IOController { constructor(node) { this.node = node; this._connections = new ConnectionsController(this.node); } dispose() { this.inputs.dispose(); this.outputs.dispose(); this.connections.dispose(); } get connections() { return this._connections; } // // // inputs // // get inputs() { return this._inputs = this._inputs || new NodeInputsController(this.node); } hasInputs() { return this._inputs != null; } // // // outputs // // get outputs() { return this._outputs = this._outputs || new OutputsController(this.node); } has_outputs() { return this._outputs != null; } // // // connection_points // // get connection_points() { return this._connection_points = this._connection_points || new ConnectionPointsController(this.node, this.node.context()); } get has_connection_points_controller() { return this._connection_points != null; } // // // saved connection points data // // get saved_connection_points_data() { return this._saved_connection_points_data = this._saved_connection_points_data || new SavedConnectionPointsDataController(this.node); } clear_saved_connection_points_data() { if (this._saved_connection_points_data) { this._saved_connection_points_data.clear(); this._saved_connection_points_data = void 0; } } }