event-sys
v1.1.3
Published
High performance event system mainly for game development.
Downloads
3
Maintainers
Readme
event-sys
High performance event system mainly foucs on game.
Install
npm install event-sys
Usage
used as class
import { EventEmitter } from 'event-sys';
let e = new EventEmitter();
e.on('foobar', (foo, bar) => {
// ouput: 'foo', 'bar'
console.log(`${foo}, ${bar}`);
});
mixin with Node
import { EventEmitter } from 'event-sys';
import { Node } from 'scene-graph';
class EventNode extends Node {
constructor() {
this.__initEventEmitter();
}
}
EventEmitter.mixin(EventNode);
Documentation
TODO
License
MIT © 2017 Johnny Wu