@@ -75,6 +75,13 @@ Phaser.AnimationParser = {
7575 // uuid needed?
7676 data . addFrame ( new Phaser . Frame ( i , x , y , frameWidth , frameHeight , '' , uuid ) ) ;
7777
78+ PIXI . TextureCache [ uuid ] = new PIXI . Texture ( PIXI . BaseTextureCache [ key ] , {
79+ x : x ,
80+ y : y ,
81+ width : frameWidth ,
82+ height : frameHeight
83+ } ) ;
84+
7885 x += frameWidth + spacing ;
7986
8087 if ( x + frameWidth > width )
@@ -127,6 +134,13 @@ Phaser.AnimationParser = {
127134 uuid
128135 ) ) ;
129136
137+ PIXI . TextureCache [ uuid ] = new PIXI . Texture ( PIXI . BaseTextureCache [ cacheKey ] , {
138+ x : frames [ i ] . frame . x ,
139+ y : frames [ i ] . frame . y ,
140+ width : frames [ i ] . frame . w ,
141+ height : frames [ i ] . frame . h
142+ } ) ;
143+
130144 if ( frames [ i ] . trimmed )
131145 {
132146 newFrame . setTrim (
@@ -185,6 +199,13 @@ Phaser.AnimationParser = {
185199 uuid
186200 ) ) ;
187201
202+ PIXI . TextureCache [ uuid ] = new PIXI . Texture ( PIXI . BaseTextureCache [ cacheKey ] , {
203+ x : frames [ key ] . frame . x ,
204+ y : frames [ key ] . frame . y ,
205+ width : frames [ key ] . frame . w ,
206+ height : frames [ key ] . frame . h
207+ } ) ;
208+
188209 if ( frames [ key ] . trimmed )
189210 {
190211 newFrame . setTrim (
@@ -264,7 +285,13 @@ Phaser.AnimationParser = {
264285
265286 newFrame = data . addFrame ( new Phaser . Frame ( i , x , y , width , height , name , uuid ) ) ;
266287
267- // Trimmed?
288+ PIXI . TextureCache [ uuid ] = new PIXI . Texture ( PIXI . BaseTextureCache [ cacheKey ] , {
289+ x : x ,
290+ y : y ,
291+ width : width ,
292+ height : height
293+ } ) ;
294+ // Trimmed?
268295 if ( frameX !== null || frameY !== null )
269296 {
270297 newFrame . setTrim ( true , width , height , frameX , frameY , frameWidth , frameHeight ) ;
0 commit comments