@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
19 lines (18 loc) • 507 B
JavaScript
;
import { BaseSopOperation } from "./_Base";
import { createCapsuleGeometry } from "../../../core/player/CapsuleGeometry";
import { Vector3 } from "three";
export class CapsuleSopOperation extends BaseSopOperation {
static type() {
return "capsule";
}
cook(input_contents, params) {
return this.createCoreGroupFromGeometry(createCapsuleGeometry(params));
}
}
CapsuleSopOperation.DEFAULT_PARAMS = {
radius: 0.2,
height: 0.6,
divisions: 2,
center: new Vector3(0, 0, 0)
};