UNPKG

@polygonjs/polygonjs

Version:

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

26 lines (25 loc) 876 B
"use strict"; import { TypedSopNode } from "./_Base"; import { ConvexHullSopOperation } from "../../operations/sop/ConvexHull"; import { NodeParamsConfig } from "../utils/params/ParamsConfig"; class ConvexHullSopParamsConfig extends NodeParamsConfig { } const ParamsConfig = new ConvexHullSopParamsConfig(); export class ConvexHullSopNode extends TypedSopNode { constructor() { super(...arguments); this.paramsConfig = ParamsConfig; } static type() { return "convexHull"; } initializeNode() { this.io.inputs.setCount(0, 1); this.io.inputs.initInputsClonedState(ConvexHullSopOperation.INPUT_CLONED_STATE); } cook(inputCoreGroups) { this._operation = this._operation || new ConvexHullSopOperation(this._scene, this.states, this); const coreGroup = this._operation.cook(inputCoreGroups, this.pv); this.setCoreGroup(coreGroup); } }