phaser3-align-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

Installation

yarn add phaser3-align-plugin

Usage

  1. Import the plugin

    import { AlignPlugin } from 'phaser3-align-plugin'
    const config = {
        plugins: {
            scene: [
                {
                    key: 'AlignPlugin',
                    plugin: AlignPlugin,
                    mapping: 'align'
                }
            ]
        },
    }
  2. 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)

Package Sidebar

Install

npm i phaser3-align-plugin

Weekly Downloads

0

Version

1.2.3

License

MIT

Unpacked Size

9.18 kB

Total Files

9

Last publish

Collaborators

  • liurongqing