init
TypeScriptstatic initFloatLiteral(value: number): PhysicallyBasedMaterial_OpacitySwift declarationinit(floatLiteral value: Float)Creates an opacity object using a single value. - Parameters: - value: The opacity value.
struct · iOS 15.0+ · SDK 27.1
struct OpacityAn object that defines the opacity of an entity.
static initFloatLiteral(value: number): PhysicallyBasedMaterial_OpacitySwift declarationinit(floatLiteral value: Float)Creates an opacity object using a single value. - Parameters: - value: The opacity value.
static get textureSemantic(): TextureResource_SemanticSwift declarationstatic var textureSemantic: TextureResource.Semantic { get }The intended use of the object’s texture property.
static initScaleTexture(scale?: number, texture?: (MaterialParameters_Texture) | null): PhysicallyBasedMaterial_OpacitySwift declarationinit(scale: Float = 1.0, texture: PhysicallyBasedMaterial.Texture? = nil)Creates an opacity object using a single value or a texture. This initializer allows you to create an instance using either a single value for the entire material or a UV-mapped image. If `texture` is non-`nil`, RealityKit uses that image to determine the material’s opacity and ignores `scale`. If `texture` is `nil`, then it uses `scale` for the entire material. - Parameters: - scale: The opacity value for the entire material. - texture: The opacity values as a UV-mapped image.
get scale(): numberSwift declarationvar scale: Floatset scale(value: number)Swift declarationvar scale: Floatget texture(): (MaterialParameters_Texture) | nullSwift declarationvar texture: PhysicallyBasedMaterial.Texture?The amount of opacity specified using a UV-mapped image.
set texture(value: (MaterialParameters_Texture) | null)Swift declarationvar texture: PhysicallyBasedMaterial.Texture?The amount of opacity specified using a UV-mapped image.
static init(value: CustomMaterial_Opacity): PhysicallyBasedMaterial_OpacitySwift declarationinit(_ value: CustomMaterial.Opacity)Creates an opacity object using a custom material’s opacity property. - Parameters: - value: The custom material’s opacity property.
No declarations were skipped in this snapshot.