UNPKG

@polygonjs/polygonjs

Version:

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

28 lines (27 loc) 932 B
"use strict"; import { TypedJsNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; import { JsType } from "../../poly/registers/nodes/types/Js"; class GlobalsJsParamsConfig extends NodeParamsConfig { } const ParamsConfig = new GlobalsJsParamsConfig(); export class GlobalsJsNode extends TypedJsNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return JsType.GLOBALS; } initializeNode() { super.initializeNode(); this.lifecycle.onAfterAdded(() => { var _a, _b; (_b = (_a = this.functionNode()) == null ? void 0 : _a.assemblerController()) == null ? void 0 : _b.add_globals_outputs(this); }); } setLines(linesController) { var _a, _b; (_b = (_a = this.functionNode()) == null ? void 0 : _a.assemblerController()) == null ? void 0 : _b.assembler.setNodeLinesGlobals(this, linesController); } }