API

Function CreatePolygonVertexData

  • Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build() All parameters are provided by CreatePolygon as needed

    Parameters

    • polygon: Mesh

      a mesh built from polygonTriangulation.build()

    • sideOrientation: number

      takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE

    • OptionalfUV: Vector4[]

      an array of Vector4 elements used to set different images to the top, rings and bottom respectively

    • OptionalfColors: Color4[]

      an array of Color3 elements used to set different colors to the top, rings and bottom respectively

    • OptionalfrontUVs: Vector4

      only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)

    • OptionalbackUVs: Vector4

      only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)

    • Optionalwrp: boolean

      a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side

    Returns VertexData

    the VertexData of the Polygon