0.2.1 • Published 4 years ago

color-code-entity-light-plugin v0.2.1

Weekly downloads
3
License
CC0-1.0
Repository
github
Last release
4 years ago

color-code-entity-light-plugin

warning: this plugin if use in a browser is useable only server

color-code-entity-light-plugin adds 2 new entities ColorCodeImageEntity and ColorCodeSpriteEntity which itself adds new methods.

keepAlpha(value: boolean): this
setAlpha(value: number): this
getAlpha(): number
changeColor(
    from: [red, green, blue],
    to: [red, green, blue]
): this
removeColor(from: [red, green, blue]): this

Example:

class Entity extends ColorCodeImageEntity {
  init() {
    this.changeColor([253, 49, 80], [253, 49, 170])
  }
}

before: before after: after