{"action":"created","issue":{"url":"https://api.github.com/repos/jonobr1/two.js/issues/305","repository_url":"https://api.github.com/repos/jonobr1/two.js","labels_url":"https://api.github.com/repos/jonobr1/two.js/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/jonobr1/two.js/issues/305/comments","events_url":"https://api.github.com/repos/jonobr1/two.js/issues/305/events","html_url":"https://github.com/jonobr1/two.js/issues/305","id":349927570,"node_id":"MDU6SXNzdWUzNDk5Mjc1NzA=","number":305,"title":"Basic usage example does not work","user":{"login":"kinospro","id":14953640,"node_id":"MDQ6VXNlcjE0OTUzNjQw","avatar_url":"https://avatars3.githubusercontent.com/u/14953640?v=4","gravatar_id":"","url":"https://api.github.com/users/kinospro","html_url":"https://github.com/kinospro","followers_url":"https://api.github.com/users/kinospro/followers","following_url":"https://api.github.com/users/kinospro/following{/other_user}","gists_url":"https://api.github.com/users/kinospro/gists{/gist_id}","starred_url":"https://api.github.com/users/kinospro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinospro/subscriptions","organizations_url":"https://api.github.com/users/kinospro/orgs","repos_url":"https://api.github.com/users/kinospro/repos","events_url":"https://api.github.com/users/kinospro/events{/privacy}","received_events_url":"https://api.github.com/users/kinospro/received_events","type":"User","site_admin":false},"labels":[{"id":13278864,"node_id":"MDU6TGFiZWwxMzI3ODg2NA==","url":"https://api.github.com/repos/jonobr1/two.js/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-13T08:09:55Z","updated_at":"2018-08-14T07:01:11Z","closed_at":"2018-08-14T07:01:11Z","author_association":"NONE","body":"What have done\r\nI put basic example code right after two.js script tag.\r\n`\r\n\twindow.onload = function() {\r\n\tvar elem = document.getElementById('draw-shapes');\r\n\tvar params = { width: 285, height: 200};\r\n\tvar two = new Two(params).appendTo(elem);\r\n\tvar circle = two.makeCircle(72, 100, 50);\r\n\tvar rect = two.makeRectangle(213, 100, 100, 100);\r\n\r\n\tcircle.fill = '#ff8000';\r\n\tcircle.stroke = 'orangered';\r\n\tcircle.lineWidth = 5;\r\n\r\n\trect.fill = 'rgb(0, 200, 255)';\r\n\trect.opacity = 0.75;\r\n\trect.noStroke();\r\n\r\n\ttwo.update();};\r\n`\r\nAnd this canvas inside body tag:\r\n< canvas id=\"draw-shapes\" width=\"500\" height=\"500\"></ canvas>\r\n\r\nWhat is expected: Canvas filled with circle and rectangle.\r\n\r\nWhat I see: Empty page. Canvas tag filled with SVG, but nothing shown:\r\n`<svg version=\"1.1\" width=\"285\" height=\"200\" style=\"overflow: hidden;\"><defs></defs><g id=\"two_0\" transform=\"matrix(1 0 0 1 0 0)\" opacity=\"1\"><path transform=\"matrix(1 0 0 1 72 100)\" d=\"M 50 0 C 50 12.628 44.285 26.425 35.355 35.355 C 26.425 44.285 12.628 50 0 50 C -12.629 50 -26.426 44.285 -35.356 35.355 C -44.286 26.425 -50 12.628 -50 0 C -50 -12.629 -44.286 -26.426 -35.356 -35.356 C -26.426 -44.286 -12.629 -50 -0.001 -50 C 12.628 -50 26.425 -44.286 35.355 -35.356 C 44.285 -26.426 50 -12.629 50 0 Z \" fill=\"#FF8000\" stroke=\"orangered\" stroke-width=\"5\" stroke-opacity=\"1\" fill-opacity=\"1\" visibility=\"visible\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"4\" id=\"two_1\"></path><path transform=\"matrix(1 0 0 1 213 100)\" d=\"M -50 -50 L 50 -50 L 50 50 L -50 50 Z \" fill=\"rgb(0, 200, 255)\" stroke=\"transparent\" stroke-width=\"1\" stroke-opacity=\"0.75\" fill-opacity=\"0.75\" visibility=\"visible\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"4\" id=\"two_2\"></path></g></svg>`\r\n\r\nTested with \r\nUbuntu 16.04\r\nChrome Version 68.0.3440.84 (Official Build) (64-bit)\r\nFirefox 61.0.1 (64-bit)"},"comment":{"url":"https://api.github.com/repos/jonobr1/two.js/issues/comments/412774517","html_url":"https://github.com/jonobr1/two.js/issues/305#issuecomment-412774517","issue_url":"https://api.github.com/repos/jonobr1/two.js/issues/305","id":412774517,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjc3NDUxNw==","user":{"login":"kinospro","id":14953640,"node_id":"MDQ6VXNlcjE0OTUzNjQw","avatar_url":"https://avatars3.githubusercontent.com/u/14953640?v=4","gravatar_id":"","url":"https://api.github.com/users/kinospro","html_url":"https://github.com/kinospro","followers_url":"https://api.github.com/users/kinospro/followers","following_url":"https://api.github.com/users/kinospro/following{/other_user}","gists_url":"https://api.github.com/users/kinospro/gists{/gist_id}","starred_url":"https://api.github.com/users/kinospro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinospro/subscriptions","organizations_url":"https://api.github.com/users/kinospro/orgs","repos_url":"https://api.github.com/users/kinospro/repos","events_url":"https://api.github.com/users/kinospro/events{/privacy}","received_events_url":"https://api.github.com/users/kinospro/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T07:01:11Z","updated_at":"2018-08-14T07:01:11Z","author_association":"NONE","body":"Thank you, jonobr1. Your version works fine.\r\nDo you think example [here](https://two.js.org/#basic-usage) should be updated to work right away?"}}
{"actor":{"display_login":"kinospro"}}