Started porting ofxStateMachine to JS.