Class

PointLight

An entity that produces an omnidirectional light for virtual objects.

Declaration

class PointLight : Entity

Overview

During an AR session, RealityKit automatically lights your virtual objects to match real-world lighting. You can also explicitly add virtual lights that act upon your virtual content. This is typically most useful outside of an AR session (with the view’s cameraMode property set to ARView.CameraMode.nonAR).

The point light is an omnidirectional light that illuminates all the virtual content within a configurable radius from the light. You can configure the light’s color and intensity.

Topics

Creating a Point Light

init()

Creates a new point light entity.

func clone(recursive: Bool) -> Self

Duplicates a point light entity to create a new point light entity.

Identifying a Point Light

var id: ObjectIdentifier

The stable identity of the entity associated with self.

var id: UInt64

The stable identity of the point light.

typealias PointLight.ID

A type of unique identifier used for a point light.

Configuring the Point Light

var light: PointLightComponent

A point light component for the entity.

struct PointLightComponent

A component that defines a point light source.

protocol HasPointLight

An interface that defines a point light source component.

Loading a Stored Entity

Stored Entities

Manage entities stored as assets on disk.

Positioning Entities in Space

Finding the Nearest Anchor

Calculating the Collision Shape

Describing the Light

See Also

Cameras and Lighting

class PerspectiveCamera

A virtual camera that establishes the rendering perspective.

Beta
class DirectionalLight

An entity that casts a virtual light in a particular direction.

Beta
class SpotLight

An entity that illuminates virtual content in a cone-shaped volume.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software