Skip to content

Commit

Permalink
[v3.8.6] Fix a mangleProperties issue which is caused by using `as an…
Browse files Browse the repository at this point in the history
…y` in trail.ts. (#18216)
  • Loading branch information
dumganhar authored Jan 20, 2025
1 parent 1ff0f41 commit e652d6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cocos/particle/renderer/particle-system-renderer-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export abstract class ParticleSystemRendererBase {
}

public updateTrailMaterial (): void {}
public getDefaultTrailMaterial (): null { return null; }
public getDefaultTrailMaterial (): Material | null { return null; }
public abstract getParticleCount (): number;
public abstract getFreeParticle (): Particle | null;
public abstract onMaterialModified (index: number, material: Material): void;
Expand Down
2 changes: 1 addition & 1 deletion cocos/particle/renderer/particle-system-renderer-cpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default class ParticleSystemRendererCPU extends ParticleSystemRendererBas
return this._particles!.add();
}

public getDefaultTrailMaterial (): any {
public getDefaultTrailMaterial (): Material | null {
return this._defaultTrailMat;
}

Expand Down
2 changes: 1 addition & 1 deletion cocos/particle/renderer/trail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export default class TrailModule {
public updateMaterial (): void {
if (this._particleSystem) {
this._material = this._particleSystem.getMaterialInstance(1)
|| (this._particleSystem.processor as any)._defaultTrailMat;
|| this._particleSystem.processor.getDefaultTrailMaterial();
if (this._trailModel) {
this._trailModel.setSubModelMaterial(0, this._material!);
}
Expand Down

0 comments on commit e652d6e

Please sign in to comment.