Skip to content

Instantly share code, notes, and snippets.

@cj3kim
Created April 24, 2014 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cj3kim/11245910 to your computer and use it in GitHub Desktop.
Save cj3kim/11245910 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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