@@ -622,6 +622,8 @@ export default class PixiResourcesLoader {
622
622
const promise = spineAtlasPromises [ spineTextureAtlasName ] ;
623
623
if ( promise ) return promise ;
624
624
625
+ console . log ( 'in _getSpineTextureAtlas' , spineTextureAtlasName ) ;
626
+
625
627
if ( ! spineTextureAtlasName ) {
626
628
return {
627
629
textureAtlas : null ,
@@ -679,22 +681,33 @@ export default class PixiResourcesLoader {
679
681
) ;
680
682
681
683
return ( spineAtlasPromises [ spineTextureAtlasName ] = new Promise ( resolve => {
684
+ console . log ( 'in _getSpineTextureAtlas promise' , spineTextureAtlasName ) ;
682
685
const atlasUrl = ResourcesLoader . getResourceFullUrl (
683
686
project ,
684
687
spineTextureAtlasName ,
685
688
{
686
689
isResourceForPixi : true ,
687
690
}
688
691
) ;
692
+ console . log ( atlasUrl ) ;
689
693
PIXI . Assets . setPreferences ( {
690
694
preferWorkers : false ,
691
695
crossOrigin : checkIfCredentialsRequired ( atlasUrl )
692
696
? 'use-credentials'
693
697
: 'anonymous' ,
694
698
} ) ;
695
699
PIXI . Assets . add ( spineTextureAtlasName , atlasUrl , { images } ) ;
700
+ console . log (
701
+ 'added' ,
702
+ spineTextureAtlasName ,
703
+ resource ,
704
+ embeddedResourcesMapping
705
+ ) ;
696
706
PIXI . Assets . load ( spineTextureAtlasName ) . then (
697
707
atlas => {
708
+ // TODO: FIX.
709
+ // atlas returned here is null for some reason even if the resource exists.
710
+ console . log ( 'loaded atlas' , atlas ) ;
698
711
// Ideally atlas of type `TextureAtlas` should be passed here.
699
712
// But there is a known issue in case of preloaded images (see https://github.com/pixijs/spine/issues/537
700
713
// and search the other mentions to this issue in the codebase).
@@ -787,6 +800,8 @@ export default class PixiResourcesLoader {
787
800
} ;
788
801
}
789
802
803
+ console . log ( spineName ) ;
804
+
790
805
return ( spineDataPromises [ spineName ] = new Promise ( resolve => {
791
806
this . _getSpineTextureAtlas ( project , spineTextureAtlasName ) . then (
792
807
textureAtlasOrLoadingError => {
@@ -798,6 +813,8 @@ export default class PixiResourcesLoader {
798
813
} ) ;
799
814
}
800
815
816
+ console . log ( textureAtlasOrLoadingError ) ;
817
+
801
818
const spineUrl = ResourcesLoader . getResourceFullUrl (
802
819
project ,
803
820
spineName ,
0 commit comments