Bitbybit Docs
    Preparing search index...

    Class DrawManifoldOrCrossSectionOptions (Inputs.Draw)

    Feeds draw.optionsManifoldShapeMaterial: how a Manifold solid or mesh is drawn, by face color or engine material, with its shading and back faces, and how the outline of a cross-section is drawn.

    Index

    Constructors

    • Provide options without default values

      Parameters

      • OptionalfaceOpacity: number
      • OptionalfaceMaterial: any
      • OptionalfaceColour: string
      • OptionalcrossSectionColour: string
      • OptionalcrossSectionWidth: number
      • OptionalcrossSectionOpacity: number
      • OptionalcomputeNormals: boolean
      • OptionaldrawTwoSided: boolean
      • OptionalbackFaceColour: string
      • OptionalbackFaceOpacity: number
      • OptionalminSharpAngle: number

      Returns DrawManifoldOrCrossSectionOptions

    Properties

    faceOpacity?: number

    How opaque the faces are, from 0 for invisible to 1 for opaque; a faceMaterial replaces it.

    1
    

    0

    1

    0.1

    faceColour?: string

    The color of the faces of solids and meshes, as a hex string; a faceMaterial replaces it.

    #ff0000
    
    faceMaterial?: any

    An engine material for the faces, such as draw.createPBRMaterial makes; given, it replaces faceColour and faceOpacity.

    undefined
    

    true

    crossSectionColour?: string

    The color of the outline of a cross-section, as a hex string.

    #ff00ff
    
    crossSectionWidth?: number

    The width of the outline of a cross-section, a hundredth of it in model units.

    2
    
    crossSectionOpacity?: number

    How opaque the outline of a cross-section is, from 0 for invisible to 1 for opaque.

    1
    

    0

    1

    0.1

    computeNormals?: boolean

    When true, the mesh shades smoothly across edges flatter than minSharpAngle and keeps sharper ones crisp; when false, every face is shaded flat.

    true
    
    minSharpAngle?: number

    The angle between two faces, in degrees, above which their shared edge is drawn sharp when computeNormals is true.

    40
    

    0

    180

    5

    drawTwoSided?: boolean

    When true, the back of the faces of solids and meshes is drawn in backFaceColour, which shows which way they face.

    true
    
    backFaceColour?: string

    The color of the back of the faces, as a hex string; used with drawTwoSided.

    #0000ff
    
    backFaceOpacity?: number

    How opaque the back of the faces is, from 0 for invisible to 1 for opaque; used with drawTwoSided.

    1
    

    0

    1

    0.1