Merge pull request #2507 from pandamicro/next

Fix JSB build issues and some small issues
This commit is contained in:
pandamicro
2018-04-08 01:05:02 +08:00
committed by GitHub
5 changed files with 2469 additions and 2544 deletions
+3
View File
@@ -362,6 +362,9 @@ var Texture2D = cc.Class({
this._image = options.images[0];
}
else if (options.image !== undefined) {
// Release previous gl texture if existed
this._texture.destroy();
this._image = options.image;
if (!options.images) {
_images.length = 0;
+1 -2
View File
@@ -65,8 +65,7 @@ var pool = new js.Pool(function (node) {
if (CC_DEV) {
cc.assert(!node._parent, 'Recycling node\'s parent should be null!');
}
let Flags = cc.Object.Flags;
if (node._objFlags & Flags.Destroyed || node._objFlags & Flags.Destroying) {
if (!cc.isValid(node)) {
return false;
}
if (node.getComponent(cc.LabelOutline)) {
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -45,7 +45,7 @@ var jsbSkipModules = [
];
var aliasifyConfig = {
replacements: {
'(.*)render-engine(.js)?': './cocos2d/core/renderer/render-engine.jsb'
'(.*)render-engine(.js)?': require.resolve('../../cocos2d/core/renderer/render-engine.jsb')
},
verbose: false
};
+4 -1
View File
@@ -26,6 +26,9 @@
// PREDEFINE
// window may be undefined when first load engine from editor
var _global = typeof window === 'undefined' ? global : window;
/**
* !#en
* The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace.
@@ -34,7 +37,7 @@
* @module cc
* @main cc
*/
cc = cc || {};
cc = _global.cc || {};
require('./predefine');
require('./CCDebugger');