Function createSphereVertices

  • Creates sphere vertices.

    The created sphere has position, normal, and texcoord data

    Parameters

    • params: {
          endLatitudeInRadians?: number;
          endLongitudeInRadians?: number;
          radius?: number;
          startLatitudeInRadians?: number;
          startLongitudeInRadians?: number;
          subdivisionsAxis?: number;
          subdivisionsHeight?: number;
      } = {}
      • OptionalendLatitudeInRadians?: number

        Where to end the bottom of the sphere. Default = π

      • OptionalendLongitudeInRadians?: number

        where to end wrapping the sphere. Default = 2π

      • Optionalradius?: number

        radius of the sphere. Default = 1

      • OptionalstartLatitudeInRadians?: number

        where to start the top of the sphere. Default = 0

      • OptionalstartLongitudeInRadians?: number

        where to start wrapping the sphere. Default = 0

      • OptionalsubdivisionsAxis?: number

        number of steps around the sphere. Default = 24

      • OptionalsubdivisionsHeight?: number

        number of vertically on the sphere. Default = 12

    Returns Arrays

    The created sphere vertices.