webgpu-utils

    Function createTruncatedConeVertices

    • Creates vertices for a truncated cone, which is like a cylinder except that it has different top and bottom radii. A truncated cone can also be used to create cylinders and regular cones. The truncated cone will be created centered about the origin, with the y axis as its vertical axis. .

      Parameters

      • params: {
            bottomCap?: boolean;
            bottomRadius?: number;
            height?: number;
            radialSubdivisions?: number;
            topCap?: boolean;
            topRadius?: number;
            verticalSubdivisions?: number;
        } = {}
        • OptionalbottomCap?: boolean

          Create bottom cap. Default = true.

        • OptionalbottomRadius?: number

          Bottom radius of truncated cone. Default = 1

        • Optionalheight?: number

          Height of truncated cone. Default = 1

        • OptionalradialSubdivisions?: number

          The number of subdivisions around the truncated cone. Default = 24

        • OptionaltopCap?: boolean

          Create top cap. Default = true.

        • OptionaltopRadius?: number

          Top radius of truncated cone. Default = 0

        • OptionalverticalSubdivisions?: number

          The number of subdivisions down the truncated cone. Default = 1

      Returns Arrays

      The created cone vertices.

    MMNEPVFCICPMFPCPTTAAATR