更新编译文件

This commit is contained in:
SmallMain 2022-07-11 21:49:49 +08:00
parent 5fae478d4d
commit a2404dae86
3 changed files with 45 additions and 1 deletions

View File

@ -49785,6 +49785,7 @@
return _maxFrameSize; return _maxFrameSize;
}, },
set maxFrameSize(value) { set maxFrameSize(value) {
value > _textureSize && (value = _textureSize);
_maxFrameSize = value; _maxFrameSize = value;
}, },
get autoMultiBatch() { get autoMultiBatch() {
@ -50063,6 +50064,7 @@
var rect = spriteFrame._rect, texture = spriteFrame._texture; var rect = spriteFrame._rect, texture = spriteFrame._texture;
var sx = rect.x, sy = rect.y; var sx = rect.x, sy = rect.y;
var width = texture.width, height = texture.height; var width = texture.width, height = texture.height;
if (0 === this.rootRect.used && width > this.rootRect.width && height > this.rootRect.height) return this.insertSpriteFrameMax(spriteFrame);
var result = this.insert(texture); var result = this.insert(texture);
if (!result) return null; if (!result) return null;
if (cc.dynamicAtlasManager.textureBleeding) { if (cc.dynamicAtlasManager.textureBleeding) {
@ -50090,6 +50092,26 @@
}; };
return frame; return frame;
}; };
_proto.insertSpriteFrameMax = function insertSpriteFrameMax(spriteFrame) {
var rect = spriteFrame._rect;
var texture = spriteFrame._texture;
var original = this.rootRect;
original.uuid = texture._uuid;
original.used++;
original.parentRect && original.parentRect.used++;
cc.dynamicAtlasManager.rects[texture._uuid] = original;
this.removeFreeRect(0);
this._texture.drawTextureAt(texture, 0, 0);
this._count++;
original.spriteFrames.push(spriteFrame);
this._dirty = true;
var frame = {
x: rect.x,
y: rect.y,
texture: this._texture
};
return frame;
};
_proto.insert = function insert(texture) { _proto.insert = function insert(texture) {
var width = texture.width + this.padding, height = texture.height + this.padding; var width = texture.width + this.padding, height = texture.height + this.padding;
var score = Number.MAX_VALUE; var score = Number.MAX_VALUE;

File diff suppressed because one or more lines are too long

View File

@ -49656,6 +49656,7 @@
return _maxFrameSize; return _maxFrameSize;
}, },
set maxFrameSize(value) { set maxFrameSize(value) {
value > _textureSize && (value = _textureSize);
_maxFrameSize = value; _maxFrameSize = value;
}, },
get autoMultiBatch() { get autoMultiBatch() {
@ -49934,6 +49935,7 @@
var rect = spriteFrame._rect, texture = spriteFrame._texture; var rect = spriteFrame._rect, texture = spriteFrame._texture;
var sx = rect.x, sy = rect.y; var sx = rect.x, sy = rect.y;
var width = texture.width, height = texture.height; var width = texture.width, height = texture.height;
if (0 === this.rootRect.used && width > this.rootRect.width && height > this.rootRect.height) return this.insertSpriteFrameMax(spriteFrame);
var result = this.insert(texture); var result = this.insert(texture);
if (!result) return null; if (!result) return null;
if (cc.dynamicAtlasManager.textureBleeding) { if (cc.dynamicAtlasManager.textureBleeding) {
@ -49961,6 +49963,26 @@
}; };
return frame; return frame;
}; };
_proto.insertSpriteFrameMax = function insertSpriteFrameMax(spriteFrame) {
var rect = spriteFrame._rect;
var texture = spriteFrame._texture;
var original = this.rootRect;
original.uuid = texture._uuid;
original.used++;
original.parentRect && original.parentRect.used++;
cc.dynamicAtlasManager.rects[texture._uuid] = original;
this.removeFreeRect(0);
this._texture.drawTextureAt(texture, 0, 0);
this._count++;
original.spriteFrames.push(spriteFrame);
this._dirty = true;
var frame = {
x: rect.x,
y: rect.y,
texture: this._texture
};
return frame;
};
_proto.insert = function insert(texture) { _proto.insert = function insert(texture) {
var width = texture.width + this.padding, height = texture.height + this.padding; var width = texture.width + this.padding, height = texture.height + this.padding;
var score = Number.MAX_VALUE; var score = Number.MAX_VALUE;