Documentation
    Preparing search index...

    Interface CapsuleShape

    A capsule — a cylinder capped by hemispheres — with its axis along +Y (§24). Valid in both dimensions: in a "2d" world it is the 2D stadium/pill shape, in a "3d" world the 3D capsule. The parameters are the same in both, which is exactly §21's parallel-naming rule.

    interface CapsuleShape {
        halfHeight: number;
        radius: number;
        type: "capsule";
    }
    Index
    halfHeight: number

    Half the length of the cylindrical section only, along local Y — excluding the caps. The total height of the shape is therefore 2 * (halfHeight + radius). Must be > 0; a capsule with no cylindrical section is a circle or a sphere and should be declared as one.

    radius: number

    Radius of the caps and of the cylindrical section. Must be > 0.

    type: "capsule"