Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3.8.6] Fix a mangleProperties issue which is caused by using as any in trail.ts. #18216

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -107,7 +107,7 @@
public setVertexAttributes (): void {
if (this._model) {
this.updateVertexAttrib();
this._model.setVertexAttributes(this._renderInfo!.renderMode === ParticleRenderMode.Mesh ? this._renderInfo!.mesh : null, this._vertAttrs);

Check warning on line 110 in cocos/particle/renderer/particle-system-renderer-base.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 151. Maximum allowed is 150
}
}

Expand All @@ -128,7 +128,7 @@
}

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
Loading