pixi-hammer
Connect Hammer.js with PixiJS.
Allow us to use Hammer.js
gesture recognizer with PixiJS
instance.
Install
npm install pixi-hammer
Usage
var PIXI = ;var Connector = ; var app = 320 400;// initialize the Connectorvar c = app; // assume we have a PIXI instancevar rect = ;rect;rect;appstage; // listen hammer.js event from that instancec;
How it works
Instead of traverse whole PIXI scene graph, this connector cache listeners to its own stack and only check the instance itself and up to the root.
TODO
- examples for
stopPropagation
etc
License
MIT