setOpacity

fun setOpacity(opacity: Float)

Sets the opacity of the PhysicallyBasedMaterial.

Valid range: [0.0f, 1.0f] (inclusive); values outside this range will be clamped to [0.0f, 1.0f] when applied.

Behavior depends on the current BlendingMode:

Parameters

opacity

The opacity value to set.

See also

Throws

IllegalStateException

If this material is closed or invalid.