From 5ec7de656a4a1b4c991107509eb442ecc8110a24 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Fri, 19 Feb 2016 16:03:52 +0800 Subject: [PATCH] fix api doc for particle --- cocos2d/particle/CCParticleSystem.js | 90 ++++++++++++++-------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/cocos2d/particle/CCParticleSystem.js b/cocos2d/particle/CCParticleSystem.js index 519829a573..69e9b784a2 100644 --- a/cocos2d/particle/CCParticleSystem.js +++ b/cocos2d/particle/CCParticleSystem.js @@ -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; /** - *

- * Particle System base class.
- * Attributes of a Particle System:
- * - emmision rate of the particles
- * - Gravity Mode (Mode A):
- * - gravity
- * - direction
- * - speed +- variance
- * - tangential acceleration +- variance
- * - radial acceleration +- variance
- * - Radius Mode (Mode B):
- * - startRadius +- variance
- * - endRadius +- variance
- * - rotate +- variance
- * - Properties common to all modes:
- * - life +- life variance
- * - start spin +- variance
- * - end spin +- variance
- * - start size +- variance
- * - end size +- variance
- * - start color +- variance
- * - end color +- variance
- * - life +- variance
- * - blending function
- * - texture
- *
- * cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
- * 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d,
- * cocos2d uses a another approach, but the results are almost identical.
- * cocos2d supports all the variables used by Particle Designer plus a bit more:
- * - spinning particles (supported when using ParticleSystem)
- * - tangential acceleration (Gravity mode)
- * - radial acceleration (Gravity mode)
- * - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only)
- * It is possible to customize any of the above mentioned properties in runtime. Example:
- *

+ * Particle System base class.
+ * Attributes of a Particle System:
+ * - emmision rate of the particles
+ * - Gravity Mode (Mode A):
+ * - gravity
+ * - direction
+ * - speed +- variance
+ * - tangential acceleration +- variance
+ * - radial acceleration +- variance
+ * - Radius Mode (Mode B):
+ * - startRadius +- variance
+ * - endRadius +- variance
+ * - rotate +- variance
+ * - Properties common to all modes:
+ * - life +- life variance
+ * - start spin +- variance
+ * - end spin +- variance
+ * - start size +- variance
+ * - end size +- variance
+ * - start color +- variance
+ * - end color +- variance
+ * - life +- variance
+ * - blending function
+ * - texture
+ *
+ * cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
+ * 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d,
+ * cocos2d uses a another approach, but the results are almost identical.
+ * cocos2d supports all the variables used by Particle Designer plus a bit more:
+ * - spinning particles (supported when using ParticleSystem)
+ * - tangential acceleration (Gravity mode)
+ * - radial acceleration (Gravity mode)
+ * - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only)
+ * It is possible to customize any of the above mentioned properties in runtime. Example:
+ * + * @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