Skip to content

Commit

Permalink
Fix beta user reported issues (cocos#3004)
Browse files Browse the repository at this point in the history
* Fix doc, error & cleanup code

* Fix render component nested in mask issue

* Fix multiple spine textures rendering issue

* Box2d stability

* Upgrade renderer.js to 1.8.6

* Avoid particle default values override custom issue

* Fix ParticleSystem restore issue in editor

* Fix enumerate scene.active issue

* Fix error map with new ids
  • Loading branch information
pandamicro authored Jul 23, 2018
1 parent 61ac6da commit 1ec38cc
Show file tree
Hide file tree
Showing 19 changed files with 130 additions and 52 deletions.
70 changes: 70 additions & 0 deletions EngineErrorMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ cocos2d: Could not initialize cc.AtlasNode. Invalid Texture.

### 1622

<!-- DEPRECATED -->
_ccsg.Node._requestDirtyFlag: failed to satisfy the request, key (%s) for flag have already been taken

### 1623
Expand All @@ -420,18 +421,22 @@ Not support for asynchronous creating node in SG

### 1628

<!-- DEPRECATED -->
Renderer error: Size of the cc._RendererInSG._sgNode must be zero

### 1629

<!-- DEPRECATED -->
The node '%s' has a component inherited from 'cc._RendererInSG'

### 1630

<!-- DEPRECATED -->
JSB environment is not support invoke node.runAction before the 'cc._RendererInSG' component enabled.

### 1631

<!-- DEPRECATED -->
Please use runAction in the method 'start' instead.

### 1632
Expand Down Expand Up @@ -1558,6 +1563,7 @@ _ccsg.Label._initBMFontWithString(): Impossible to create font. Please check fil

### 4002

<!-- DEPRECATED -->
_ccsg.Label._initBMFontWithString(): re-init is no longer supported

### 4003
Expand Down Expand Up @@ -2008,26 +2014,32 @@ cc.ParticleBatchNode._addChildHelper(): child already added. It can't be added a

### 6008

<!-- DEPRECATED -->
_ccsg.ParticleSystem.initWithFile(): Particles: file not found

### 6009

<!-- DEPRECATED -->
_ccsg.ParticleSystem.initWithDictionary(): Invalid emitterType in config file

### 6010

<!-- DEPRECATED -->
_ccsg.ParticleSystem: error decoding or ungzipping textureImageData

### 6011

<!-- DEPRECATED -->
_ccsg.ParticleSystem: unknown image format with Data

### 6012

<!-- DEPRECATED -->
_ccsg.ParticleSystem.initWithDictionary() : error loading the texture

### 6013

<!-- DEPRECATED -->
Particle system: not enough memory

### 6014
Expand All @@ -2037,6 +2049,7 @@ Can't change blending functions when the particle is being batched

### 6015

<!-- DEPRECATED -->
_ccsg.ParticleSystem.setDisplayFrame(): QuadParticle only supports SpriteFrames with no offsets

### 6016
Expand Down Expand Up @@ -2096,6 +2109,18 @@ Unknown Photometric Interpretation: %s

Unkown error

### 6030

cc.ParticleSystem: error decoding or ungzipping textureImageData

### 6031

cc.ParticleSystem: unknown image format with Data

### 6032

cc.ParticleSystem.initWithDictionary() : error loading the texture

### 6100

<!-- DEPRECATED -->
Expand Down Expand Up @@ -2239,26 +2264,32 @@ Property 'mapLoaded' is unused now. Please write the logic to the callback 'star

### 7204

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileAt(): TMXLayer: the tiles map has been released

### 7205

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileGIDAt(): TMXLayer: the tiles map has been released

### 7206

<!-- DEPRECATED -->
_ccsg.TMXLayer.setTileGID(): TMXLayer: the tiles map has been released

### 7207

<!-- DEPRECATED -->
_ccsg.TMXLayer.setTileGID(): invalid gid: %s

### 7208

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileFlagsAt(): TMXLayer: the tiles map has been released

### 7209

<!-- DEPRECATED -->
_ccsg.TMXLayer.removeTileAt(): TMXLayer: the tiles map has been released

### 7210
Expand All @@ -2271,10 +2302,12 @@ TMX invalid value

### 7212

<!-- DEPRECATED -->
_ccsg.TMXTiledMap.initWithTMXFile(): Map not found. Please check the filename.

### 7213

<!-- DEPRECATED -->
_ccsg.TMXTiledMap.initWithXML(): Map not found. Please check the filename.

### 7214
Expand Down Expand Up @@ -2316,56 +2349,93 @@ Parse %s failed.

### 7223

<!-- DEPRECATED -->
_ccsg.TMXLayer.setTileGID(): pos should be non-null

### 7224

<!-- DEPRECATED -->
_ccsg.TMXTiledMap.getLayer(): layerName should be non-null or non-empty string.

### 7225

<!-- DEPRECATED -->
_ccsg.TMXTiledMap.getObjectGroup(): groupName should be non-null or non-empty string.

### 7226

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileAt(): pos should be non-null

### 7227

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileAt(): invalid position

### 7228

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileGIDAt(): pos should be non-null

### 7229

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileGIDAt(): invalid position

### 7230

<!-- DEPRECATED -->
_ccsg.TMXLayer.setTileGID(): pos should be non-null

### 7231

<!-- DEPRECATED -->
_ccsg.TMXLayer.setTileGID(): invalid position

### 7232

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileFlagsAt(): pos should be non-null

### 7233

<!-- DEPRECATED -->
_ccsg.TMXLayer.getTileFlagsAt(): invalid position

### 7234

<!-- DEPRECATED -->
_ccsg.TMXLayer.removeTileAt(): pos should be non-null

### 7235

<!-- DEPRECATED -->
_ccsg.TMXLayer.removeTileAt(): invalid position

### 7236

cc.TMXLayer.getTileAt(): TMXLayer: the tiles map has been released

### 7237

cc.TMXLayer.getTileGIDAt(): TMXLayer: the tiles map has been released

### 7238

cc.TMXLayer.setTileGID(): TMXLayer: the tiles map has been released

### 7239

cc.TMXLayer.setTileGID(): invalid gid: %s

### 7240

cc.TMXLayer.getTileFlagsAt(): TMXLayer: the tiles map has been released

### 7241

cc.TiledMap.initWithXML(): Map not found. Please check the filename.

### 7300

<!-- DEPRECATED -->
Expand Down
12 changes: 5 additions & 7 deletions cocos2d/actions/CCAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,17 +400,15 @@ cc.speed = function (action, speed) {
* @property {Number} topBoundary - world topBoundary.
* @property {Number} bottomBoundary - world bottomBoundary.
*
* @param {_ccsg.Node} followedNode
* @param {cc.Node} followedNode
* @param {Rect} rect
* @example
* // creates the action with a set boundary
* var sprite = new _ccsg.Sprite("spriteFileName");
* var followAction = new cc.Follow(sprite, cc.rect(0, 0, s.width * 2 - 100, s.height));
* var followAction = new cc.Follow(node, cc.rect(0, 0, s.width * 2 - 100, s.height));
* this.runAction(followAction);
*
* // creates the action with no boundary set
* var sprite = new _ccsg.Sprite("spriteFileName");
* var followAction = new cc.Follow(sprite);
* var followAction = new cc.Follow(node);
* this.runAction(followAction);
*
* @class
Expand All @@ -424,7 +422,7 @@ cc.Follow = cc.Class({
* Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function. <br />
* creates the action with a set boundary. <br/>
* creates the action with no boundary set.
* @param {_ccsg.Node} followedNode
* @param {cc.Node} followedNode
* @param {Rect} rect
*/
ctor:function (followedNode, rect) {
Expand Down Expand Up @@ -478,7 +476,7 @@ cc.Follow = cc.Class({
/*
* initializes the action with a set boundary.
*
* @param {_ccsg.Node} followedNode
* @param {cc.Node} followedNode
* @param {Rect} [rect=]
* @return {Boolean}
*/
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/CCNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ var Node = cc.Class({
* @method constructor
* @param {String} [name]
*/
ctor (name) {
ctor () {
this._reorderChildDirty = false;

// cache component
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/assets/CCSpriteFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ let temp_uvs = [{u: 0, v: 0}, {u: 0, v: 0}, {u: 0, v: 0}, {u: 0, v: 0}];
/**
* !#en
* A cc.SpriteFrame has:<br/>
* - texture: A cc.Texture2D that will be used by the _ccsg.Sprite<br/>
* - texture: A cc.Texture2D that will be used by render components<br/>
* - rectangle: A rectangle of the texture
*
* !#zh
* 一个 SpriteFrame 包含:<br/>
* - 纹理:会被 Sprite 使用的 Texture2D 对象。<br/>
* - 纹理:会被渲染组件使用的 Texture2D 对象。<br/>
* - 矩形:在纹理中的矩形区域。
*
* @class SpriteFrame
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/event-manager/CCEventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ cc.EventListener.prototype = {

/*
* Sets scene graph priority for this listener
* @param {_ccsg.Node|Node} node
* @param {cc.Node} node
* @private
*/
_setSceneGraphPriority: function (node) {
Expand All @@ -159,7 +159,7 @@ cc.EventListener.prototype = {

/*
* Gets scene graph priority of this listener
* @returns {_ccsg.Node|cc.Node} if it's a fixed priority listener, non-null for scene graph priority listener
* @returns {cc.Node} if it's a fixed priority listener, non-null for scene graph priority listener
* @private
*/
_getSceneGraphPriority: function () {
Expand Down
8 changes: 4 additions & 4 deletions cocos2d/core/event-manager/CCEventManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ var eventManager = {
* @param {Boolean} [recursive=false]
*/
pauseTarget: function (node, recursive) {
if (!(node instanceof cc._BaseNode || node instanceof _ccsg.Node)) {
if (!(node instanceof cc._BaseNode)) {
cc.warnID(3506);
return;
}
Expand All @@ -170,7 +170,7 @@ var eventManager = {
* @param {Boolean} [recursive=false]
*/
resumeTarget: function (node, recursive) {
if (!(node instanceof cc._BaseNode || node instanceof _ccsg.Node)) {
if (!(node instanceof cc._BaseNode)) {
cc.warnID(3506);
return;
}
Expand Down Expand Up @@ -732,7 +732,7 @@ var eventManager = {
*/
addListener: function (listener, nodeOrPriority) {
cc.assertID(listener && nodeOrPriority, 3503);
if (!(cc.js.isNumber(nodeOrPriority) || nodeOrPriority instanceof cc._BaseNode || nodeOrPriority instanceof _ccsg.Node)) {
if (!(cc.js.isNumber(nodeOrPriority) || nodeOrPriority instanceof cc._BaseNode)) {
cc.warnID(3506);
return;
}
Expand Down Expand Up @@ -902,7 +902,7 @@ var eventManager = {
*/
removeListeners: function (listenerType, recursive) {
var i, _t = this;
if (!(cc.js.isNumber(listenerType) || listenerType instanceof cc._BaseNode || listenerType instanceof _ccsg.Node)) {
if (!(cc.js.isNumber(listenerType) || listenerType instanceof cc._BaseNode)) {
cc.warnID(3506);
return;
}
Expand Down
7 changes: 2 additions & 5 deletions cocos2d/core/load-pipeline/text-downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
THE SOFTWARE.
****************************************************************************/

var sys = require('../platform/CCSys');

if (CC_JSB) {
module.exports = function (item, callback) {
module.exports = function (item) {
var url = item.url;

var result = jsb.fileUtils.getStringFromFile(url);
Expand All @@ -46,8 +44,7 @@ else {
url = urlAppendTimestamp(url);

var xhr = cc.loader.getXMLHttpRequest(),
errInfo = 'Load text file failed: ' + url,
navigator = window.navigator;
errInfo = 'Load text file failed: ' + url;
xhr.open('GET', url, true);
if (xhr.overrideMimeType) xhr.overrideMimeType('text\/plain; charset=utf-8');
xhr.onload = function () {
Expand Down
2 changes: 1 addition & 1 deletion cocos2d/core/physics/CCRigidBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var RigidBody = cc.Class({
return this._enabled;
},
set: function () {
cc.warnID('8200');
cc.warnID(8200);
},
visible: false,
override: true
Expand Down
4 changes: 2 additions & 2 deletions cocos2d/core/platform/CCMacro.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ cc.macro = {
* This formula prevents artifacts by using 99% of the texture. <br/>
* The "correct" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel<br/>
* <br/>
* Affected nodes: <br/>
* - _ccsg.TMXLayer <br/>
* Affected component: <br/>
* - cc.TMXLayer <br/>
* <br/>
* Enabled by default. To disabled set it to 0. <br/>
* To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h
Expand Down
Loading

0 comments on commit 1ec38cc

Please sign in to comment.