I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* PixiJS Background Cover/Contain Script | |
* Returns object | |
* . { | |
* container: PixiJS Container | |
* . doResize: Resize callback | |
* } | |
* ARGS: | |
* bgSize: Object with x and y representing the width and height of background. Example: {x:1280,y:720} | |
* inputSprite: Pixi Sprite containing a loaded image or other asset. Make sure you preload assets into this sprite. |