import { ResManager } from "../core/ResManager" ; let readSkeletonData = PIXI . spine . core . SkeletonJson . prototype . readSkeletonData ; /**
 * 读取spine数据
 *
 * 为什么要重写此函数（重要）
 *         此函数有被异步加载调用， js trycatch不了异步的报错！
 *
 * 添加spine报错时   定位哪一个spine的处理
 */ PIXI . spine . core . SkeletonJson . prototype . readSkeletonData = function ( json ) : PIXI . spine . core . SkeletonData { try { return readSkeletonData . call ( this , json ) ; } catch ( error ) { console . log ( json , this ) ; let imgNameArr = new Array ( ) ; let atlas = this . attachmentLoader ? ( < any > this . attachmentLoader ) . atlas : undefined ; if ( atlas && Array . isArray ( atlas . pages ) ) { atlas . pages . forEach ( ( element ) => { if ( element && ! imgNameArr . includes ( element . name ) ) { imgNameArr . push ( element . name ) ; } } ) ; } throw new Error ( `spine异常  报错的spine图片:[${ imgNameArr . toString ( ) }]。\n${ error . toString ( ) }` ) ; } } ;