Installation
yarn add phaser3-align-plugin
Usage
Import the plugin
import { AlignPlugin } from 'phaser3-align-plugin' const config = { plugins: { scene: [ { key: 'AlignPlugin', plugin: AlignPlugin, mapping: 'align' } ] }, }Use it
// Scale this.align.envelop(sprite, 1) this.align.vw(sprite, 1) this.align.vh(sprite, 1) // Open grid this.align.grid({rows: 7, cols: 7, debug: true, color: 0xff0000}) // position this.align.placeAt(sprite, row, col) this.align.placeAtIndex(sprite, index)