{"action":"opened","issue":{"url":"https://api.github.com/repos/polyrhythmatic/p5-connect/issues/1","repository_url":"https://api.github.com/repos/polyrhythmatic/p5-connect","labels_url":"https://api.github.com/repos/polyrhythmatic/p5-connect/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/polyrhythmatic/p5-connect/issues/1/comments","events_url":"https://api.github.com/repos/polyrhythmatic/p5-connect/issues/1/events","html_url":"https://github.com/polyrhythmatic/p5-connect/issues/1","id":167882326,"number":1,"title":"Namespace for p5.connect","user":{"login":"polyrhythmatic","id":8644048,"avatar_url":"https://avatars.githubusercontent.com/u/8644048?v=3","gravatar_id":"","url":"https://api.github.com/users/polyrhythmatic","html_url":"https://github.com/polyrhythmatic","followers_url":"https://api.github.com/users/polyrhythmatic/followers","following_url":"https://api.github.com/users/polyrhythmatic/following{/other_user}","gists_url":"https://api.github.com/users/polyrhythmatic/gists{/gist_id}","starred_url":"https://api.github.com/users/polyrhythmatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polyrhythmatic/subscriptions","organizations_url":"https://api.github.com/users/polyrhythmatic/orgs","repos_url":"https://api.github.com/users/polyrhythmatic/repos","events_url":"https://api.github.com/users/polyrhythmatic/events{/privacy}","received_events_url":"https://api.github.com/users/polyrhythmatic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-27T15:24:14Z","updated_at":"2016-07-27T15:24:14Z","closed_at":null,"body":"Hey @lmccart ! As the client end of p5.connect is taking shape, @vanevery and I had a discussion about where the constructors should live for this. Pinging @tigoe on this as well.\r\n\r\nThe overall package is p5.Connect. However, currently the standard in p5 is to add functions to the global space. This sort of makes sense with serial because it follows how the namespace works with processing. However, I am hoping to expand p5 connect to support at a minimum, the following devices:\r\n\r\n- Serial\r\n- Midi\r\n- HID (game controllers)\r\n- ACN (dmx controller for lighting)\r\n- OSC\r\n- Leapmotion?\r\n\r\nAdding all of these to the global namespace seems a bit insane. I would personally prefer to have them as a child of the connect object. Additionally, they would all share the same Connect object since there is one websocket server between it and the app.\r\n\r\nI think it will make more sense to have everything as a child of the connect object. Otherwise you have to declare the connect object\r\n\r\n`var connect = new Connect(<host>, <port>)`\r\n\r\nand then declare your serial or midi object\r\n\r\n`var serial = new Serial();`\r\n\r\nwith no obvious connection between the two.\r\n\r\nI think it would be best to declare the connect object and instantiate from it\r\n\r\n`var connect = new Connect(<host>, <port>)`\r\n`var serial = new connect.Serial();` \r\n\r\nWhat is everyone else's thoughts on this?"}}
{"actor":{"display_login":"polyrhythmatic"}}