@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
17 lines (16 loc) • 390 B
JavaScript
;
import { NamedFunction2 } from "./_Base";
import { NodeContext } from "../poly/NodeContext";
export class cookNode extends NamedFunction2 {
static type() {
return "cookNode";
}
func(node, options) {
if (node && node.context() == NodeContext.SOP) {
node.setDirty();
node.compute().then(() => {
options.onCookCompleted();
});
}
}
}