{"action":"opened","issue":{"url":"https://api.github.com/repos/calder-gl/calder/issues/112","repository_url":"https://api.github.com/repos/calder-gl/calder","labels_url":"https://api.github.com/repos/calder-gl/calder/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/calder-gl/calder/issues/112/comments","events_url":"https://api.github.com/repos/calder-gl/calder/issues/112/events","html_url":"https://github.com/calder-gl/calder/issues/112","id":334114557,"node_id":"MDU6SXNzdWUzMzQxMTQ1NTc=","number":112,"title":"Armature \"macros\"","user":{"login":"davepagurek","id":5315059,"node_id":"MDQ6VXNlcjUzMTUwNTk=","avatar_url":"https://avatars3.githubusercontent.com/u/5315059?v=4","gravatar_id":"","url":"https://api.github.com/users/davepagurek","html_url":"https://github.com/davepagurek","followers_url":"https://api.github.com/users/davepagurek/followers","following_url":"https://api.github.com/users/davepagurek/following{/other_user}","gists_url":"https://api.github.com/users/davepagurek/gists{/gist_id}","starred_url":"https://api.github.com/users/davepagurek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davepagurek/subscriptions","organizations_url":"https://api.github.com/users/davepagurek/orgs","repos_url":"https://api.github.com/users/davepagurek/repos","events_url":"https://api.github.com/users/davepagurek/events{/privacy}","received_events_url":"https://api.github.com/users/davepagurek/received_events","type":"User","site_admin":false},"labels":[{"id":929928622,"node_id":"MDU6TGFiZWw5Mjk5Mjg2MjI=","url":"https://api.github.com/repos/calder-gl/calder/labels/armature","name":"armature","color":"bba4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-20T14:48:12Z","updated_at":"2018-06-20T14:48:12Z","closed_at":null,"author_association":"MEMBER","body":"There are some common patterns that we should make functions for.\r\n\r\n```js\r\n// We shouldn't have to specify 1 as the weight since this is by far the most common case.\r\n// Instead, we should make `defineWeighted` be the option to use where a custom weight is wanted.\r\ngenerator.define('name', (spawn) => { ... });\r\n// ...equivalent to\r\ngenerator.defineWeighted('name', 1, (spawn) => { ... });\r\n\r\n\r\n// It is common to have a rule where you want it to randomly either be something or nothing.\r\ngenerator.maybe('name', (spawn) => { ... });\r\n// equivalent to\r\ngenerator.define('name', (spawn) => { ... });\r\ngenerator.define('name', (spawn) => {}); // adds an alternative definition that does nothing\r\n\r\n\r\n// A set of options, all with equal weight\r\ngenerator.choice('name', [\r\n  (spawn) => { ... },\r\n  (spawn) => { ... },\r\n  (spawn) => { ... },\r\n]);\r\n// equivalent to\r\ngenerator.define('name', (spawn) => { ... });\r\ngenerator.define('name', (spawn) => { ... });\r\ngenerator.define('name', (spawn) => { ... });\r\n```"}}
{"actor":{"display_login":"davepagurek"}}