From f4b576b45c2b2422b31df5a65fc02a1df79ba52e Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 22 Jan 2025 15:18:58 +0800 Subject: [PATCH] Update type in png-reader.ts --- cocos/particle-2d/png-reader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/particle-2d/png-reader.ts b/cocos/particle-2d/png-reader.ts index 74b395b8aa2..0bc0375bf26 100644 --- a/cocos/particle-2d/png-reader.ts +++ b/cocos/particle-2d/png-reader.ts @@ -42,7 +42,7 @@ interface PNGAnimationFrame { interface PNGTransparency { indexed?: number[]; - rgb?: number[] | number; + rgb?: number[]; grayscale?: number; } @@ -58,7 +58,7 @@ export class PNGReader { private imgData: Uint8Array | number[] = []; private transparency: PNGTransparency = { indexed: [], - rgb: 0, + rgb: [], grayscale: 0, }; private declare animation: {