One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

PortalComponent.SurfaceStyle

struct · iOS 27.0+ · SDK 27.1

struct SurfaceStyle

The size of the flat plane mesh that RealityKit generates for a portal. The factory entry points ``PortalComponent/makePortal(surfaceStyle:boundaryStyle:boundaryMode:)`` and ``PortalComponent/configure(world:portalEntity:surfaceStyle:boundaryStyle:boundaryMode:)`` use this value to build a ``ModelComponent`` whose mesh is a plane on the entity's local XY plane, centered at the entity's origin. The portal mesh size is independent of the clipping or crossing boundary, which you configure with ``PortalComponent/BoundaryStyle``.

Members (5)

init · iOS 27.0+

init

TypeScript
static init(width: number, height: number): PortalComponent_SurfaceStyle
Swift declaration
init(width: Float, height: Float)

Creates a surface style with the given width and height in meters. - Parameters: - width: The width of the portal mesh, in meters. - height: The height of the portal mesh, in meters.

get · iOS 27.0+

width

TypeScript
get width(): number
Swift declaration
var width: Float

The width of the portal mesh, in meters, along the entity's local X axis.

set · iOS 27.0+

width

TypeScript
set width(value: number)
Swift declaration
var width: Float

The width of the portal mesh, in meters, along the entity's local X axis.

get · iOS 27.0+

height

TypeScript
get height(): number
Swift declaration
var height: Float

The height of the portal mesh, in meters, along the entity's local Y axis.

set · iOS 27.0+

height

TypeScript
set height(value: number)
Swift declaration
var height: Float

The height of the portal mesh, in meters, along the entity's local Y axis.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →