import * as PIXI from 'pixi.js' ; export class VisualizationArea { public static ALPHA = 0.25 ; private readonly sprites : PIXI . Sprite [ ] ; public constructor ( sprites ) { this . sprites = sprites ; } public destroy ( ) { for ( const sprite of this . sprites ) { sprite . destroy ( ) ; } } public show ( ) { for ( const sprite of this . sprites ) { sprite . visible = true ; } } public hide ( ) { for ( const sprite of this . sprites ) { sprite . visible = false ; } } public highlight ( ) { for ( const sprite of this . sprites ) { sprite . alpha += VisualizationArea . ALPHA ; } } public moveTo ( position ) { for ( const sprite of this . sprites ) { sprite . position . set ( position . x , position . y ) ; } } }