/**
 * Patch PIXI.Container class to add implementation of contains method.
 */ import { Container , DisplayObject } from "pixi.js" ; const ContainerMixin = { param child return see https contains ( this , child ) { let found = false ; if ( this === child || this . children . indexOf ( child ) >= 0 ) { found = true ; } else { for ( let c of this . children ) { if ( c instanceof Container && c . contains ( child ) ) { found = true ; break ; } } } return found ; } } ; Object . assign ( Container . prototype , ContainerMixin ) ;