mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #2966 from cocos-creator/v2.0-release
Merge v2.0 release to next
This commit is contained in:
@@ -2963,8 +2963,13 @@ var Node = cc.Class({
|
||||
|
||||
this._renderFlag |= RenderFlow.FLAG_TRANSFORM;
|
||||
if (this._renderComponent) {
|
||||
this._renderFlag |= RenderFlow.FLAG_COLOR;
|
||||
this._renderComponent.markForUpdateRenderData(true);
|
||||
if (this._renderComponent.enabled) {
|
||||
this._renderFlag |= RenderFlow.FLAG_COLOR;
|
||||
this._renderComponent.markForUpdateRenderData(true);
|
||||
}
|
||||
else {
|
||||
this._renderComponent.disableRender();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -375,6 +375,7 @@ let Mask = cc.Class({
|
||||
},
|
||||
|
||||
onDisable () {
|
||||
this._super();
|
||||
this.node._renderFlag &= ~(RenderFlow.FLAG_POST_RENDER | RenderFlow.FLAG_POST_UPDATE_RENDER_DATA);
|
||||
},
|
||||
|
||||
|
||||
@@ -385,11 +385,13 @@ let EditBox = cc.Class({
|
||||
|
||||
if (this.inputMode === InputMode.ANY){
|
||||
placeholderLabel.verticalAlign = macro.VerticalTextAlignment.TOP;
|
||||
placeholderLabel.enableWrapText = true;
|
||||
textLabel.verticalAlign = macro.VerticalTextAlignment.TOP;
|
||||
textLabel.enableWrapText = true;
|
||||
}
|
||||
else {
|
||||
placeholderLabel.verticalAlign = macro.VerticalTextAlignment.CENTER;
|
||||
placeholderLabel.enableWrapText = false;
|
||||
textLabel.verticalAlign = macro.VerticalTextAlignment.CENTER;
|
||||
textLabel.enableWrapText = false;
|
||||
}
|
||||
|
||||
@@ -549,6 +549,8 @@ cc.js.getset(PhysicsManager.prototype, 'enabled',
|
||||
return this._enabled;
|
||||
},
|
||||
function (value) {
|
||||
if (CC_EDITOR) return;
|
||||
|
||||
if (value && !this._world) {
|
||||
var world = new b2.World( new b2.Vec2(0, -10) );
|
||||
world.SetAllowSleeping(true);
|
||||
|
||||
@@ -609,6 +609,7 @@ function initSys () {
|
||||
sys.os = sys.OS_IOS;
|
||||
}
|
||||
else if (env.platform === 'devtools') {
|
||||
sys.isMobile = false;
|
||||
if (system.indexOf('android') > -1) {
|
||||
sys.os = sys.OS_ANDROID;
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ let dynamicAtlasManager = {
|
||||
!spriteFrame || spriteFrame._original) return;
|
||||
|
||||
let texture = spriteFrame._texture;
|
||||
if (texture instanceof cc.RenderTexture) return;
|
||||
|
||||
let w = texture.width, h = texture.height;
|
||||
let min = texture._minFilter, mag = texture._magFilter;
|
||||
let LINEAR = cc.Texture2D.Filter.LINEAR;
|
||||
|
||||
@@ -111,8 +111,8 @@ var motionStreakAssembler = {
|
||||
|
||||
let cur;
|
||||
if (points.length > 1) {
|
||||
let difx = points[0].x - tx;
|
||||
let dify = points[0].y - ty;
|
||||
let difx = points[0].point.x - tx;
|
||||
let dify = points[0].point.y - ty;
|
||||
if ((difx*difx + dify*dify) < comp.minSeg) {
|
||||
cur = points[0];
|
||||
}
|
||||
@@ -124,7 +124,7 @@ var motionStreakAssembler = {
|
||||
}
|
||||
|
||||
cur.setPoint(tx, ty);
|
||||
cur.time = comp._fadeTime;
|
||||
cur.time = comp._fadeTime + dt;
|
||||
|
||||
renderData.dataLength = 0;
|
||||
if (points.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user