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
/* | |
WIP | |
Only works for full screen sprites. | |
width: width of the sprite container | |
height: height of the sprite container | |
type: "cover" or "contain" | |
*/ | |
PIXI.Sprite.prototype.setSize = function(width, height, type) { | |
var texture = { width: this.texture.width, height: this.texture.height }, | |
targetRatio = width / height, |