Skip to content

Commit 9775623

Browse files
committed
Merge pull request #2732 from dingpinglv/Iss2698_namespace
Issue #2698: corrected some mistakes for refactoring.
2 parents 9933a52 + 96e999e commit 9775623

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

cocos2d/core/base-nodes/CCNodeWebGLRenderCmd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
node._camera._locateForRenderer(stackMatrix);
230230

231231
//cc.kmGLTranslatef(-apx, -apy, 0); optimize at here : kmGLTranslatef
232-
translation = cc.math.Matrix4.createByTranslation(apx, apy, 0, translation);
232+
translation = cc.math.Matrix4.createByTranslation(-apx, -apy, 0, translation);
233233
stackMatrix.multiply(translation);
234234
t4x4.identity(); //reset t4x4;
235235
} else {

cocos2d/core/sprites/CCSpriteFrameCache.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ cc.spriteFrameCache = /** @lends cc.spriteFrameCache# */{
147147

148148
var frameConfig = this._frameConfigCache[url] || this._getFrameConfigByJsonObject(url, jsonObject);
149149
//this._checkConflict(frameConfig); //TODO
150-
this._createSpriteFrames(frameConfig, texture);
150+
this._createSpriteFrames(url, frameConfig, texture);
151151
},
152152

153-
_createSpriteFrames: function(frameConfig, texture) {
153+
_createSpriteFrames: function(url, frameConfig, texture) {
154154
var frames = frameConfig.frames, meta = frameConfig.meta;
155155
if(!texture){
156156
var texturePath = cc.path.changeBasename(url, meta.image || ".png");
@@ -223,7 +223,7 @@ cc.spriteFrameCache = /** @lends cc.spriteFrameCache# */{
223223

224224
var frameConfig = this._frameConfigCache[url] || this._getFrameConfig(url);
225225
//this._checkConflict(frameConfig); //TODO
226-
this._createSpriteFrames(frameConfig, texture);
226+
this._createSpriteFrames(url, frameConfig, texture);
227227
},
228228

229229
// Function to check if frames to add exists already, if so there may be name conflit that must be solved

cocos2d/kazmath/gl/matrix.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
var identity = new cc.math.Matrix4(); //Temporary identity matrix
4444

4545
//Initialize all 3 stacks
46-
cc.modelview_matrix_stack.initialized();
47-
cc.projection_matrix_stack.initialized();
48-
cc.texture_matrix_stack.initialized();
46+
cc.modelview_matrix_stack.initialize();
47+
cc.projection_matrix_stack.initialize();
48+
cc.texture_matrix_stack.initialize();
4949

5050
cc.current_stack = cc.modelview_matrix_stack;
5151
cc.initialized = true;
@@ -132,7 +132,7 @@
132132
cc.current_stack.top.multiply(translation);
133133
};
134134

135-
var tempVector3 = new cc.math.Vec3(x, y, z);
135+
var tempVector3 = new cc.math.Vec3();
136136
cc.kmGLRotatef = function (angle, x, y, z) {
137137
tempVector3.fill(x, y, z);
138138
//Create a rotation matrix using the axis and the angle

0 commit comments

Comments
 (0)