{"action":"created","issue":{"url":"https://api.github.com/repos/phetsims/scenery/issues/286","labels_url":"https://api.github.com/repos/phetsims/scenery/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/scenery/issues/286/comments","events_url":"https://api.github.com/repos/phetsims/scenery/issues/286/events","html_url":"https://github.com/phetsims/scenery/issues/286","id":44214668,"number":286,"title":"Support SVG as WebGL texture","user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phetsims/scenery/labels/webgl","name":"webgl","color":"000000"}],"state":"open","locked":false,"assignee":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2014-09-28T05:14:28Z","updated_at":"2015-01-12T18:16:39Z","closed_at":null,"body":"Perhaps we can have high resolution scalable vector graphics that render quickly if we can make WebGL textures out of SVG images.  We could render them at the desired resolution, or mipmap them.\r\n\r\nOne idea @jonathanolson suggested: It may be possible to do this by putting the svg content as a base 64 in a div so it can be used as a texture, but we would have to check whether that is supported by IE.  I think there is some discussion of that issue in webkit here, but I am not entirely sure about the context: https://gitorious.org/qtwebkit/qt5x2/commit/e87bae47b4beebc07afb21de8e6d8bee5c1e4ba6\r\n\r\nAnother possibility: using a 3rd party canvas renderer like canvg to render the svg document to a raster, as discussed here: \r\nhttps://github.com/mrdoob/three.js/issues/1317\r\n\r\nOne possible situation to look at with this feature: color vision has nice vector graphics for the character's head, but rendering it as svg decreases performance, so it is currently rasterized and a little blurry.  (Actually we could look into manually rendering the svg with canvg without webgl too)."},"comment":{"url":"https://api.github.com/repos/phetsims/scenery/issues/comments/69616981","html_url":"https://github.com/phetsims/scenery/issues/286#issuecomment-69616981","issue_url":"https://api.github.com/repos/phetsims/scenery/issues/286","id":69616981,"user":{"login":"jonathanolson","id":480878,"avatar_url":"https://avatars.githubusercontent.com/u/480878?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanolson","html_url":"https://github.com/jonathanolson","followers_url":"https://api.github.com/users/jonathanolson/followers","following_url":"https://api.github.com/users/jonathanolson/following{/other_user}","gists_url":"https://api.github.com/users/jonathanolson/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanolson/subscriptions","organizations_url":"https://api.github.com/users/jonathanolson/orgs","repos_url":"https://api.github.com/users/jonathanolson/repos","events_url":"https://api.github.com/users/jonathanolson/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanolson/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T18:16:39Z","updated_at":"2015-01-12T18:16:39Z","body":"Converts SVG like\r\n```\r\n<rect x=\"40\" y=\"50\" ...\r\n```\r\ninto Scenery code like\r\n```\r\nvar rect4 = new scenery.Rectangle( 40, 50, ...\r\n```"}}