threejs-worldgen
    Preparing search index...

    Function clipPolygon

    • Keeps the part of polygon p on the side of the line through (px, pz) that (nx, nz) points away from (Sutherland–Hodgman). tags (one per edge) follow their edges; edges created along the cut line get cutTag.

      Type Parameters

      • T

      Parameters

      • p: readonly Vec2[]
      • tags: readonly T[]
      • px: number
      • pz: number
      • nx: number
      • nz: number
      • cutTag: T

      Returns TaggedPolygon<T>