@masatomakino/pixijs-mouse-event-transmitter
v0.6.0
Published
Transmit mouse events from pixi.js stage to other canvas.
Downloads
51
Readme
pixijs-mouse-event-transmitter
Transmit mouse events from pixi.js stage to other canvas.
Demo
API
Getting Started
Install
pixijs-mouse-event-transmitter depend on pixi.js
npm install pixi.js --save-dev
and
npm install @masatomakino/pixijs-mouse-event-transmitter --save-dev
Import
pixijs-mouse-event-transmitter is composed of ES modules and TypeScript d.ts files.
At first, import classes.
import { MouseEventTransmitter } from "@masatomakino/pixijs-mouse-event-transmitter";
const transmitter = new MouseEventTransmitter({
transmitTarget: canvas, // transmitter target ( dom element )
app: app, // app instance of pixi.js
});
canvas.addEventListener("pointermove", (e) => {
console.log(e);
});