Documentation
    Preparing search index...

    Function circleGeometry2D

    • A filled circle in the XY plane centred on the origin, facing +Z (§50's Circle, built as §53 buffer geometry).

      The shape is a triangle fan — centre vertex plus segments rim vertices — but it is emitted as indexed triangles, not as a TRIANGLE_FAN draw: fans cannot be batched or instanced with other geometry (§65), are absent from several modern APIs, and would force the draw path to carry a second primitive topology for one shape. The vertex saving is kept (segments + 1 vertices, not 3 * segments); only the assembly is spelled out.

      Rim vertex i sits at angle 2πi / segments, so vertices advance counter-clockwise from +X and every triangle (centre, i, i + 1) is wound counter-clockwise seen from +Z (§7a).

      Uv (§53, R-19) is the circle's bounding square: (0.5, 0.5) at the centre and (0.5 + 0.5·cos θ, 0.5 + 0.5·sin θ) on the rim, so a texture is mapped as if painted on the square the disc is inscribed in and the disc cuts out its middle. That is the mapping a radial gauge, a clock face, or a circular sprite wants; the alternative — polar uv, u = θ/2π, v = r/radius — belongs to whichever packet needs a swirl and can add it as an option.

      Parameters

      Returns BufferGeometry