From 99712484b1b8526c125f090e6c22578d2c28f86f Mon Sep 17 00:00:00 2001 From: pandamicro Date: Fri, 20 Apr 2018 13:50:42 +0800 Subject: [PATCH] Fix dumb issues --- cocos2d/core/CCGame.js | 2 +- jsb/jsb-node.js | 10 +++++----- jsb/renderer.js | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index cfc7fbae51..d4306658a9 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -701,7 +701,7 @@ var game = { if (cc.sys.browserType === cc.sys.BROWSER_TYPE_WECHAT_GAME_SUB) { localCanvas = wx.getSharedCanvas(); } - else if (JSB) { + else if (CC_JSB) { localCanvas = window.__cccanvas; } else { diff --git a/jsb/jsb-node.js b/jsb/jsb-node.js index 0b3e45cd17..4bc5bd4937 100644 --- a/jsb/jsb-node.js +++ b/jsb/jsb-node.js @@ -50,14 +50,14 @@ function _mat4ToArray(typedArray, mat4) { typedArray[15] = mat4.m15; } -Node.prototype.getWorldRTInAB = function (node) { - node.getWorldRT(_mat4_temp); +Node.prototype.getWorldRTInAB = function () { + this.getWorldRT(_mat4_temp); _mat4ToArray(_typedArray_temp, _mat4_temp); return _typedArray_temp; }; -Node.prototype.getWorldMatrixInAB = function (node) { - node._updateWorldMatrix(); - _mat4ToArray(_typedArray_temp, node._worldMatrix); +Node.prototype.getWorldMatrixInAB = function () { + this._updateWorldMatrix(); + _mat4ToArray(_typedArray_temp, this._worldMatrix); return _typedArray_temp; }; \ No newline at end of file diff --git a/jsb/renderer.js b/jsb/renderer.js index 2fbba2335b..9612ab0001 100644 --- a/jsb/renderer.js +++ b/jsb/renderer.js @@ -23,8 +23,6 @@ THE SOFTWARE. ****************************************************************************/ -const utils = require('./utils'); - // projection renderer.PROJ_PERSPECTIVE = 0; renderer.PROJ_ORTHO = 1;