mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #2507 from pandamicro/next
Fix JSB build issues and some small issues
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
+2460
-2540
File diff suppressed because one or more lines are too long
@@ -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
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user