Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 351 Bytes

centerX.md

File metadata and controls

23 lines (14 loc) · 351 Bytes
ex.centerX(displayObject, xPosition)

Center a display object on the horizontal axis.

Arguments

displayObject (PIXI.DisplayObject): The display object to center

xPosition (Number): The x position to center the object on.

Returns

Nothing.

Example

const sprite = new PIXI.Sprite(texture)

ex.centerX(sprite, 500)