One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

PhysicallyBasedMaterial.Opacity

struct · iOS 15.0+ · SDK 27.1

struct Opacity

An object that defines the opacity of an entity.

Members (8)

init · iOS 15.0+

init

TypeScript
static initFloatLiteral(value: number): PhysicallyBasedMaterial_Opacity
Swift declaration
init(floatLiteral value: Float)

Creates an opacity object using a single value. - Parameters: - value: The opacity value.

get · iOS 15.0+

textureSemantic

TypeScript
static get textureSemantic(): TextureResource_Semantic
Swift declaration
static var textureSemantic: TextureResource.Semantic { get }

The intended use of the object’s texture property.

init · iOS 15.0+

init

TypeScript
static initScaleTexture(scale?: number, texture?: (MaterialParameters_Texture) | null): PhysicallyBasedMaterial_Opacity
Swift declaration
init(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 · iOS 15.0+

scale

TypeScript
get scale(): number
Swift declaration
var scale: Float
set · iOS 15.0+

scale

TypeScript
set scale(value: number)
Swift declaration
var scale: Float
get · iOS 15.0+

texture

TypeScript
get texture(): (MaterialParameters_Texture) | null
Swift declaration
var texture: PhysicallyBasedMaterial.Texture?

The amount of opacity specified using a UV-mapped image.

set · iOS 15.0+

texture

TypeScript
set texture(value: (MaterialParameters_Texture) | null)
Swift declaration
var texture: PhysicallyBasedMaterial.Texture?

The amount of opacity specified using a UV-mapped image.

init · iOS 15.0+

init

TypeScript
static init(value: CustomMaterial_Opacity): PhysicallyBasedMaterial_Opacity
Swift declaration
init(_ value: CustomMaterial.Opacity)

Creates an opacity object using a custom material’s opacity property. - Parameters: - value: The custom material’s opacity property.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →