polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
25 lines (24 loc) • 827 B
JavaScript
import {TypedSopNode} from "./_Base";
import {CenterSopOperation} from "../../../core/operations/sop/Center";
import {NodeParamsConfig} from "../utils/params/ParamsConfig";
class CenterSopParamsConfig extends NodeParamsConfig {
}
const ParamsConfig2 = new CenterSopParamsConfig();
export class CenterSopNode extends TypedSopNode {
constructor() {
super(...arguments);
this.params_config = ParamsConfig2;
}
static type() {
return "center";
}
initializeNode() {
this.io.inputs.setCount(1);
this.io.inputs.initInputsClonedState(CenterSopOperation.INPUT_CLONED_STATE);
}
cook(input_contents) {
this._operation = this._operation || new CenterSopOperation(this.scene(), this.states);
const core_group = this._operation.cook(input_contents, this.pv);
this.setCoreGroup(core_group);
}
}