mainEmitter
TypeScriptget mainEmitter(): ParticleEmitterComponent_ParticleEmitterSwift declarationvar mainEmitter: ParticleEmitterComponent.ParticleEmitterParticle attributes affecting the main particles of the base simulation.
struct · iOS 18.0+ · SDK 27.1
struct ParticleEmitterComponentA component that emits particles. To learn how to use `ParticleEmitterComponent` in your app, see <doc:simulating-particles-in-your-visionos-app>.
get mainEmitter(): ParticleEmitterComponent_ParticleEmitterSwift declarationvar mainEmitter: ParticleEmitterComponent.ParticleEmitterParticle attributes affecting the main particles of the base simulation.
set mainEmitter(value: ParticleEmitterComponent_ParticleEmitter)Swift declarationvar mainEmitter: ParticleEmitterComponent.ParticleEmitterParticle attributes affecting the main particles of the base simulation.
get spawnedEmitter(): (ParticleEmitterComponent_ParticleEmitter) | nullSwift declarationvar spawnedEmitter: ParticleEmitterComponent.ParticleEmitter? { get set }Attributes affecting secondary particles spawned from the main simulation.
set spawnedEmitter(value: (ParticleEmitterComponent_ParticleEmitter) | null)Swift declarationvar spawnedEmitter: ParticleEmitterComponent.ParticleEmitter? { get set }Attributes affecting secondary particles spawned from the main simulation.
get burstCount(): numberSwift declarationvar burstCount: IntNumber of particles to emit in a single burst. Defaults to 100.
set burstCount(value: number)Swift declarationvar burstCount: IntNumber of particles to emit in a single burst. Defaults to 100.
get isEmitting(): booleanSwift declarationvar isEmitting: BoolDisables/enables particle emission, independent of `simulationState`. Existing particles will not be affected.
set isEmitting(value: boolean)Swift declarationvar isEmitting: BoolDisables/enables particle emission, independent of `simulationState`. Existing particles will not be affected.
get emitterShape(): ParticleEmitterComponent_EmitterShapeSwift declarationvar emitterShape: ParticleEmitterComponent.EmitterShapeThe shape of the region of space where the system spawns new particles. Defaults to plane.
set emitterShape(value: ParticleEmitterComponent_EmitterShape)Swift declarationvar emitterShape: ParticleEmitterComponent.EmitterShapeThe shape of the region of space where the system spawns new particles. Defaults to plane.
get radialAmount(): numberSwift declarationvar radialAmount: FloatRadial sweep angle for sphere, cylinder, cone, and torus emitter shapes. Defaults to 2 * pi.
set radialAmount(value: number)Swift declarationvar radialAmount: FloatRadial sweep angle for sphere, cylinder, cone, and torus emitter shapes. Defaults to 2 * pi.
get birthLocation(): ParticleEmitterComponent_BirthLocationSwift declarationvar birthLocation: ParticleEmitterComponent.BirthLocationThe possible locations for newly spawned particles, relative to the emitter shape. Defaults to surface.
set birthLocation(value: ParticleEmitterComponent_BirthLocation)Swift declarationvar birthLocation: ParticleEmitterComponent.BirthLocationThe possible locations for newly spawned particles, relative to the emitter shape. Defaults to surface.
get spawnOccasion(): ParticleEmitterComponent_SpawnOccasionSwift declarationvar spawnOccasion: ParticleEmitterComponent.SpawnOccasionDetermines when main particles emit spawn particles. Defaults to `onDeath`.
set spawnOccasion(value: ParticleEmitterComponent_SpawnOccasion)Swift declarationvar spawnOccasion: ParticleEmitterComponent.SpawnOccasionDetermines when main particles emit spawn particles. Defaults to `onDeath`.
get birthDirection(): ParticleEmitterComponent_BirthDirectionSwift declarationvar birthDirection: ParticleEmitterComponent.BirthDirectionThe possible initial directions for newly spawned particles, relative to the emitter shape.Defaults to normal.
set birthDirection(value: ParticleEmitterComponent_BirthDirection)Swift declarationvar birthDirection: ParticleEmitterComponent.BirthDirectionThe possible initial directions for newly spawned particles, relative to the emitter shape.Defaults to normal.
get speedVariation(): numberSwift declarationvar speedVariation: FloatDefines a plus/minus range (in meters per second) from which a value is randomly selected to offset particle speed.
set speedVariation(value: number)Swift declarationvar speedVariation: FloatDefines a plus/minus range (in meters per second) from which a value is randomly selected to offset particle speed.
get simulationState(): ParticleEmitterComponent_SimulationStateSwift declarationvar simulationState: ParticleEmitterComponent.SimulationStateControls particle simulation state: playing, paused or stopped. Defaults to `play`.
set simulationState(value: ParticleEmitterComponent_SimulationState)Swift declarationvar simulationState: ParticleEmitterComponent.SimulationStateControls particle simulation state: playing, paused or stopped. Defaults to `play`.
get emitterShapeSize(): SDKHandleSwift declarationvar emitterShapeSize: SIMD3<Float>The emitter shape size in meters.
set emitterShapeSize(value: SDKHandle)Swift declarationvar emitterShapeSize: SIMD3<Float>The emitter shape size in meters.
get torusInnerRadius(): numberSwift declarationvar torusInnerRadius: FloatRadius of the torus' emitter shape tube. Defaults to 0.25.
set torusInnerRadius(value: number)Swift declarationvar torusInnerRadius: FloatRadius of the torus' emitter shape tube. Defaults to 0.25.
get emissionDirection(): SDKHandleSwift declarationvar 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 emissionDirection(value: SDKHandle)Swift declarationvar 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 spawnSpreadFactor(): numberSwift declarationvar spawnSpreadFactor: FloatAmount a spawned particle spreads away from its parent particle, works in conjunction with the spawn particle's `spreadingAngle`. Defaults to 0.
set spawnSpreadFactor(value: number)Swift declarationvar spawnSpreadFactor: FloatAmount a spawned particle spreads away from its parent particle, works in conjunction with the spawn particle's `spreadingAngle`. Defaults to 0.
get burstCountVariation(): numberSwift declarationvar burstCountVariation: IntDefines a plus/minus range from which a value is randomly selected to offset `burstCount`.
set burstCountVariation(value: number)Swift declarationvar burstCountVariation: IntDefines a plus/minus range from which a value is randomly selected to offset `burstCount`.
get spawnVelocityFactor(): numberSwift declarationvar spawnVelocityFactor: FloatHow much of the parent particle's velocity to inherit. Defaults to 1.
set spawnVelocityFactor(value: number)Swift declarationvar spawnVelocityFactor: FloatHow much of the parent particle's velocity to inherit. Defaults to 1.
get fieldSimulationSpace(): ParticleEmitterComponent_SimulationSpaceSwift declarationvar fieldSimulationSpace: ParticleEmitterComponent.SimulationSpaceField Simulation Space, either local or global
set fieldSimulationSpace(value: ParticleEmitterComponent_SimulationSpace)Swift declarationvar fieldSimulationSpace: ParticleEmitterComponent.SimulationSpaceField Simulation Space, either local or global
get spawnInheritsParentColor(): booleanSwift declarationvar spawnInheritsParentColor: BoolWhether or not the spawnedEmitter's color should be overriden by the mainEmitter's color at the time of the spawning.
set spawnInheritsParentColor(value: boolean)Swift declarationvar spawnInheritsParentColor: BoolWhether or not the spawnedEmitter's color should be overriden by the mainEmitter's color at the time of the spawning.
get particlesInheritTransform(): booleanSwift declarationvar particlesInheritTransform: BoolDetermines if the entity's transformation also affects the particles.
set particlesInheritTransform(value: boolean)Swift declarationvar particlesInheritTransform: BoolDetermines if the entity's transformation also affects the particles.
get spawnSpreadFactorVariation(): numberSwift declarationvar spawnSpreadFactorVariation: FloatDefines a plus/minus range from which a value is randomly selected to offset Spawn Spread Factor.
set spawnSpreadFactorVariation(value: number)Swift declarationvar spawnSpreadFactorVariation: FloatDefines a plus/minus range from which a value is randomly selected to offset Spawn Spread Factor.
burst(): voidSwift declarationmutating func burst()Emits burstCount particles on the next update call.
get speed(): numberSwift declarationvar speed: FloatThe initial speed, in meters per second, for newly spawned particles. Defaults to 0.5.
set speed(value: number)Swift declarationvar speed: FloatThe initial speed, in meters per second, for newly spawned particles. Defaults to 0.5.
restart(): voidSwift declarationmutating func restart()Restarts the emission of particles. Requires the component to be re-assigned to the entity to take effect.
static init(): ParticleEmitterComponentSwift declarationinit()No declarations were skipped in this snapshot.