From 6d56bfb25462ba8ea6ebb6936a79bdeecd5b4fc2 Mon Sep 17 00:00:00 2001 From: dingpinglv Date: Mon, 9 Mar 2015 13:45:30 +0800 Subject: [PATCH] Fixed : Added addImageAsync to cc.textureCache. --- cocos2d/core/textures/CCTextureCache.js | 1 + cocos2d/core/textures/TexturesWebGL.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cocos2d/core/textures/CCTextureCache.js b/cocos2d/core/textures/CCTextureCache.js index a32929ffbf..ad24eea7d9 100644 --- a/cocos2d/core/textures/CCTextureCache.js +++ b/cocos2d/core/textures/CCTextureCache.js @@ -362,6 +362,7 @@ if (cc._renderType === cc._RENDER_TYPE_CANVAS) { return tex; }; + _p.addImageAsync = _p.addImage; _p = null; } else { diff --git a/cocos2d/core/textures/TexturesWebGL.js b/cocos2d/core/textures/TexturesWebGL.js index 7f838f0609..b1667ed971 100644 --- a/cocos2d/core/textures/TexturesWebGL.js +++ b/cocos2d/core/textures/TexturesWebGL.js @@ -901,5 +901,7 @@ cc._tmp.WebGLTextureCache = function () { return tex; }; - _p = null; + + _p.addImageAsync = _p.addImage; + _p = null; };