bitbybit.dev v1.0.0-rc.1
    Preparing search index...

    Class GenericPBRMaterialDto

    Generic PBR (Physically Based Rendering) material creation options. These properties represent the common subset available across BabylonJS, ThreeJS, and PlayCanvas. Property names follow BabylonJS conventions and are mapped to equivalent properties in other engines.

    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

    Name identifier for the material

    PBRMaterial
    
    baseColor: string

    Base/albedo color of the material in hex format

    #0000ff
    
    metallic: number

    Metallic factor (0 = dielectric, 1 = metallic)

    0.5
    

    0

    1

    0.1

    roughness: number

    Roughness factor (0 = smooth/mirror, 1 = rough/diffuse)

    0.5
    

    0

    1

    0.1

    alpha: number

    Overall opacity/transparency of the material (0 = fully transparent, 1 = fully opaque)

    1
    

    0

    1

    0.1

    emissiveColor?: string

    Emissive color - the color the material appears to emit (glow)

    #000000
    
    emissiveIntensity: number

    Intensity multiplier for the emissive color

    1
    

    0

    Infinity

    0.1

    zOffset: number

    Z-buffer depth offset factor to help with z-fighting on coplanar surfaces

    0
    

    -Infinity

    Infinity

    0.1

    zOffsetUnits: number

    Z-buffer depth offset units for fine-tuned z-fighting control

    0
    

    -Infinity

    Infinity

    1

    baseColorTexture?: any

    Texture to use for base/albedo color

    undefined
    

    true

    metallicRoughnessTexture?: any

    Combined metallic-roughness texture (metallic in B channel, roughness in G channel)

    undefined
    

    true

    normalTexture?: any

    Normal/bump map texture for surface detail

    undefined
    

    true

    emissiveTexture?: any

    Texture for emissive/glow areas

    undefined
    

    true

    occlusionTexture?: any

    Ambient occlusion texture for soft shadows in crevices

    undefined
    

    true

    alphaMode: alphaModeEnum

    Alpha/transparency mode: opaque, mask (cutout), or blend (translucent)

    opaque
    
    alphaCutoff: number

    Alpha threshold for mask mode (pixels below this are fully transparent)

    0.5
    

    0

    1

    0.05

    doubleSided: boolean

    Render both sides of faces (equivalent to disabling backFaceCulling)

    false
    
    wireframe: boolean

    Render material as wireframe

    false
    
    unlit: boolean

    Disable lighting calculations and render flat/unlit

    false