UNPKG

@polygonjs/polygonjs

Version:

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

36 lines (35 loc) 1.09 kB
"use strict"; import { TypedAnimNode } from "./_Base"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; import { NetworkChildNodeType } from "../../poly/NodeContext"; class AnimSubnetOutputSopParamsConfig extends NodeParamsConfig { } const ParamsConfig = new AnimSubnetOutputSopParamsConfig(); export class SubnetOutputAnimNode extends TypedAnimNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; this._setParentDirtyBound = this._setParentDirty.bind(this); } static type() { return NetworkChildNodeType.OUTPUT; } initializeNode() { this.io.inputs.setCount(1); this.io.outputs.setHasNoOutput(); this.lifecycle.onAfterAdded(this._setParentDirtyBound); this.addPostDirtyHook("makeParentDirty", this._setParentDirtyBound); } dispose() { super.dispose(); this._setParentDirty(); } cook(inputContents) { const timelineBuilder = inputContents[0]; this.setTimelineBuilder(timelineBuilder); } _setParentDirty() { var _a; (_a = this.parent()) == null ? void 0 : _a.setDirty(); } }