Game Stat Bar - phreaknation/phaserwebcomponents GitHub Wiki

A bar that can be both horizontal or vertical as well as fill from either end.

new this.game.PhaserWebComponents.components.Game.StatBar({
  owner: PhaserObject,
  options: {
    className: 'stamina',
    center: true,
    styles: {
      top: 0,
      left: 0
    }
  },
  watchers: [{
    name: 'stamina',
    proxy: this._.options.stamina,
  }],
})