Bitbybit Docs
    Preparing search index...

    Class GenericPBRMaterialDto (Inputs.Draw)

    Feeds draw.createPBRMaterial: a physically based material for the faceMaterial of the drawing options, from a base color, metallic and roughness values, opacity, glow, texture slots and how the faces are rendered.

    Index

    Constructors

    • Parameters

      • Optionalname: string
      • OptionalbaseColor: string
      • Optionalmetallic: number
      • Optionalroughness: number
      • Optionalalpha: number
      • OptionalemissiveColor: string
      • OptionalemissiveIntensity: number
      • OptionalzOffset: number
      • OptionalzOffsetUnits: number
      • OptionalbaseColorTexture: any
      • OptionalmetallicRoughnessTexture: any
      • OptionalnormalTexture: any
      • OptionalemissiveTexture: any
      • OptionalocclusionTexture: any
      • OptionalalphaMode: alphaModeEnum
      • OptionalalphaCutoff: number
      • OptionaldoubleSided: boolean
      • Optionalwireframe: boolean
      • Optionalunlit: boolean

      Returns GenericPBRMaterialDto

    Properties

    name?: string

    The name the engine gives the material.

    PBRMaterial
    
    baseColor?: string

    The base color of the surface, as a hex string.

    #0000ff
    
    metallic?: number

    How metallic the surface is, from 0 for plastic-like to 1 for metal.

    0.5
    

    0

    1

    0.1

    roughness?: number

    How rough the surface is, from 0 for a mirror-like shine to 1 for a matte finish.

    0.5
    

    0

    1

    0.1

    alpha?: number

    How opaque the material is, from 0 for invisible to 1 for opaque; the default opaque mode of alphaMode ignores it and blend shows it.

    1
    

    0

    1

    0.1

    emissiveColor?: string

    The color the surface glows with whatever the scene's lights, as a hex string; black, the default, adds no glow.

    #000000
    
    emissiveIntensity?: number

    How strongly the surface glows: the emissive color is multiplied by it.

    1
    

    0

    Infinity

    0.1

    zOffset?: number

    Not read by this renderer; its materials keep no depth offset.

    0
    

    -Infinity

    Infinity

    0.1

    zOffsetUnits?: number

    Not read by this renderer; its materials keep no depth offset.

    0
    

    -Infinity

    Infinity

    1

    baseColorTexture?: any

    An image from draw.createTexture for the base color of the surface.

    undefined
    

    true

    metallicRoughnessTexture?: any

    An image holding metallic in its blue channel and roughness in its green channel, as glTF lays them out.

    undefined
    

    true

    normalTexture?: any

    A normal map, which adds surface detail by bending the lighting without changing the geometry.

    undefined
    

    true

    emissiveTexture?: any

    An image giving where and in which color the surface glows.

    undefined
    

    true

    occlusionTexture?: any

    An ambient occlusion map, which darkens the creases and corners light reaches less.

    undefined
    

    true

    alphaMode?: alphaModeEnum

    How opacity is applied: opaque ignores it, mask cuts away pixels below alphaCutoff, and blend draws the faces see-through.

    opaque
    
    alphaCutoff?: number

    The opacity below which a pixel is cut away; used with alphaMode set to mask.

    0.5
    

    0

    1

    0.05

    doubleSided?: boolean

    When true, both sides of each face are drawn; when false, the back is culled.

    false
    
    wireframe?: boolean

    Not read by this renderer; the faces are drawn filled whatever the value.

    false
    
    unlit?: boolean

    When true, the scene's lights are ignored and the surface shows its colors flat.

    false