Class

CAEmitterCell

The definition of a particle emitted by a CAEmitterLayer.

Declaration

@interface CAEmitterCell : NSObject

Overview

The CAEmitterCell class represents one source of particles being emitted by a CAEmitterLayer object. An emitter cell defines the direction and properties of the emitted particles. Emitter cells can have an array of sub-cells, which lets the particles themselves emit particles.

Topics

Creating and Initializing an Emitter Cell

+ emitterCell

Creates and returns an instance of CAEmitterCell.

Providing Emitter Cell Content

contents

An object that provides the contents of the layer. Animatable.

contentsRect

A rectangle (in the unit coordinate space) that specifies the portion of contents that the receiver should draw. Animatable.

emitterCells

An optional array containing the sub-cells of this cell.

Setting Emitter Cell Visual Attributes

enabled

A Boolean value indicating whether or not cells from this emitter are rendered.

color

The color of each emitted object. Animatable.

redRange

The amount by which the red color component of the cell can vary. Animatable.

greenRange

The amount by which the green color component of the cell can vary. Animatable.

blueRange

The amount by which the blue color component of the cell can vary. Animatable.

alphaRange

The amount by which the alpha component of the cell can vary. Animatable.

redSpeed

The speed, in seconds, at which the red color component changes over the lifetime of the cell. Animatable.

greenSpeed

The speed, in seconds, at which the green color component changes over the lifetime of the cell. Animatable.

blueSpeed

The speed, in seconds, at which the blue color component changes over the lifetime of the cell. Animatable.

alphaSpeed

The speed, in seconds, at which the alpha component changes over the lifetime of the cell. Animatable.

magnificationFilter

The filter used when increasing the size of the content.

minificationFilter

The filter used when reducing the size of the content.

minificationFilterBias

The bias factor used by the minification filter to determine the levels of detail.

scale

Specifies the scale factor applied to the cell. Animatable.

scaleRange

Specifies the range over which the scale value can vary. Animatable.

contentsScale

The scale factor of the cell contents.

name

The name of the cell.

style

An optional dictionary containing additional style values that are not explicitly defined by the receiver.

Setting Emitter Cell Motion Attributes

spin

The rotational velocity, measured in radians per second, to apply to the cell. Animatable.

spinRange

The amount by which the spin of the cell can vary over its lifetime. Animatable.

emissionLatitude

The latitudinal orientation of the emission angle. Animatable.

emissionLongitude

The longitudinal orientation of the emission angle. Animatable.

emissionRange

The angle, in radians, defining a cone around the emission angle. Animatable.

Setting Emitter Cell Temporal Attributes

lifetime

The lifetime of the cell, in seconds. Animatable.

lifetimeRange

The mean value by which the lifetime of the cell can vary. Animatable.

birthRate

The number of emitted objects created every second. Animatable.

scaleSpeed

The speed at which the scale changes over the lifetime of the cell. Animatable.

velocity

The initial velocity of the cell. Animatable.

velocityRange

The amount by which the velocity of the cell can vary. Animatable.

xAcceleration

The x component of an acceleration vector applied to cell.

yAcceleration

The y component of an acceleration vector applied to cell.

zAcceleration

The z component of an acceleration vector applied to cell.

Using Key-Value Coding Extensions

+ defaultValueForKey:

Returns the default value of the property with the specified key.

- shouldArchiveValueForKey:

Returns a Boolean value indicating whether the value for a given key should be archived.

Relationships

Inherits From

See Also

Particle Systems

CAEmitterLayer

A layer that emits, animates, and renders a particle system.