Bitbybit Docs
    Preparing search index...

    Class DrawRecipeMeshesOptions (Inputs.Draw)

    How the meshes of a recipe, as manifold.recipes.meshes gives them, are drawn: the tag naming an element, when a mesh placed many times becomes instances, the size of a merged batch, and the look of roots without a color.

    Index

    Constructors

    • Parameters

      • OptionalelementKey: string
      • Optionalinstancing: boolean
      • OptionalminInstances: number
      • OptionalmaxBatchVertices: number
      • OptionaldefaultColour: string
      • OptionaldefaultOpacity: number
      • Optionalmetallic: number
      • Optionalroughness: number

      Returns DrawRecipeMeshesOptions

    Properties

    elementKey?: string

    The tag whose value names an element, so the roots sharing it show, hide, color and pick as one.

    globalId
    
    instancing?: boolean

    When true, a mesh placed often enough by matrices that only turn and move is drawn as instances, one draw call for all of them.

    true
    
    minInstances?: number

    How many such placements of one mesh make it instances.

    2
    

    2

    Infinity

    1

    maxBatchVertices?: number

    The most vertices one merged batch holds; more start another batch.

    1000000
    

    1

    Infinity

    1000

    defaultColour?: string

    The color of a root whose tag has no rgba.

    #cccccc
    
    defaultOpacity?: number

    The opacity of such a root, from 0 to 1.

    1
    

    0

    1

    0.1

    metallic?: number

    How metallic every surface is, from 0 to 1.

    0
    

    0

    1

    0.1

    roughness?: number

    How rough every surface is, from 0 to 1.

    0.8
    

    0

    1

    0.1