ACM JS Hackathon game by bungle.js
Each feature can provide the following functions:
Called once EaselJS is initialized.
Called after init is called on all features and after the Containers are sorted.
Called 30 times per second. Takes an argument time which represents the time (in milliseconds) since the page loaded.
Called if the canvas is resized after init. Takes arguments transform, old which represent the current transform and the transform before the resize.
Called when a key is pressed. Takes arguments key, state which store a standard KeyboardEvent and whether it was a press (true) / release (false), respectively.
Called in add_feature. Returns an object that should be exposed to other features as mods.[featurename]. A function add_event_listener(event, fn) will be added to the object. If get_interface is not present or returns undefined, an empty object will be used instead.
Called in add_feature. Passes a function handle used to fire events on this feature. For example, handle('eventname', [argument1, argument2]) calls all listeners for event "eventname" on this feature with the arguments argument1, argument2.