Skip to content

Commit 5526087

Browse files
committed
More fixes.
1 parent 720ee24 commit 5526087

File tree

11 files changed

+32
-35
lines changed

11 files changed

+32
-35
lines changed

CCBoot.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -1894,8 +1894,8 @@ var _initSys = function () {
18941894
};
18951895
_initSys();
18961896

1897-
delete _tmpCanvas1;
1898-
delete _tmpCanvas2;
1897+
delete window._tmpCanvas1;
1898+
delete window._tmpCanvas2;
18991899

19001900
//to make sure the cc.log, cc.warn, cc.error and cc.assert would not throw error before init by debugger mode.
19011901
cc.log = cc.warn = cc.error = cc.assert = function () {
@@ -1923,9 +1923,9 @@ function _determineRenderType(config) {
19231923
cc._renderType = cc.game.RENDER_TYPE_CANVAS;
19241924
cc._supportRender = true;
19251925

1926-
if ( userRenderMode === 2 ||
1927-
( userRenderMode === 0 &&
1928-
shieldOs.indexOf(cc.sys.os) === -1 &&
1926+
if ( userRenderMode === 2 ||
1927+
( userRenderMode === 0 &&
1928+
shieldOs.indexOf(cc.sys.os) === -1 &&
19291929
shieldBrowser.indexOf(cc.sys.browserType) === -1 )) {
19301930
if (cc.sys.capabilities["opengl"]) {
19311931
cc._renderType = cc.game.RENDER_TYPE_WEBGL;
@@ -2084,17 +2084,17 @@ cc.game = /** @lends cc.game# */{
20842084
renderMode: "renderMode",
20852085
jsList: "jsList"
20862086
},
2087-
2087+
20882088
// states
20892089
_paused: true,//whether the game is paused
20902090
_prepareCalled: false,//whether the prepare function has been called
20912091
_prepared: false,//whether the engine has prepared
20922092
_rendererInitialized: false,
20932093

20942094
_renderContext: null,
2095-
2095+
20962096
_intervalId: null,//interval target of main
2097-
2097+
20982098
_lastTime: null,
20992099
_frameTime: null,
21002100

@@ -2207,7 +2207,7 @@ cc.game = /** @lends cc.game# */{
22072207
*/
22082208
prepare: function (cb) {
22092209
var self = this,
2210-
config = self.config,
2210+
config = self.config,
22112211
CONFIG_KEY = self.CONFIG_KEY;
22122212

22132213
this._loadConfig();
@@ -2228,10 +2228,10 @@ cc.game = /** @lends cc.game# */{
22282228
this._initRenderer(config[CONFIG_KEY.width], config[CONFIG_KEY.height]);
22292229

22302230
/**
2231+
* cc.view is the shared view object.
22312232
* @type {cc.EGLView}
22322233
* @name cc.view
22332234
* @memberof cc
2234-
* cc.view is the shared view object.
22352235
*/
22362236
cc.view = cc.EGLView._getInstance();
22372237

@@ -2244,10 +2244,10 @@ cc.game = /** @lends cc.game# */{
22442244
if (cc.director.setOpenGLView)
22452245
cc.director.setOpenGLView(cc.view);
22462246
/**
2247+
* cc.winSize is the alias object for the size of the current game window.
22472248
* @type {cc.Size}
22482249
* @name cc.winSize
22492250
* @memberof cc
2250-
* cc.winSize is the alias object for the size of the current game window.
22512251
*/
22522252
cc.winSize = cc.director.getWinSize();
22532253

@@ -2300,7 +2300,7 @@ cc.game = /** @lends cc.game# */{
23002300
cc.game.onStart = onStart;
23012301
}
23022302
}
2303-
2303+
23042304
this.prepare(cc.game.onStart && cc.game.onStart.bind(cc.game));
23052305
},
23062306

@@ -2377,7 +2377,7 @@ cc.game = /** @lends cc.game# */{
23772377
if (document["ccConfig"]) {
23782378
this._initConfig(document["ccConfig"]);
23792379
}
2380-
// Load from project.json
2380+
// Load from project.json
23812381
else {
23822382
try {
23832383
var cocos_script = document.getElementsByTagName('script');

cocos2d/actions3d/CCActionGrid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ cc.GridAction = cc.ActionInterval.extend(/** @lends cc.GridAction# */{
5656
* to copy object with deep copy.
5757
* returns a clone of action.
5858
*
59-
* @return {cc.Action}
59+
* @return {cc.ActionInterval}
6060
*/
6161
clone:function(){
6262
var action = new cc.GridAction();

cocos2d/core/CCDirector.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2424
THE SOFTWARE.
2525
****************************************************************************/
26-
26+
2727
cc.g_NumberOfDraws = 0;
2828

2929
cc.GLToClipTransform = function (transformOut) {
@@ -495,7 +495,7 @@ cc.Director = cc.Class.extend(/** @lends cc.Director# */{
495495
* set color for clear screen.<br/>
496496
* Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js
497497
* @function
498-
* @param {cc.color} clearColor
498+
* @param {cc.Color} clearColor
499499
*/
500500
setClearColor: null,
501501
/**
@@ -933,4 +933,4 @@ cc.Director.PROJECTION_CUSTOM = 3;
933933
* @constant
934934
* @type {Number}
935935
*/
936-
cc.Director.PROJECTION_DEFAULT = cc.Director.PROJECTION_3D;
936+
cc.Director.PROJECTION_DEFAULT = cc.Director.PROJECTION_3D;

cocos2d/core/platform/CCTypesWebGL.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
365365
/**
366366
* @class cc.V3F_C4B_T2F
367367
* @param {cc.Vertex3F} vertices
368-
* @param { cc.color} colors
368+
* @param {cc.Color} colors
369369
* @param {cc.Tex2F} texCoords
370370
* @param {Array} arrayBuffer
371371
* @param {Number} offset
@@ -568,7 +568,7 @@ cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
568568
/**
569569
* @class cc.V2F_C4B_T2F
570570
* @param {cc.Vertex2F} vertices
571-
* @param {cc.color} colors
571+
* @param {cc.Color} colors
572572
* @param {cc.Tex2F} texCoords
573573
* @param {Array} arrayBuffer
574574
* @param {Number} offset

cocos2d/core/sprites/CCSprite.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ cc.Sprite = cc.Node.extend(/** @lends cc.Sprite# */{
797797
* @function
798798
* @param {cc.Sprite} child
799799
* @param {Number} localZOrder child's zOrder
800-
* @param {String} [tag] child's tag
800+
* @param {number|String} [tag] child's tag
801801
* @override
802802
*/
803803
addChild: function (child, localZOrder, tag) {
@@ -1027,4 +1027,4 @@ cc.EventHelper.prototype.apply(cc.Sprite.prototype);
10271027

10281028
cc.assert(cc.isFunction(cc._tmp.PrototypeSprite), cc._LogInfos.MissingFile, "SpritesPropertyDefine.js");
10291029
cc._tmp.PrototypeSprite();
1030-
delete cc._tmp.PrototypeSprite;
1030+
delete cc._tmp.PrototypeSprite;

cocos2d/core/support/CCPointExtension.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ cc.pMult = function (point, floatVar) {
8686
* Calculates midpoint between two points.
8787
* @param {cc.Point} v1
8888
* @param {cc.Point} v2
89-
* @return {cc.pMult}
89+
* @return {cc.Point}
9090
*/
9191
cc.pMidpoint = function (v1, v2) {
9292
return cc.pMult(cc.pAdd(v1, v2), 0.5);
@@ -134,7 +134,7 @@ cc.pRPerp = function (point) {
134134
* Calculates the projection of v1 over v2.
135135
* @param {cc.Point} v1
136136
* @param {cc.Point} v2
137-
* @return {cc.pMult}
137+
* @return {cc.Point}
138138
*/
139139
cc.pProject = function (v1, v2) {
140140
return cc.pMult(v2, cc.pDot(v1, v2) / cc.pDot(v2, v2));
@@ -284,7 +284,7 @@ cc.pCompOp = function (p, opFunc) {
284284
* @param {cc.Point} a
285285
* @param {cc.Point} b
286286
* @param {Number} alpha
287-
* @return {cc.pAdd}
287+
* @return {cc.Point}
288288
*/
289289
cc.pLerp = function (a, b, alpha) {
290290
return cc.pAdd(cc.pMult(a, 1 - alpha), cc.pMult(b, alpha));
@@ -498,7 +498,7 @@ cc.pSubIn = function(v1, v2) {
498498
/**
499499
* adds one point to another (inplace)
500500
* @param {cc.Point} v1
501-
* @param {cc.point} v2
501+
* @param {cc.Point} v2
502502
*/
503503
cc.pAddIn = function(v1, v2) {
504504
v1.x += v2.x;
@@ -512,4 +512,3 @@ cc.pAddIn = function(v1, v2) {
512512
cc.pNormalizeIn = function(v) {
513513
cc.pMultIn(v, 1.0 / Math.sqrt(v.x * v.x + v.y * v.y));
514514
};
515-

cocos2d/menus/CCMenuItem.js

-1
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,6 @@ cc.defineGetterSetter(_p, "selectedIndex", _p.getSelectedIndex, _p.setSelectedIn
13381338
* The inner items can be any MenuItem
13391339
* @deprecated since v3.0 please use new cc.MenuItemToggle(params) instead
13401340
* @return {cc.MenuItemToggle}
1341-
* @example
13421341
*/
13431342
cc.MenuItemToggle.create = function (/*Multiple arguments follow*/) {
13441343
if ((arguments.length > 0) && (arguments[arguments.length - 1] == null))

cocos2d/node-grid/CCNodeGrid.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ cc.NodeGrid = cc.Node.extend(/** @lends cc.NodeGrid# */{
6161

6262
/**
6363
* @brief Set the effect grid rect.
64-
* @param {cc.rect} rect
64+
* @param {cc.Rect} rect
6565
*/
6666
setGridRect: function (rect) {
6767
this._gridRect = rect;
6868
},
6969
/**
7070
* @brief Get the effect grid rect.
71-
* @return {cc.rect} rect.
71+
* @return {cc.Rect} rect.
7272
*/
7373
getGridRect: function () {
7474
return this._gridRect;

cocos2d/particle/CCParticleSystem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ cc.Particle.TemporaryPoints = [
204204
* @property {Number} positionType - Particles movement type: cc.ParticleSystem.TYPE_FREE | cc.ParticleSystem.TYPE_GROUPED.
205205
* @property {Number} totalParticles - Maximum particles of the system.
206206
* @property {Boolean} autoRemoveOnFinish - Indicate whether the node will be auto-removed when it has no particles left.
207-
* @property {cc.Texture2D} texture - Texture of Particle System.
207+
* @property {cc.Texture2D|HTMLImageElement|HTMLCanvasElement} texture - Texture of Particle System.
208208
*
209209
* @example
210210
* emitter.radialAccel = 15;

cocos2d/shaders/CCGLStateCache.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ cc.setProjectionMatrixDirty = function () {
187187
* These flags can be ORed. The flags that are not present, will be disabled.
188188
* </p>
189189
* @function
190-
* @param {cc.VERTEX_ATTRIB_FLAG_POSITION | cc.VERTEX_ATTRIB_FLAG_COLOR | cc.VERTEX_ATTRIB_FLAG_TEX_OORDS} flags
190+
* @param {cc.VERTEX_ATTRIB_FLAG_POSITION | cc.VERTEX_ATTRIB_FLAG_COLOR | cc.VERTEX_ATTRIB_FLAG_TEX_COORDS} flags
191191
*/
192192
cc.glEnableVertexAttribs = function (flags) {
193193
/* Position */
@@ -337,4 +337,3 @@ cc.glEnable = function (flags) {
337337
cc._renderContext.disable(cc._renderContext.BLEND);*/
338338
}
339339
};
340-

cocos2d/transitions/CCTransitionProgress.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ cc.TransitionProgress = cc.TransitionScene.extend(/** @lends cc.TransitionProgre
6565
},
6666

6767
/**
68+
* Custom on enter.
6869
* @override
69-
* custom on enter
7070
*/
7171
onEnter:function () {
7272
cc.TransitionScene.prototype.onEnter.call(this);
@@ -107,8 +107,8 @@ cc.TransitionProgress = cc.TransitionScene.extend(/** @lends cc.TransitionProgre
107107
},
108108

109109
/**
110-
* @override
111110
* custom on exit
111+
* @override
112112
*/
113113
onExit:function () {
114114
// remove our layer and release all containing objects
@@ -425,7 +425,7 @@ cc.TransitionProgressOutIn = cc.TransitionProgress.extend(/** @lends cc.Transiti
425425
cc.TransitionProgress.prototype.ctor.call(this);
426426
scene && this.initWithDuration(t, scene);
427427
},
428-
428+
429429
_progressTimerNodeWithRenderTexture:function (texture) {
430430
var size = cc.director.getWinSize();
431431
var pNode = new cc.ProgressTimer(texture.sprite);

0 commit comments

Comments
 (0)