UNPKG

@polygonjs/polygonjs

Version:

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

34 lines (33 loc) 1.22 kB
"use strict"; import { TRIGGER_CONNECTION_NAME, TypedJsNode } from "./_Base"; import { NodeParamsConfig, ParamConfig } from "../utils/params/ParamsConfig"; import { JsConnectionPoint, JsConnectionPointType, JS_CONNECTION_POINT_IN_NODE_DEF } from "../utils/io/connections/Js"; import { NodeContext } from "../../poly/NodeContext"; const CONNECTION_OPTIONS = JS_CONNECTION_POINT_IN_NODE_DEF; class PauseAudioSourceJsParamsConfig extends NodeParamsConfig { constructor() { super(...arguments); /** @param audio node */ this.node = ParamConfig.NODE_PATH("", { nodeSelection: { context: NodeContext.AUDIO } // dependentOnFoundNode: false, }); } } const ParamsConfig = new PauseAudioSourceJsParamsConfig(); export class BaseAudioSourceJsNode extends TypedJsNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } initializeNode() { this.io.inputs.setNamedInputConnectionPoints([ new JsConnectionPoint(TRIGGER_CONNECTION_NAME, JsConnectionPointType.TRIGGER, CONNECTION_OPTIONS) ]); this.io.outputs.setNamedOutputConnectionPoints([ new JsConnectionPoint(TRIGGER_CONNECTION_NAME, JsConnectionPointType.TRIGGER) ]); } }