@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
28 lines (27 loc) • 914 B
JavaScript
;
import { TypedGlNode } from "./_Base";
import { GlType } from "./../../poly/registers/nodes/types/Gl";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
class GlobalsGlParamsConfig extends NodeParamsConfig {
}
const ParamsConfig = new GlobalsGlParamsConfig();
export class GlobalsGlNode extends TypedGlNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return GlType.GLOBALS;
}
initializeNode() {
super.initializeNode();
this.lifecycle.onAfterAdded(() => {
var _a, _b;
(_b = (_a = this.materialNode()) == null ? void 0 : _a.assemblerController()) == null ? void 0 : _b.add_globals_outputs(this);
});
}
setLines(shaders_collection_controller) {
const assembler = shaders_collection_controller.assembler();
assembler.set_node_lines_globals(this, shaders_collection_controller);
}
}