ex.centerX(displayObject, xPosition)
Center a display object on the horizontal axis.
displayObject
(PIXI.DisplayObject): The display object to center
xPosition
(Number): The x position to center the object on.
Nothing.
const sprite = new PIXI.Sprite(texture)
ex.centerX(sprite, 500)