Type Alias CustomMaterialProps

CustomMaterialProps: {
    customDepthMaterial?: Material;
    customDistanceMaterial?: Material;
    customMaterial?: Material | Material[];
    onMaterialPropertiesChange?: (
        props: Record<string, any>,
        material: Material | Material[],
    ) => void;
}

Common props for 3d components that allow overriding shader materials

Type declaration

  • OptionalcustomDepthMaterial?: Material

    set a custom depth material if required

  • OptionalcustomDistanceMaterial?: Material

    set a custom distance material if required

  • OptionalcustomMaterial?: Material | Material[]

    custom material or array of materials for overriding default component material(s)

  • OptionalonMaterialPropertiesChange?: (props: Record<string, any>, material: Material | Material[]) => void

    callback to invoke when component is updated. Use this for setting/uppdaing uniforms in your custom material(s)