UNPKG

@polygonjs/polygonjs

Version:

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

33 lines (32 loc) 1.14 kB
"use strict"; import { GlType } from "./../../poly/registers/nodes/types/Gl"; import { TypedGlNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; class OutputGlParamsConfig extends NodeParamsConfig { } const ParamsConfig = new OutputGlParamsConfig(); export class OutputGlNode extends TypedGlNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return GlType.OUTPUT; } initializeNode() { super.initializeNode(); this.addPostDirtyHook("_setMatToRecompile", this._setMatToRecompile.bind(this)); this.lifecycle.onAfterAdded(() => { var _a, _b; (_b = (_a = this.materialNode()) == null ? void 0 : _a.assemblerController()) == null ? void 0 : _b.add_output_inputs(this); this._setMatToRecompile(); }); } setLines(shaders_collection_controller) { const assembler = shaders_collection_controller.assembler(); assembler.set_node_lines_output(this, shaders_collection_controller); } // set_color_declaration(color_declaration: string){ // this._color_declaration = color_declaration // } }