{"action":"created","issue":{"url":"https://api.github.com/repos/OSSIA/i-score/issues/67","labels_url":"https://api.github.com/repos/OSSIA/i-score/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/OSSIA/i-score/issues/67/comments","events_url":"https://api.github.com/repos/OSSIA/i-score/issues/67/events","html_url":"https://github.com/OSSIA/i-score/issues/67","id":115750787,"number":67,"title":"Javascript process needs testing","user":{"login":"jcelerier","id":2772730,"avatar_url":"https://avatars.githubusercontent.com/u/2772730?v=3","gravatar_id":"","url":"https://api.github.com/users/jcelerier","html_url":"https://github.com/jcelerier","followers_url":"https://api.github.com/users/jcelerier/followers","following_url":"https://api.github.com/users/jcelerier/following{/other_user}","gists_url":"https://api.github.com/users/jcelerier/gists{/gist_id}","starred_url":"https://api.github.com/users/jcelerier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcelerier/subscriptions","organizations_url":"https://api.github.com/users/jcelerier/orgs","repos_url":"https://api.github.com/users/jcelerier/repos","events_url":"https://api.github.com/users/jcelerier/events{/privacy}","received_events_url":"https://api.github.com/users/jcelerier/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OSSIA/i-score/labels/need%20testing","name":"need testing","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-08T18:31:45Z","updated_at":"2015-11-09T14:45:11Z","closed_at":null,"body":"As the result of some experiments this week-end, i-score inherited a new process, which allows to write javascript code at run-time that will be executed on each tick of the process.\r\n\r\nHere is some example code  to put in the text box in the inspector when such a process is added to the constraint : \r\n\r\n    (function(t) {\r\n      var obj = new Object;\r\n      obj[\"address\"] = 'OSCdevice:/millumin/layer/x/instance';\r\n      obj[\"value\"] = t + iscore.value('OSCdevice:/millumin/layer/y/instance');\r\n      return [ obj ];\r\n    });\r\n\r\nSome informations : \r\n - `t` is the relative time in the process, between 0 and 1 if I am not mistaken.\r\n - The function shall return an array of messages which will form a state together. A message is simply an object with an `address` and a `value` field.\r\n - One can fetch values from the tree tree with the `iscore.value(address)` function which is for now the only \"i-score Javascript API\" function.\r\n - There will be nothing displayed if the code is invalid - patches welcome!\r\n\r\n \r\nPlease test.\r\n"},"comment":{"url":"https://api.github.com/repos/OSSIA/i-score/issues/comments/155083059","html_url":"https://github.com/OSSIA/i-score/issues/67#issuecomment-155083059","issue_url":"https://api.github.com/repos/OSSIA/i-score/issues/67","id":155083059,"user":{"login":"theod","id":118426,"avatar_url":"https://avatars.githubusercontent.com/u/118426?v=3","gravatar_id":"","url":"https://api.github.com/users/theod","html_url":"https://github.com/theod","followers_url":"https://api.github.com/users/theod/followers","following_url":"https://api.github.com/users/theod/following{/other_user}","gists_url":"https://api.github.com/users/theod/gists{/gist_id}","starred_url":"https://api.github.com/users/theod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theod/subscriptions","organizations_url":"https://api.github.com/users/theod/orgs","repos_url":"https://api.github.com/users/theod/repos","events_url":"https://api.github.com/users/theod/events{/privacy}","received_events_url":"https://api.github.com/users/theod/received_events","type":"User","site_admin":false},"created_at":"2015-11-09T14:45:11Z","updated_at":"2015-11-09T14:45:11Z","body":"it works perfectly at execution time !"}}