更新编译文件

This commit is contained in:
SmallMain 2022-07-28 22:53:26 +08:00
parent 27477452c5
commit 02c09a2425
3 changed files with 23 additions and 5 deletions

View File

@ -30017,7 +30017,11 @@
if (!this._frame) return; if (!this._frame) return;
if (material) { if (material) {
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
isMultiMaterial ? this._texIdDirty = true : material.setProperty("texture", this._frame._texture); if (isMultiMaterial) {
var texture = this._frame._texture;
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._texIdDirty = true;
} else material.setProperty("texture", this._frame._texture);
this._assembler && (isMultiMaterial && !this._assembler.isMulti || !isMultiMaterial && this._assembler.isMulti) && RenderComponent.prototype._resetAssembler.call(this); this._assembler && (isMultiMaterial && !this._assembler.isMulti || !isMultiMaterial && this._assembler.isMulti) && RenderComponent.prototype._resetAssembler.call(this);
} }
BlendFunc.prototype._updateMaterial.call(this); BlendFunc.prototype._updateMaterial.call(this);
@ -31114,6 +31118,8 @@
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
if (isMultiMaterial) { if (isMultiMaterial) {
if (!this._texture) return; if (!this._texture) return;
var texture = this._texture;
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._updateMultiTexId(material, this._texture); this._updateMultiTexId(material, this._texture);
} else { } else {
var textureImpl = this._texture && this._texture.getImpl(); var textureImpl = this._texture && this._texture.getImpl();
@ -33948,7 +33954,10 @@
var oldDefine = material.getDefine("USE_TEXTURE"); var oldDefine = material.getDefine("USE_TEXTURE");
void 0 === oldDefine || oldDefine || material.define("USE_TEXTURE", true); void 0 === oldDefine || oldDefine || material.define("USE_TEXTURE", true);
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
if (isMultiMaterial) this._texIdDirty = true; else { if (isMultiMaterial) {
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._texIdDirty = true;
} else {
var textureImpl = texture && texture.getImpl(); var textureImpl = texture && texture.getImpl();
material.getProperty("texture") !== textureImpl && material.setProperty("texture", texture); material.getProperty("texture") !== textureImpl && material.setProperty("texture", texture);
} }

File diff suppressed because one or more lines are too long

View File

@ -30001,7 +30001,11 @@
if (!this._frame) return; if (!this._frame) return;
if (material) { if (material) {
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
isMultiMaterial ? this._texIdDirty = true : material.setProperty("texture", this._frame._texture); if (isMultiMaterial) {
var texture = this._frame._texture;
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._texIdDirty = true;
} else material.setProperty("texture", this._frame._texture);
this._assembler && (isMultiMaterial && !this._assembler.isMulti || !isMultiMaterial && this._assembler.isMulti) && RenderComponent.prototype._resetAssembler.call(this); this._assembler && (isMultiMaterial && !this._assembler.isMulti || !isMultiMaterial && this._assembler.isMulti) && RenderComponent.prototype._resetAssembler.call(this);
} }
BlendFunc.prototype._updateMaterial.call(this); BlendFunc.prototype._updateMaterial.call(this);
@ -31098,6 +31102,8 @@
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
if (isMultiMaterial) { if (isMultiMaterial) {
if (!this._texture) return; if (!this._texture) return;
var texture = this._texture;
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._updateMultiTexId(material, this._texture); this._updateMultiTexId(material, this._texture);
} else { } else {
var textureImpl = this._texture && this._texture.getImpl(); var textureImpl = this._texture && this._texture.getImpl();
@ -33933,7 +33939,10 @@
var oldDefine = material.getDefine("USE_TEXTURE"); var oldDefine = material.getDefine("USE_TEXTURE");
void 0 === oldDefine || oldDefine || material.define("USE_TEXTURE", true); void 0 === oldDefine || oldDefine || material.define("USE_TEXTURE", true);
var isMultiMaterial = material.material.isMultiSupport(); var isMultiMaterial = material.material.isMultiSupport();
if (isMultiMaterial) this._texIdDirty = true; else { if (isMultiMaterial) {
texture instanceof cc.Texture2D && !texture.loaded && cc.assetManager.postLoadNative(texture);
this._texIdDirty = true;
} else {
var textureImpl = texture && texture.getImpl(); var textureImpl = texture && texture.getImpl();
material.getProperty("texture") !== textureImpl && material.setProperty("texture", texture); material.getProperty("texture") !== textureImpl && material.setProperty("texture", texture);
} }