New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade WebGL Renderer with auto batching #900
Conversation
cc.gl.blendFunc(this._blendFunc.src, this._blendFunc.dst); | ||
|
||
var wt = this._worldTransform; | ||
this._matrix.mat[0] = wt.a; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以把 this._matrix.mat 做个 local property, 下面调用次数还比较多
if (constructor) { | ||
return findComponent(this, constructor); | ||
if (typeOrClassName) { | ||
var constructor = getConstructor(typeOrClassName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
输入为空的话,本来是会报错的,现在不报错了吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥要报错来阻断执行呢?有一些应用场景里面,可能只是尝试获取,获取不到就算了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
只是报错,没有阻断。如果要尝试获取,传入参数更不应该是空。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哦,是这样的,在 CCNodePool 里面,用户有可能初始化的时候不传递 component,那我在那边处理一下也可以
Issues fixed, can be merged now |
@@ -427,7 +403,7 @@ cc.LabelTTF._firsrEnglish = /^[a-zA-Z0-9ÄÖÜäöüßéèçàùêâîôû]/; | |||
|
|||
if (node._string.length === 0) { | |||
locLabelCanvas.width = width; | |||
locLabelCanvas.height = locContentSize.height || 1; | |||
locLabelCanvas.height = height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要去掉 || 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 height 不是 ContentSize 了,是 texture height
} | ||
|
||
var locIDs = this._cacheInstanceIds; | ||
cc.arrayRemoveObject(locIDs, instanceID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc.arrayRemoveObject 已经被废弃了,现在是 cc.js.array.remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
估计是合并导致的
Re: cocos-creator/fireball#2787
Changes proposed in this pull request:
@cocos-creator/engine-admins