CAEmitterLayer 粒子发射Layer的相关属性

emitterCells:CAEmitterCell对象的数组,被用于把粒子投放到layer上


birthRate:可以通俗的理解为发射源的个数,默认1.0。当前每秒产生的真实粒子数为=CAEmitterLayer的birthRate*子粒子的birthRate;


lifetime:The cell lifetime range is multiplied by this value when particles are created. Defaults to one.


emitterPosition,emitterZposition: The center of the emission shape. Defaults to (0, 0, 0). 发射源形状的中心。
emitterZposition:发射源的z坐标位置;


emitterSize: The size of the emission shape. Defaults to (0, 0, 0). Animatable.
Depending on the `emitterShape' property some of the values may be ignored.


emitterDepth:决定粒子形状的深度联系:emitter shape


emitterShape:发射源的形状:
NSString * const kCAEmitterLayerPoint;
NSString * const kCAEmitterLayerLine;
NSString * const kCAEmitterLayerRectangle;
NSString * const kCAEmitterLayerCuboid;
NSString * const kCAEmitterLayerCircle;
NSString * const kCAEmitterLayerSphere;


emitterMode:发射模式
NSString * const kCAEmitterLayerPoints;
NSString * const kCAEmitterLayerOutline;
NSString * const kCAEmitterLayerSurface;
NSString * const kCAEmitterLayerVolume;


renderMode:渲染模式:
NSString * const kCAEmitterLayerUnordered;
NSString * const kCAEmitterLayerOldestFirst;
NSString * const kCAEmitterLayerOldestLast;
NSString * const kCAEmitterLayerBackToFront;
NSString * const kCAEmitterLayerAdditive;


preservesDepth:不是很清楚(粒子是平展在层上)


velocity:粒子速度


scale:粒子的缩放比例:


spin:自旋转速度


seed:用于初始化随机数产生的种子






 
CAEmitterCell
CAEmitterCell类代从从CAEmitterLayer射出的粒子;emitter cell定义了粒子发射的方向和其它属性。


name:粒子的名字


enabled:粒子是否被渲染
 
birthRate:每秒钟产生的粒子数量,默认是0.


lifetime:每一个粒子的生存周期多少秒


lifetimeRange:生命周期变化范围      lifetime= lifetime(+/-) lifetimeRange


emissionLatitude:发射的z轴方向的角度
 
emissionLongitude:x-y平面的发射方向


emissionRange;周围发射角度变化范围


velocity:每个粒子的速度
 
velocityRange:每个粒子的速度变化范围
 
xAcceleration:粒子x方向的加速度分量
 
yAcceleration:粒子y方向的加速度分量
 
zAcceleration:粒子z方向的加速度分量


scale:整体缩放比例(0.0~1.0)
 
scaleRange:缩放比例变化范围
 
scaleSpeed:缩放比例变化速度


spin:每个粒子的旋转角度,默认为0
 
spinRange:每个粒子的旋转角度变化范围


color:每个粒子的颜色


redRange:一个粒子的颜色red 能改变的范围;
 
redSpeed; 粒子red在生命周期内的改变速度;


blueRange: 一个粒子的颜色blue 能改变的范围;
 
blueSpeed: 粒子blue在生命周期内的改变速度;
 
greenrange: 一个粒子的颜色green 能改变的范围;
 
greenSpeed: 粒子green在生命周期内的改变速度;


alphaRange: 一个粒子的颜色alpha能改变的范围;
 
alphaSpeed: 粒子透明度在生命周期内的改变速度


contents:是个CGImageRef的对象,既粒子要展现的图片;
 
contentsRect:应该画在contents里的子rectangle:-----
 
magnificationFilter:不是很清楚好像增加自己的大小-------
 
minificatonFilter:减小自己的大小--------
 
minificationFilterBias:减小大小的因子-----
 
emitterCells 子粒子
 
emitterCells:粒子发射的粒子


style:不是很清楚:-------

 
我的Github iOS:https://github.com/BigShow1949/BigShow1949 Java:https://github.com/BigShow1949 每周都会更新,求个小星星! 我的QQ:1029883589 QQ群:148279151
原文地址:https://www.cnblogs.com/bigshow1949/p/4782204.html