class Example extends Phaser.Scene {
  preload() {}

  create() {
    const ellipse = this.add.ellipse(
      config.width / 2,
      config.height / 2,
      50,
      20,
      0xffffff
    );
    this.tweens.add({
      targets: ellipse,
      rotation: Math.PI * 2,
      duration: 1500,
      repeat: -1
    });
  }
}

const config = {
  type: Phaser.AUTO,
  transparent: true,
  width: 800,
  height: 400,
  scene: Example
};

const game = new Phaser.Game(config);

External CSS

  1. https://codepen.io/tim-momo/pen/yLWvyra.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/phaser/3.80.1/phaser.min.js