UNPKG

@polygonjs/polygonjs

Version:

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

31 lines (30 loc) 1 kB
"use strict"; import { TRIGGER_CONNECTION_NAME, TypedJsNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; import { JsConnectionPoint, JsConnectionPointType } from "../utils/io/connections/Js"; import { JsType } from "../../poly/registers/nodes/types/Js"; class OnSceneResetJsParamsConfig extends NodeParamsConfig { } const ParamsConfig = new OnSceneResetJsParamsConfig(); export class OnSceneResetJsNode extends TypedJsNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return JsType.ON_SCENE_RESET; } isTriggering() { return true; } initializeNode() { this.io.outputs.setNamedOutputConnectionPoints([ new JsConnectionPoint(TRIGGER_CONNECTION_NAME, JsConnectionPointType.TRIGGER) ]); } setTriggeringLines(shadersCollectionController, triggeredMethods) { shadersCollectionController.addTriggeringLines(this, [triggeredMethods], { gatherable: true }); } }