class Example extends Phaser.Scene {
preload() {}
create() {
const circle = this.add.circle(100, config.height / 2, 10, 0xffffff);
this.tweens.add({
targets: circle,
x: 600,
duration: 3000,
repeat: -1
});
}
}
const config = {
type: Phaser.AUTO,
transparent: true,
width: 800,
height: 400,
scene: Example
};
const game = new Phaser.Game(config);