diff --git a/common/changes/@visactor/vtable/fix-load-gif_2024-12-03-09-19.json b/common/changes/@visactor/vtable/fix-load-gif_2024-12-03-09-19.json new file mode 100644 index 000000000..9f356fd82 --- /dev/null +++ b/common/changes/@visactor/vtable/fix-load-gif_2024-12-03-09-19.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vtable", + "comment": "fix: fix cache problem in Icon.loadGif() #2905", + "type": "none" + } + ], + "packageName": "@visactor/vtable" +} \ No newline at end of file diff --git a/packages/vtable/src/scenegraph/graphic/icon.ts b/packages/vtable/src/scenegraph/graphic/icon.ts index e77ae3a8e..731240e9c 100644 --- a/packages/vtable/src/scenegraph/graphic/icon.ts +++ b/packages/vtable/src/scenegraph/graphic/icon.ts @@ -57,7 +57,7 @@ export class Icon extends Image { loadGif() { this.playing = false; - ResourceLoader.GetFile((this.attribute as any).gif, 'arrayBuffer') + ResourceLoader.GetFile((this.attribute as any).gif + '?role=gif', 'arrayBuffer') // ?role=gif: hack for ResourceLoader cache .then((res: ArrayBuffer) => { const gif = parseGIF(res); const frames = decompressFrames(gif, true);