Merge pull request #351 from jareguo/master

fix api doc for particle
This commit is contained in:
Jare Guo
2016-02-19 16:04:39 +08:00
+45 -45
View File
@@ -64,6 +64,10 @@ var PositionType = cc.Enum({
GROUPED: 2
});
/**
* @class ParticleSystem
*/
var properties = {
/**
@@ -219,9 +223,6 @@ var properties = {
}
};
/**
* @class ParticleSystem
*/
var CustomProps = (function () {
var DefaultValues = {
/**
@@ -479,42 +480,45 @@ properties.positionType.type = PositionType;
properties.emitterMode.type = EmitterMode;
/**
* <p>
* Particle System base class. <br/>
* Attributes of a Particle System:<br/>
* - emmision rate of the particles<br/>
* - Gravity Mode (Mode A): <br/>
* - gravity <br/>
* - direction <br/>
* - speed +- variance <br/>
* - tangential acceleration +- variance<br/>
* - radial acceleration +- variance<br/>
* - Radius Mode (Mode B): <br/>
* - startRadius +- variance <br/>
* - endRadius +- variance <br/>
* - rotate +- variance <br/>
* - Properties common to all modes: <br/>
* - life +- life variance <br/>
* - start spin +- variance <br/>
* - end spin +- variance <br/>
* - start size +- variance <br/>
* - end size +- variance <br/>
* - start color +- variance <br/>
* - end color +- variance <br/>
* - life +- variance <br/>
* - blending function <br/>
* - texture <br/>
* <br/>
* cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).<br/>
* 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d, <br/>
* cocos2d uses a another approach, but the results are almost identical.<br/>
* cocos2d supports all the variables used by Particle Designer plus a bit more: <br/>
* - spinning particles (supported when using ParticleSystem) <br/>
* - tangential acceleration (Gravity mode) <br/>
* - radial acceleration (Gravity mode) <br/>
* - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only) <br/>
* It is possible to customize any of the above mentioned properties in runtime. Example: <br/>
* </p>
* Particle System base class. <br/>
* Attributes of a Particle System:<br/>
* - emmision rate of the particles<br/>
* - Gravity Mode (Mode A): <br/>
* - gravity <br/>
* - direction <br/>
* - speed +- variance <br/>
* - tangential acceleration +- variance<br/>
* - radial acceleration +- variance<br/>
* - Radius Mode (Mode B): <br/>
* - startRadius +- variance <br/>
* - endRadius +- variance <br/>
* - rotate +- variance <br/>
* - Properties common to all modes: <br/>
* - life +- life variance <br/>
* - start spin +- variance <br/>
* - end spin +- variance <br/>
* - start size +- variance <br/>
* - end size +- variance <br/>
* - start color +- variance <br/>
* - end color +- variance <br/>
* - life +- variance <br/>
* - blending function <br/>
* - texture <br/>
* <br/>
* cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).<br/>
* 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d, <br/>
* cocos2d uses a another approach, but the results are almost identical.<br/>
* cocos2d supports all the variables used by Particle Designer plus a bit more: <br/>
* - spinning particles (supported when using ParticleSystem) <br/>
* - tangential acceleration (Gravity mode) <br/>
* - radial acceleration (Gravity mode) <br/>
* - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only) <br/>
* It is possible to customize any of the above mentioned properties in runtime. Example: <br/>
*
* @example
* emitter.radialAccel = 15;
* emitter.startSpin = 0;
*
* @class ParticleSystem
* @extends cc._ComponentInSG
*/
@@ -569,6 +573,7 @@ var ParticleSystem = cc.Class({
},
// LIFE-CYCLE METHODS
onLoad: function () {
this._super();
// auto play
@@ -579,12 +584,7 @@ var ParticleSystem = cc.Class({
this._applyAutoRemove();
}
},
//onEnable: function () {
// this._super();
//},
//onDisable: function () {
// this._super();
//},
onDestroy: function () {
if (this._autoRemoveOnFinish) {
this.autoRemoveOnFinish = false; // already removed