Bitbybit Docs
    Preparing search index...

    Class CreatePolyhedronDto (Inputs.BabylonMeshBuilder)

    Feeds babylon.meshBuilder.createPolyhedron: which of the built-in polyhedra to build or custom data for your own, its size per axis and its shading.

    Index

    Constructors

    • Parameters

      • Optionalsize: number
      • Optionaltype: number
      • OptionalsizeX: number
      • OptionalsizeY: number
      • OptionalsizeZ: number
      • Optionalcustom: number[]
      • Optionalflat: boolean
      • OptionalsideOrientation: sideOrientationEnum
      • OptionalenableShadows: boolean

      Returns CreatePolyhedronDto

    Properties

    size: number

    Size on every axis, in scene units, unless a per-axis size overrides it

    1
    

    0

    Infinity

    0.1

    type: number

    Which built-in shape, 0 to 14: 0 tetrahedron, 1 octahedron, 2 dodecahedron, 3 icosahedron, 4 rhombicuboctahedron, then prisms, pyramids, dipyramids and a cupola

    0
    

    0

    Infinity

    1

    sizeX: number

    Size along X, in scene units; 0 falls back to size

    0
    

    0

    Infinity

    0.1

    sizeY: number

    Size along Y, in scene units; 0 falls back to size

    0
    

    0

    Infinity

    0.1

    sizeZ: number

    Size along Z, in scene units; 0 falls back to size

    0
    

    0

    Infinity

    0.1

    custom?: number[]

    Your own polyhedron as the data the engine expects, used instead of type when given

    true

    flat: boolean

    When true, each face is shaded flat, showing facets instead of a smooth surface

    false
    
    sideOrientation: sideOrientationEnum

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

    frontside
    
    enableShadows: boolean

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

    true