Skip to content

Instantly share code, notes, and snippets.

@cj3kim
Created Apr 24, 2014
Embed
What would you like to do?
1. Create an emitter object
var emitter = require('emitter').EventEmitter;
engine.on('resize', function () {
emitter.emit('resize');
})
emitter.on('resize', function () {
// do stuff to your surfaces
})
@cj3kim

This comment has been minimized.

Copy link
Owner Author

@cj3kim cj3kim commented Apr 24, 2014

pass emitter where you want to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment