Nefarious Pomegranate Magnate

    @iro/interaction

    1.2.10 • Public • Published

    Interaction

    npm version npm downloads

    The interaction plugin for pixi.js.

    Install

    npm i @iro/interaction

    Why Use It

    1. Unified event type, Pointer event only.
    2. Pointerout and Pointerupoutside have target value.

    Usage

    // webpack.config.js
    plugins: [
      new webpack.ProvidePlugin({
        PIXI: 'pixi.js'
      })
    ]
    import Interaction from '@iro/interaction'
    
    PIXI.Renderer.registerPlugin('interaction', Interaction)
    
    renderer.plugins.interaction.on('pointerdown', ev => {})
    sprite.on('pointerup', ev => {})
    
    /**
     * - tap
     * - pointerup
     * - pointerout
     * - pointermove
     * - pointerdown
     * - pointerenter
     * - pointerupoutside
    */

    Install

    npm i @iro/interaction

    DownloadsWeekly Downloads

    73

    Version

    1.2.10

    License

    MIT

    Unpacked Size

    281 kB

    Total Files

    6

    Last publish

    Collaborators

    • jetlua