export interface AEDataInterceptorConfig { text ? : PIXI . Text ; rawText ? : string ; image ? : PIXI . Sprite ; imagePath ? : string ; texture ? : any ; isDisused ? : boolean ; events ? : { [ x ] : Function ; } ; inPoint ? : number ; outPoint ? : number ; blendMode ? : number ; [ name ] : any ; } class memberof export class AEDataInterceptor { config : AEDataInterceptorConfig ; constructor ( config ) { this . config = config ; } memberof param { string } name param { string } name . text param { string } name . rawText param { string } name . image param { string } name . imagePath param { string } name . texture param { string } name . isDisused param { string } name . events param { string } name . inPoint param { string } name . outPoint param { string } name . blendMode param { any } param add ( name , param ) { if ( ! this . config ) this . config = { } ; this . config [ name ] = param ; } memberof param { object } intercept ( data ) { if ( data . layers ) { data . layers . forEach ( ( layer ) => { this . intercept ( layer ) ; } ) ; } const cfg = this . config [ data . nm ] || this . config [ data . p ] || this . config [ data . id ] ; if ( cfg ) { if ( cfg . text ) data . text = cfg . text ; if ( cfg . rawText ) data . rawText = cfg . rawText ; if ( cfg . image ) data . image = cfg . image ; if ( cfg . imagePath ) data . imagePath = cfg . imagePath ; if ( cfg . texture ) data . texture = cfg . texture ; if ( cfg . isDisused ) data . isDisused = cfg . isDisused ; if ( cfg . events ) data . events = cfg . events ; if ( cfg . inPoint ) data . ip = cfg . inPoint ; if ( cfg . outPoint ) data . op = cfg . outPoint ; if ( cfg . blendMode ) data . bmPIXI = cfg . blendMode ; } return data ; } }