File tree Expand file tree Collapse file tree
packages/webgal/src/Core/controller/stage/pixi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ export class GifResource extends BaseImageResource {
4545 public readonly fps : number ;
4646 public readonly url : string = '' ;
4747
48- private _arrayBuffer : ArrayBuffer | null = null ;
4948 private _frames : PrecomputedFrame [ ] = [ ] ;
5049 private _currentTime = 0 ;
5150 private _playing = false ;
@@ -68,9 +67,8 @@ export class GifResource extends BaseImageResource {
6867
6968 this . _loadPromise = ( async ( ) => {
7069 const res = await settings . ADAPTER . fetch ( this . url ) ;
71- this . _arrayBuffer = await res . arrayBuffer ( ) ;
70+ const buffer = await res . arrayBuffer ( ) ;
7271
73- const buffer = this . _arrayBuffer ;
7472 if ( ! buffer ?. byteLength ) throw new Error ( 'Invalid GIF buffer' ) ;
7573
7674 const gif = parseGIF ( buffer ) ;
@@ -137,7 +135,6 @@ export class GifResource extends BaseImageResource {
137135 this . stop ( ) ;
138136 super . dispose ( ) ;
139137 this . _frames = [ ] ;
140- this . _arrayBuffer = null ;
141138 this . _loadPromise = null ;
142139 }
143140
You can’t perform that action at this time.
0 commit comments