{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/682","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/682/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/682/events","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/682","id":39922756,"number":682,"title":"tesselate polygons instead of rendering with stencil buffer","user":{"login":"ansis","id":1421652,"avatar_url":"https://avatars.githubusercontent.com/u/1421652?v=3","gravatar_id":"","url":"https://api.github.com/users/ansis","html_url":"https://github.com/ansis","followers_url":"https://api.github.com/users/ansis/followers","following_url":"https://api.github.com/users/ansis/following{/other_user}","gists_url":"https://api.github.com/users/ansis/gists{/gist_id}","starred_url":"https://api.github.com/users/ansis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansis/subscriptions","organizations_url":"https://api.github.com/users/ansis/orgs","repos_url":"https://api.github.com/users/ansis/repos","events_url":"https://api.github.com/users/ansis/events{/privacy}","received_events_url":"https://api.github.com/users/ansis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels/rendering","name":"rendering","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"ansis","id":1421652,"avatar_url":"https://avatars.githubusercontent.com/u/1421652?v=3","gravatar_id":"","url":"https://api.github.com/users/ansis","html_url":"https://github.com/ansis","followers_url":"https://api.github.com/users/ansis/followers","following_url":"https://api.github.com/users/ansis/following{/other_user}","gists_url":"https://api.github.com/users/ansis/gists{/gist_id}","starred_url":"https://api.github.com/users/ansis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansis/subscriptions","organizations_url":"https://api.github.com/users/ansis/orgs","repos_url":"https://api.github.com/users/ansis/repos","events_url":"https://api.github.com/users/ansis/events{/privacy}","received_events_url":"https://api.github.com/users/ansis/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones/5","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones/5/labels","id":682066,"number":5,"title":"future","description":"","creator":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"open_issues":52,"closed_issues":52,"state":"open","created_at":"2014-06-05T11:12:03Z","updated_at":"2015-01-15T18:43:41Z","due_on":null,"closed_at":null},"comments":77,"created_at":"2014-08-11T01:48:18Z","updated_at":"2015-01-21T16:35:01Z","closed_at":null,"body":"We should draw polygons by tesselating them instead of using the stencil buffer trick. Native already does this. https://github.com/mapbox/mapbox-gl-js/commit/7b353122b46503b57e6d5073184883c1c2e21404 is a first attempt that uses libtess.js. Rendering is faster but the tesselation is slow. The buildings layer can take up to 500ms to tesselate.\r\n\r\n- take a look at poly2tri.js (which only accepts simple polygons)\r\n- revisit tesselating polygons in the tiles"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments/70870546","html_url":"https://github.com/mapbox/mapbox-gl-js/issues/682#issuecomment-70870546","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/682","id":70870546,"user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T16:35:01Z","updated_at":"2015-01-21T16:35:01Z","body":"Released earcut 1.1.0 today with faster hole handling and more robustness. The library turned out to be pretty awesome. While there's still room for improvement on polygons with lots of points, it's good enough for now.\r\n\r\nFor a [typical dense map view of DC](http://localhost:3000/debug/#13.48/38.9019/-77.0568) mentioned above, triangulation of 6 tiles takes ~50ms. For a [lower zoom view](http://localhost:3000/debug/#8.98/38.9257/-75.5856) with lots of water, 4 tiles take ~390ms, with half of that spent on classifying rings. Once this need is gone, we're ready to merge."}}