Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 503 Bytes

handleResize.md

File metadata and controls

13 lines (8 loc) · 503 Bytes
ex.handleResize(text)

Keeps a PIXI.Text looking sharp even after canvas has been resized with ex.resize. This function will reset the scale change of ex.resize, and instead resize by changing fontSize instead.

If you use ex.resize, then you need to call handleResize on all Text objects.

This function mutates the Text object and adds new fields to it, which probably will make type checkers fail

Arguments

text (PIXI.Text): The PIXI.Text object to make resizable.