Bitbybit Docs
    Preparing search index...

    Class CreatePolygonDto (Inputs.BabylonMeshBuilder)

    Feeds babylon.meshBuilder.createPolygon: the outline of a flat polygon in the XZ plane, its holes, an optional thickness and how it is shaded and wrapped.

    Index

    Constructors

    • Parameters

      • Optionalshape: Vector3[]
      • Optionalholes: Vector3[][]
      • Optionaldepth: number
      • OptionalsmoothingThreshold: number
      • OptionalsideOrientation: sideOrientationEnum
      • Optionalwrap: boolean
      • OptionalenableShadows: boolean

      Returns CreatePolygonDto

    Properties

    shape: Vector3[]

    The outline points in order, only X and Z used; the outline must not cross itself

    holes?: Vector3[][]

    Lists of points, one outline per hole cut out of the polygon

    true

    depth: number

    Thickness the polygon is given downward along Y, in scene units; 0 keeps it flat

    0
    

    0

    Infinity

    0.1

    smoothingThreshold: number

    How close two face normals must be for the edge between them to be shaded smooth

    0.01
    

    0

    1

    0.01

    sideOrientation: sideOrientationEnum

    Which side of each face is drawn: the front, the back or both; single-sided meshes are invisible from behind

    frontside
    
    wrap: boolean

    When true, the sides of an extruded polygon get texture coordinates that wrap around it

    false
    
    enableShadows: boolean

    When true, the mesh casts and receives shadows from the lights that have them enabled

    true