Hi all! Here is the example I have
https://labs.phaser.io/edit.html?src=src\game%20objects\tile%20sprite\Example%20-%20Canvas.js
Put the code:
var config = {
parent: 'phaser-example',
scene: {
preload: preload,
create: create,
update: update
}
};
var image1;
var game = new Phaser.Game(config);
var iter = 0;
function preload () {
this.load.image('image1', 'https://devplatform.ml/local/phaser3/2t6iu-IvankaTrump.png');
}
function create () {
image1 = this.add.tileSprite(400, 300, 800, 192, 'image1');
}
function update () {
image1.tilePositionX = Math.cos(-iter) * 400;
iter += 0.01;
}
As you can see the girl face have some unused space on left and right sides so the tilingsprite have gaps. Is there a way to crop the TilingSprite texture to remove this gaps between girl faces ? Thanks in advance