Class: CAEmitterLayer

Inherits:
CALayer show all

Overview

The CAEmitterLayer class provides a particle emitter system for Core Animation. The particles are defined by instances of CAEmitterCell.

Instance Attribute Summary (collapse)

Attributes inherited from CALayer

#actions, #anchorPoint, #anchorPointZ, #backgroundColor, #backgroundFilters, #borderColor, #borderWidth, #bounds, #compositingFilter, #contents, #contentsCenter, #contentsGravity, #contentsRect, #contentsScale, #cornerRadius, #delegate, #doubleSided, #drawsAsynchronously, #edgeAntialiasingMask, #filters, #frame, #geometryFlipped, #hidden, #magnificationFilter, #mask, #masksToBounds, #minificationFilter, #minificationFilterBias, #name, #needsDisplayOnBoundsChange, #opacity, #opaque, #position, #rasterizationScale, #shadowColor, #shadowOffset, #shadowOpacity, #shadowPath, #shadowRadius, #shouldRasterize, #style, #sublayerTransform, #sublayers, #superlayer, #transform, #visibleRect, #zPosition

Method Summary

Methods inherited from CALayer

#actionForKey:, #addAnimation:forKey:, #addSublayer:, #affineTransform, #animationForKey:, #animationKeys, #containsPoint:, #contentsAreFlipped, #convertPoint:fromLayer:, #convertPoint:toLayer:, #convertRect:fromLayer:, #convertRect:toLayer:, #convertTime:fromLayer:, #convertTime:toLayer:, defaultActionForKey:, defaultValueForKey:, #display, #displayIfNeeded, #drawInContext:, #hitTest:, #init, #initWithLayer:, #insertSublayer:above:, #insertSublayer:atIndex:, #insertSublayer:below:, layer, #layoutIfNeeded, #layoutSublayers, #modelLayer, #needsDisplay, needsDisplayForKey:, #needsLayout, #preferredFrameSize, #presentationLayer, #removeAllAnimations, #removeAnimationForKey:, #removeFromSuperlayer, #renderInContext:, #replaceSublayer:with:, #scrollPoint:, #scrollRectToVisible:, #setAffineTransform:, #setNeedsDisplay, #setNeedsDisplayInRect:, #setNeedsLayout, #shouldArchiveValueForKey:

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) birthRate

Defines a multiplier that is applied to the cell-defined birth rate. Animatable The birth rate of each cell is multiplied by this number to give the actual number of particles created every second. Default value is 1.0.

Returns:

- (Array) emitterCells

The array emitter cells attached to the layer. Each object in the array must be an instance of the CAEmitterCell class.

Returns:

- (Float) emitterDepth

Determines the depth of the emitter shape. How the emitter depth is applied depends on the emitter shape. See “Emitter Shape” for details. Depending on the value of emitterShape, this value may be ignored.Default is 0.0.

Returns:

- (String) emitterMode

Specifies the emitter mode. The possible values for emitterMode are shown in “Emitter Modes.” The default value is kCAEmitterLayerVolume.

Returns:

- (CGPoint) emitterPosition

The position of the center of the particle emitter. Animatable. See “Emitter Shape” for details of how the emitterPosition relates to the possible emitter shapes.Default is (0.0,0.0).

Returns:

  • (CGPoint)

- (String) emitterShape

Specifies the emitter shape. The possible values for emitterMode are shown in “Emitter Shape.” The default value is kCAEmitterLayerPoint.

Returns:

- (CGSize) emitterSize

Determines the size of the particle emitter shape. Animatable. How the emitter size is applied depends on the emitter shape. See “Emitter Shape” for details. Depending on the value of emitterShape, this value may be ignored.Default is 0.0.

Returns:

- (Float) emitterZPosition

Specifies the center of the particle emitter shape along the z-axis. Animatable. See “Emitter Shape” for details of how the emitterZPosition relates to the possible emitter shapes.Default is 0.0.

Returns:

- (Float) lifetime

Defines a multiplier applied to the cell-defined lifetime range when particles are created. Animatable. Default value is 1.0.

Returns:

- (Boolean) preservesDepth

Defines whether the layer flattens its the particles into its plane. If YES, the layer renders its particles as if they directly inhabit the three-dimensional coordinate space of the layer’s superlayer. When enabled, the effect of the layer’s filters, backgroundFilters, and shadow related properties is undefined.Default is NO.

Returns:

  • (Boolean)

- (String) renderMode

Defines how particle cells are rendered into the layer. The possible values for render modes are shown in “Emitter Modes.” The default value is kCAEmitterLayerUnordered.

Returns:

- (Float) scale

Defines a multiplier applied to the cell-defined particle scale. Default value is 1.0.

Returns:

- (unsigned int) seed

Specifies the seed used to initialize the random number generator. Each layer has its own random number generator state. Emitter cell properties that are defined as a mean and a range, such as a cell’s speed, the value of the properties are uniformly distributed in the interval [M - R/2, M + R/2].

Returns:

  • (unsigned int)

- (Float) spin

Defines a multiplier applied to the cell-defined particle spin. Animatable. Default value is 1.0.

Returns:

- (Float) velocity

Defines a multiplier applied to the cell-defined particle velocity. Animatable. Default value is 1.0.

Returns: