One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

ParticleEmitterComponent

struct · iOS 18.0+ · SDK 27.1

struct ParticleEmitterComponent

A component that emits particles. To learn how to use `ParticleEmitterComponent` in your app, see <doc:simulating-particles-in-your-visionos-app>.

Members (47)

get · iOS 18.0+

mainEmitter

TypeScript
get mainEmitter(): ParticleEmitterComponent_ParticleEmitter
Swift declaration
var mainEmitter: ParticleEmitterComponent.ParticleEmitter

Particle attributes affecting the main particles of the base simulation.

set · iOS 18.0+

mainEmitter

TypeScript
set mainEmitter(value: ParticleEmitterComponent_ParticleEmitter)
Swift declaration
var mainEmitter: ParticleEmitterComponent.ParticleEmitter

Particle attributes affecting the main particles of the base simulation.

get · iOS 18.0+

spawnedEmitter

TypeScript
get spawnedEmitter(): (ParticleEmitterComponent_ParticleEmitter) | null
Swift declaration
var spawnedEmitter: ParticleEmitterComponent.ParticleEmitter? { get set }

Attributes affecting secondary particles spawned from the main simulation.

set · iOS 18.0+

spawnedEmitter

TypeScript
set spawnedEmitter(value: (ParticleEmitterComponent_ParticleEmitter) | null)
Swift declaration
var spawnedEmitter: ParticleEmitterComponent.ParticleEmitter? { get set }

Attributes affecting secondary particles spawned from the main simulation.

get · iOS 18.0+

burstCount

TypeScript
get burstCount(): number
Swift declaration
var burstCount: Int

Number of particles to emit in a single burst. Defaults to 100.

set · iOS 18.0+

burstCount

TypeScript
set burstCount(value: number)
Swift declaration
var burstCount: Int

Number of particles to emit in a single burst. Defaults to 100.

get · iOS 18.0+

isEmitting

TypeScript
get isEmitting(): boolean
Swift declaration
var isEmitting: Bool

Disables/enables particle emission, independent of `simulationState`. Existing particles will not be affected.

set · iOS 18.0+

isEmitting

TypeScript
set isEmitting(value: boolean)
Swift declaration
var isEmitting: Bool

Disables/enables particle emission, independent of `simulationState`. Existing particles will not be affected.

get · iOS 18.0+

emitterShape

TypeScript
get emitterShape(): ParticleEmitterComponent_EmitterShape
Swift declaration
var emitterShape: ParticleEmitterComponent.EmitterShape

The shape of the region of space where the system spawns new particles. Defaults to plane.

set · iOS 18.0+

emitterShape

TypeScript
set emitterShape(value: ParticleEmitterComponent_EmitterShape)
Swift declaration
var emitterShape: ParticleEmitterComponent.EmitterShape

The shape of the region of space where the system spawns new particles. Defaults to plane.

get · iOS 18.0+

radialAmount

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

Radial sweep angle for sphere, cylinder, cone, and torus emitter shapes. Defaults to 2 * pi.

set · iOS 18.0+

radialAmount

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

Radial sweep angle for sphere, cylinder, cone, and torus emitter shapes. Defaults to 2 * pi.

get · iOS 18.0+

birthLocation

TypeScript
get birthLocation(): ParticleEmitterComponent_BirthLocation
Swift declaration
var birthLocation: ParticleEmitterComponent.BirthLocation

The possible locations for newly spawned particles, relative to the emitter shape. Defaults to surface.

set · iOS 18.0+

birthLocation

TypeScript
set birthLocation(value: ParticleEmitterComponent_BirthLocation)
Swift declaration
var birthLocation: ParticleEmitterComponent.BirthLocation

The possible locations for newly spawned particles, relative to the emitter shape. Defaults to surface.

get · iOS 18.0+

spawnOccasion

TypeScript
get spawnOccasion(): ParticleEmitterComponent_SpawnOccasion
Swift declaration
var spawnOccasion: ParticleEmitterComponent.SpawnOccasion

Determines when main particles emit spawn particles. Defaults to `onDeath`.

set · iOS 18.0+

spawnOccasion

TypeScript
set spawnOccasion(value: ParticleEmitterComponent_SpawnOccasion)
Swift declaration
var spawnOccasion: ParticleEmitterComponent.SpawnOccasion

Determines when main particles emit spawn particles. Defaults to `onDeath`.

get · iOS 18.0+

birthDirection

TypeScript
get birthDirection(): ParticleEmitterComponent_BirthDirection
Swift declaration
var birthDirection: ParticleEmitterComponent.BirthDirection

The possible initial directions for newly spawned particles, relative to the emitter shape.Defaults to normal.

set · iOS 18.0+

birthDirection

TypeScript
set birthDirection(value: ParticleEmitterComponent_BirthDirection)
Swift declaration
var birthDirection: ParticleEmitterComponent.BirthDirection

The possible initial directions for newly spawned particles, relative to the emitter shape.Defaults to normal.

get · iOS 18.0+

speedVariation

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

Defines a plus/minus range (in meters per second) from which a value is randomly selected to offset particle speed.

set · iOS 18.0+

speedVariation

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

Defines a plus/minus range (in meters per second) from which a value is randomly selected to offset particle speed.

get · iOS 18.0+

simulationState

TypeScript
get simulationState(): ParticleEmitterComponent_SimulationState
Swift declaration
var simulationState: ParticleEmitterComponent.SimulationState

Controls particle simulation state: playing, paused or stopped. Defaults to `play`.

set · iOS 18.0+

simulationState

TypeScript
set simulationState(value: ParticleEmitterComponent_SimulationState)
Swift declaration
var simulationState: ParticleEmitterComponent.SimulationState

Controls particle simulation state: playing, paused or stopped. Defaults to `play`.

get · iOS 18.0+

emitterShapeSize

TypeScript
get emitterShapeSize(): SDKHandle
Swift declaration
var emitterShapeSize: SIMD3<Float>

The emitter shape size in meters.

set · iOS 18.0+

emitterShapeSize

TypeScript
set emitterShapeSize(value: SDKHandle)
Swift declaration
var emitterShapeSize: SIMD3<Float>

The emitter shape size in meters.

get · iOS 18.0+

torusInnerRadius

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

Radius of the torus' emitter shape tube. Defaults to 0.25.

set · iOS 18.0+

torusInnerRadius

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

Radius of the torus' emitter shape tube. Defaults to 0.25.

get · iOS 18.0+

emissionDirection

TypeScript
get emissionDirection(): SDKHandle
Swift declaration
var emissionDirection: SIMD3<Float>

The direction particles are emitted when birthDirection is set to World or Local. Defaults to (0.0, 1.0, 0.0).

set · iOS 18.0+

emissionDirection

TypeScript
set emissionDirection(value: SDKHandle)
Swift declaration
var emissionDirection: SIMD3<Float>

The direction particles are emitted when birthDirection is set to World or Local. Defaults to (0.0, 1.0, 0.0).

get · iOS 18.0+

spawnSpreadFactor

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

Amount a spawned particle spreads away from its parent particle, works in conjunction with the spawn particle's `spreadingAngle`. Defaults to 0.

set · iOS 18.0+

spawnSpreadFactor

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

Amount a spawned particle spreads away from its parent particle, works in conjunction with the spawn particle's `spreadingAngle`. Defaults to 0.

get · iOS 18.0+

burstCountVariation

TypeScript
get burstCountVariation(): number
Swift declaration
var burstCountVariation: Int

Defines a plus/minus range from which a value is randomly selected to offset `burstCount`.

set · iOS 18.0+

burstCountVariation

TypeScript
set burstCountVariation(value: number)
Swift declaration
var burstCountVariation: Int

Defines a plus/minus range from which a value is randomly selected to offset `burstCount`.

get · iOS 18.0+

spawnVelocityFactor

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

How much of the parent particle's velocity to inherit. Defaults to 1.

set · iOS 18.0+

spawnVelocityFactor

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

How much of the parent particle's velocity to inherit. Defaults to 1.

get · iOS 18.0+

fieldSimulationSpace

TypeScript
get fieldSimulationSpace(): ParticleEmitterComponent_SimulationSpace
Swift declaration
var fieldSimulationSpace: ParticleEmitterComponent.SimulationSpace

Field Simulation Space, either local or global

set · iOS 18.0+

fieldSimulationSpace

TypeScript
set fieldSimulationSpace(value: ParticleEmitterComponent_SimulationSpace)
Swift declaration
var fieldSimulationSpace: ParticleEmitterComponent.SimulationSpace

Field Simulation Space, either local or global

get · iOS 18.0+

spawnInheritsParentColor

TypeScript
get spawnInheritsParentColor(): boolean
Swift declaration
var spawnInheritsParentColor: Bool

Whether or not the spawnedEmitter's color should be overriden by the mainEmitter's color at the time of the spawning.

set · iOS 18.0+

spawnInheritsParentColor

TypeScript
set spawnInheritsParentColor(value: boolean)
Swift declaration
var spawnInheritsParentColor: Bool

Whether or not the spawnedEmitter's color should be overriden by the mainEmitter's color at the time of the spawning.

get · iOS 18.0+

particlesInheritTransform

TypeScript
get particlesInheritTransform(): boolean
Swift declaration
var particlesInheritTransform: Bool

Determines if the entity's transformation also affects the particles.

set · iOS 18.0+

particlesInheritTransform

TypeScript
set particlesInheritTransform(value: boolean)
Swift declaration
var particlesInheritTransform: Bool

Determines if the entity's transformation also affects the particles.

get · iOS 18.0+

spawnSpreadFactorVariation

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

Defines a plus/minus range from which a value is randomly selected to offset Spawn Spread Factor.

set · iOS 18.0+

spawnSpreadFactorVariation

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

Defines a plus/minus range from which a value is randomly selected to offset Spawn Spread Factor.

method · iOS 18.0+

burst

TypeScript
burst(): void
Swift declaration
mutating func burst()

Emits burstCount particles on the next update call.

get · iOS 18.0+

speed

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

The initial speed, in meters per second, for newly spawned particles. Defaults to 0.5.

set · iOS 18.0+

speed

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

The initial speed, in meters per second, for newly spawned particles. Defaults to 0.5.

method · iOS 18.0+

restart

TypeScript
restart(): void
Swift declaration
mutating func restart()

Restarts the emission of particles. Requires the component to be re-assigned to the entity to take effect.

init · iOS 18.0+

init

TypeScript
static init(): ParticleEmitterComponent
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →