Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 387 Bytes

Readme.md

File metadata and controls

28 lines (16 loc) · 387 Bytes

canvas-battery

Canvas Battery Status

Installation

$ component install bencevans/canvas-battery

API

new Battery(canvasDOMElement, [chargePercent=0])

  • draws walls
  • draws charge
  • returns a Battery Instance

battery.update(chargePercent)

  • sets new charge value
  • redraws charge

battery.charge

  • current charge percentage

License

MIT