@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
33 lines (32 loc) • 1.14 kB
JavaScript
;
import { TypedSopNode } from "./_Base";
import { NodeParamsConfig } from "../utils/params/ParamsConfig";
import { InputCloneMode } from "../../poly/InputCloneMode";
import {
CoreComputerVisionHand,
CoreComputerVisionHandParamConfig
} from "../../../core/computerVision/hand/CoreComputerVisionHand";
class TrackingLandmarksHandAttributesSopParamsConfig extends CoreComputerVisionHandParamConfig(NodeParamsConfig) {
}
const ParamsConfig = new TrackingLandmarksHandAttributesSopParamsConfig();
export class TrackingLandmarksHandAttributesSopNode extends TypedSopNode {
constructor() {
super(...arguments);
this.paramsConfig = ParamsConfig;
}
static type() {
return "trackingLandmarksHandAttributes";
}
initializeNode() {
this.io.inputs.setCount(1);
this.io.inputs.initInputsClonedState(InputCloneMode.FROM_NODE);
}
cook(inputCoreGroups) {
const inputCoreGroup = inputCoreGroups[0];
const objects = inputCoreGroup.threejsObjects();
for (const object of objects) {
CoreComputerVisionHand.setAttributes(object, this.pv);
}
this.setCoreGroup(inputCoreGroup);
}
}