mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
only concat none undefiend patch macros
This commit is contained in:
@@ -11,7 +11,7 @@ export class MorphModel extends Model {
|
||||
|
||||
protected getMacroPatches(subModelIndex: number) : any {
|
||||
if (this._morphRenderingInstance) {
|
||||
return this._morphRenderingInstance.requiredPatches(subModelIndex)?.concat(super.getMacroPatches(subModelIndex) );
|
||||
return this._morphRenderingInstance.requiredPatches(subModelIndex);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,10 @@ export class SkinningModel extends MorphModel {
|
||||
}
|
||||
|
||||
protected getMacroPatches(subModelIndex: number) : any {
|
||||
return myPatches.concat(super.getMacroPatches(subModelIndex) );
|
||||
const superMacroPatches = super.getMacroPatches(subModelIndex);
|
||||
if (superMacroPatches) {
|
||||
return myPatches.concat(superMacroPatches);
|
||||
}
|
||||
}
|
||||
|
||||
protected updateAttributesAndBinding(subModelIndex : number) {
|
||||
|
||||
Reference in New Issue
Block a user