Class: CAEmitterCell
Overview
The CAEmitterCell class represents one source of particles being emitted in a CAEmitterLayer. An emitter cell define the direction in which they emit and the properties of the emitted particles. Emitter cells can have an array of sub-cells, which lets the particles themselves emit particles.
Instance Attribute Summary (collapse)
-
- alphaRange
Specifies the range the alpha color component of the cell can vary.
-
- alphaSpeed
The speed, in seconds, at which the alpha color component changes over the lifetime of the cell.
-
- birthRate
Number of emitted objects created every second.
-
- blueRange
Specifies the range the blue color component of the cell can vary.
-
- blueSpeed
The speed, in seconds, at which the green color component changes over the lifetime of the cell.
-
- color
Determines the color of each emitted object.
-
- contents
An object that provides the contents of the layer.
-
- contentsRect
A rectangle, in the unit coordinate space, defining the subrectangle of contents that the receiver should draw.
-
- emissionLatitude
Defines the latitudinal orientation of the emission angle.
-
- emissionLongitude
Defines the longitudinal orientation of the emission angle.
-
- emissionRange
An angle, in radians, defining a cone around the emission angle.
-
- emitterCells
An optional array containing the sub-cells of this cell.
-
- enabled
Determines whether or not cells from this emitter are rendered.
-
- greenRange
Specifies the range the green color component of the cell can vary.
-
- greenSpeed
The speed, in seconds, at which the green color component changes over the lifetime of the cell.
-
- lifetime
The lifetime of the cell, in seconds.
-
- lifetimeRange
Specifies the mean value the lifetime of the cell can vary.
-
- 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.
-
- name
The name of the cell.
-
- redRange
Specifies the range the red color component of the cell can vary.
-
- redSpeed
The speed, in seconds, at which the red color component changes over the lifetime of the cell.
-
- scale
Specifies the scale factor applied to the cell.
-
- scaleRange
Specifies the range the blue color component of the cell can vary.
-
- scaleSpeed
The speed, in seconds, at which the scale changes over the lifetime of the cell.
-
- spin
Specifies the rotation velocity per second, in radians, applied to the cell.
-
- spinRange
Specifies the range the spin of the cell can vary over its lifetime.
-
- style
An optional dictionary referenced to find property values that aren’t explicitly defined by the receiver.
-
- velocity
Specifies the initial velocity of the cell.
-
- velocityRange
Specifies the range the velocity of the cell can vary.
-
- xAcceleration
Specifies the x component of an acceleration vector applied to cell.
-
- yAcceleration
Specifies the y component of an acceleration vector applied to cell.
-
- zAcceleration
Specifies the z component of an acceleration vector applied to cell.
Class Method Summary (collapse)
-
+ defaultValueForKey:
Specifies the default value of the property with the specified key.
-
+ emitterCell
Creates and returns an instance of CAEmitterCell.
Instance Method Summary (collapse)
-
- shouldArchiveValueForKey:
Specifies whether the value of the property for a given key is archived.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (Float) alphaRange
Specifies the range the alpha color component of the cell can vary. Animatable. The range specifies the mean amount the alpha component of the color property can vary for the cell. Default is 0.0.
- (Float) alphaSpeed
The speed, in seconds, at which the alpha color component changes over the lifetime of the cell. Animatable. The speed change is defined as the rate of change per second. Defaults to 0.
- (Float) birthRate
Number of emitted objects created every second. Animatable. Default value is 0.
- (Float) blueRange
Specifies the range the blue color component of the cell can vary. Animatable. The range specifies the mean amount the blue component of the color property can vary for the cell.Default value is 0.0.
- (Float) blueSpeed
The speed, in seconds, at which the green color component changes over the lifetime of the cell. Animatable. The speed change is defined as the rate of change per second. Defaults to 0.
- (CGColorRef) color
Determines the color of each emitted object. Animatable. The specified color of the cell will vary by a random amount within the redRange, greenRange, blueRange and alphaRangevalues over the lifetime of the cell. The redSpeed, greenSpeed, blueSpeed, and alphaSpeed determine the rate of change.Defaults to opaque white.
- (Object) contents
An object that provides the contents of the layer. Animatable. A layer can set this property to a CGImageRef to display the image as its contents. Default value is nil.
- (CGRect) contentsRect
A rectangle, in the unit coordinate space, defining the subrectangle of contents that the receiver should draw. Animatable. Defaults to the unit rectangle (0.0,0.0,1.0,1.0).If pixels outside the unit rectangles are requested, the edge pixels of the contents image will be extended outwards.If an empty rectangle is provided, the results are undefined.
- (Float) emissionLatitude
Defines the latitudinal orientation of the emission angle. Animatable. The emission latitude is the orientation of the emission angle from the z-axis. It is also referred to as the colatitude. Default is 0.0.
- (Float) emissionLongitude
Defines the longitudinal orientation of the emission angle. Animatable. The emission longitude is the orientation of the emission angle in the xy-plane. it is also often referred to as the azimuth.Default is 0.0.
- (Float) emissionRange
An angle, in radians, defining a cone around the emission angle. Animatable. Cells are uniformly distributed across this cone.Defaults to 0.
- (Array) emitterCells
An optional array containing the sub-cells of this cell. When specified, each particle emitted by the cell will act as an emitter for each of the cell's sub-cells. The emission point is the current particle position and the emission angle is relative to the current direction of the particle.Default is nil.
- (Boolean) enabled
Determines whether or not cells from this emitter are rendered. Default is YES.
- (Float) greenRange
Specifies the range the green color component of the cell can vary. Animatable. The range specifies the mean amount the green component of the color property can vary for the cell.Default is 0.0.
- (Float) greenSpeed
The speed, in seconds, at which the green color component changes over the lifetime of the cell. Animatable. The speed change is defined as the rate of change per second. Defaults to 0.
- (Float) lifetime
The lifetime of the cell, in seconds. Animatable. The lifetime of the cell will vary by a random amount with the range specified by lifetimeRange.Default is 0.0.
- (Float) lifetimeRange
Specifies the mean value the lifetime of the cell can vary. Animatable. If the lifetimeRange is 3 seconds, and the lifetime of the cell is 10 seconds, the cell’s actual lifetime will be between 7 and 13 seconds.Default is 0.0.
- (String) magnificationFilter
The filter used when increasing the size of the content. The possible values for magnificationFilter are shown in Scaling_Filters. The default value is kCAFilterLinear.
- (String) minificationFilter
The filter used when reducing the size of the content. The possible values for minifcationFilter are shown in Scaling_Filters. The default value is kCAFilterLinear.
- (Float) minificationFilterBias
The bias factor used by the minification filter to determine the levels of detail. This value is used by the minificationFilter when it is set to kCAFilterTrilinear.Defaults to 0.
- (String) name
The name of the cell. The cell name is used when constructing animation key paths that reference the cell. Defaults to nil.For example, adding an animation to a cell’s enclosing layer with the a keypath such as emitterCells.myCellName.redRange would animate the redRange propery of the cell in the layer’s emitterCells array with the name myCellName.
- (Float) redRange
Specifies the range the red color component of the cell can vary. Animatable. The range specifies the mean amount the red component of the color property can vary for the cell.Default is 0.0.
- (Float) redSpeed
The speed, in seconds, at which the red color component changes over the lifetime of the cell. Animatable. The speed change is defined as the rate of change per second. Defaults to 0.
- (Float) scale
Specifies the scale factor applied to the cell. Animatable. The scale of the cell will vary by a random amount with the range specified by scaleRange. The scaleSpeed property determines the rate of change. Default is 0.0.
- (Float) scaleRange
Specifies the range the blue color component of the cell can vary. Animatable. The range specifies the mean amount the scale value can vary for the cell over its lifetime. The scaleSpeed property determines the rate of change.
- (Float) scaleSpeed
The speed, in seconds, at which the scale changes over the lifetime of the cell. Animatable. The speed change is defined as the rate of change per second.Defaults to 0.
- (Float) spin
Specifies the rotation velocity per second, in radians, applied to the cell. Animatable. The spin of the cell will vary by a random amount with the range specified by spinRange. Default is 0.0.
- (Float) spinRange
Specifies the range the spin of the cell can vary over its lifetime. Animatable. The range specifies the mean amount the spin value can vary over the cell's lifetime. Default value is 0.0.
- (Hash) style
An optional dictionary referenced to find property values that aren’t explicitly defined by the receiver. This dictionary may in turn have a style key, forming a hierarchy of default values. In the case of hierarchical style dictionaries the shallowest value for a property is used. For example, the value for “style.someValue” takes precedence over “style.style.someValue”.If the style dictionary doesn’t define a value for an attribute, the cell’s defaultValueForKey: class method is called. Defaults to nil.The style dictionary is not consulted for the following keys: bounds, frame.Warning: If the style dictionary or any of its ancestors are modified, the values of the cell’s properties are undefined until the style property is reset.
- (Float) velocity
Specifies the initial velocity of the cell. Animatable. The velocity of the cell will vary by a random amount within the range specified by velocityRange.
- (Float) velocityRange
Specifies the range the velocity of the cell can vary. Animatable. The range specifies the mean amount the initial velocity value change.Default is 0.0.
- (Float) xAcceleration
Specifies the x component of an acceleration vector applied to cell. Default is 0.0.
- (Float) yAcceleration
Specifies the y component of an acceleration vector applied to cell. Default is 0.0.
- (Float) zAcceleration
Specifies the z component of an acceleration vector applied to cell. Default is 0.0.
Class Method Details
+ (Object) defaultValueForKey(key)
Specifies the default value of the property with the specified key. If this method returns nil a suitable “zero” default value for the property is provided, based on the declared type of the key. For example, if key is a CGSize object, a size of (0.0,0.0) is returned. For a CGRect an empty rectangle is returned. For CGAffineTransform and CATransform3D, the appropriate identity matrix is returned.
+ (Object) emitterCell
Creates and returns an instance of CAEmitterCell.
Instance Method Details
- (Boolean) shouldArchiveValueForKey(key)
Specifies whether the value of the property for a given key is archived. The default implementation returns YES. Called by the object's implementation of encodeWithCoder:.