javascript - How to stretch tileSprite to fullscreen in Phaser? -
so, question is: how stretch tilesprite fullscreen ?
planetsprite = game.add.tilesprite(0, 0, game.width + 500, game.height + 900, planetobject.key + 'planet'); // planetsprite.anchor.setto(0, 0); planetsprite.scale.set(0.75, 0.6); planetsprite.fixedtocamera = true;
and here have problem: looks ok on screen, on bigger 1 tilesprite repeated , it's not stretched fullscreen on bigger screens
image attached
thank in advance, guys !!
sprite.scale
sets scale of sprite percentage of actual dimensions, 1000 px-wide sprite scale.x
set 0.75
750 pixels wide on screen.
my approach set sprite.width
wide game.width
, set sprite.scale.y = sprite.scale.x
keep aspect ratio.
Comments
Post a Comment