{"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/56415569","id":56415569,"diff_hunk":"@@ -2204,23 +2206,53 @@ define([\n         var length = positions.length / 3;\n         for (i = 0; i < length; i += 4) {\n             var i0 = i;\n-            var i1 = i + 1;\n             var i2 = i + 2;\n-            var i3 = i + 3;\n \n             var p0 = Cartesian3.fromArray(positions, i0 * 3, cartesian3Scratch0);\n-            var p1 = Cartesian3.fromArray(positions, i1 * 3, cartesian3Scratch1);\n             var p2 = Cartesian3.fromArray(positions, i2 * 3, cartesian3Scratch2);\n-            var p3 = Cartesian3.fromArray(positions, i3 * 3, cartesian3Scratch3);\n \n-            if (Math.abs(p0.y) < CesiumMath.EPSILON6) {\n-                p0.y = CesiumMath.EPSILON6 * (p2.y < 0.0 ? -1.0 : 1.0);\n-                p1.y = p0.y;\n+            if (Math.abs(p0.y) < coplanarOffset) {\n+                if (p2.y < 0.0) {\n+                    p0.y = -coplanarOffset;\n+\n+                    positions[i * 3 + 1] = p0.y;\n+                    positions[(i + 1) * 3 + 1] = p0.y;\n+\n+                    for (j = i0 * 3; j < i0 * 3 + 4 * 3; ++j) {\n+                        prevPositions[j] = positions[j];","path":"Source/Core/GeometryPipeline.js","position":42,"original_position":42,"commit_id":"69ed01272e22a480c716b8ebe1191d183aea3f99","original_commit_id":"69ed01272e22a480c716b8ebe1191d183aea3f99","user":{"login":"hpinkos","id":3451886,"avatar_url":"https://avatars.githubusercontent.com/u/3451886?v=3","gravatar_id":"","url":"https://api.github.com/users/hpinkos","html_url":"https://github.com/hpinkos","followers_url":"https://api.github.com/users/hpinkos/followers","following_url":"https://api.github.com/users/hpinkos/following{/other_user}","gists_url":"https://api.github.com/users/hpinkos/gists{/gist_id}","starred_url":"https://api.github.com/users/hpinkos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpinkos/subscriptions","organizations_url":"https://api.github.com/users/hpinkos/orgs","repos_url":"https://api.github.com/users/hpinkos/repos","events_url":"https://api.github.com/users/hpinkos/events{/privacy}","received_events_url":"https://api.github.com/users/hpinkos/received_events","type":"User","site_admin":false},"body":"Shouldn't `positions` and `prevPositions` be offset by 3?\r\nAlso, the only values changing are `positions[i * 3 + 1]` and `positions[(i + 1) * 3 + 1]`.  You can just update the corresponding prevPositions instead of doing this in a loop.  \r\n\r\nSame for the else statement below","created_at":"2016-03-16T21:09:53Z","updated_at":"2016-03-16T21:09:53Z","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714#discussion_r56415569","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/56415569"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714#discussion_r56415569"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714","id":63122918,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3714","number":3714,"state":"open","locked":false,"title":"Polyline geometry split at the IDL","user":{"login":"bagnell","id":1494815,"avatar_url":"https://avatars.githubusercontent.com/u/1494815?v=3","gravatar_id":"","url":"https://api.github.com/users/bagnell","html_url":"https://github.com/bagnell","followers_url":"https://api.github.com/users/bagnell/followers","following_url":"https://api.github.com/users/bagnell/following{/other_user}","gists_url":"https://api.github.com/users/bagnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bagnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagnell/subscriptions","organizations_url":"https://api.github.com/users/bagnell/orgs","repos_url":"https://api.github.com/users/bagnell/repos","events_url":"https://api.github.com/users/bagnell/events{/privacy}","received_events_url":"https://api.github.com/users/bagnell/received_events","type":"User","site_admin":false},"body":"For #3621, though the problem is not specific to the branch of that PR.\r\n\r\nThis fixes `PolylineGeometry` that crosses the IDL. Does not address lines added to a `PolylineCollection`. I'll be looking at that separately.\r\n\r\nHere is an example to draw a polyline correctly in this branch and barely visible in master:\r\n```javascript\r\nvar viewer = new Cesium.Viewer('cesiumContainer', { sceneMode : Cesium.SceneMode.SCENE2D });\r\n\r\nviewer.scene.primitives.add(new Cesium.Primitive({\r\n    geometryInstances : new Cesium.GeometryInstance({\r\n        geometry : new Cesium.PolylineGeometry({\r\n            positions : Cesium.Cartesian3.fromDegreesArrayHeights([\r\n                                                                      179.0, 20.0, 0.0,\r\n                                                                      -179.0, 20.0, 0.0\r\n                                                                  ]),\r\n            width : 5.0,\r\n            vertexFormat : Cesium.PolylineColorAppearance.VERTEX_FORMAT\r\n        }),\r\n        attributes: {\r\n            color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.BLUE)\r\n        }\r\n    }),\r\n    appearance : new Cesium.PolylineColorAppearance(),\r\n    asynchronous : false\r\n}));\r\n```","created_at":"2016-03-16T19:34:45Z","updated_at":"2016-03-16T21:09:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cecd7a650ef526e00b1b5bd76d11d2ede2d81ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3714/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/69ed01272e22a480c716b8ebe1191d183aea3f99","head":{"label":"AnalyticalGraphicsInc:polyline-geometry-idl","ref":"polyline-geometry-idl","sha":"69ed01272e22a480c716b8ebe1191d183aea3f99","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":3606738,"name":"cesium","full_name":"AnalyticalGraphicsInc/cesium","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium","description":"WebGL virtual globe and map engine","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/releases{/id}","deployments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/deployments","created_at":"2012-03-02T22:27:14Z","updated_at":"2016-03-15T14:08:30Z","pushed_at":"2016-03-16T19:38:56Z","git_url":"git://github.com/AnalyticalGraphicsInc/cesium.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/cesium.git","clone_url":"https://github.com/AnalyticalGraphicsInc/cesium.git","svn_url":"https://github.com/AnalyticalGraphicsInc/cesium","homepage":"cesiumjs.org","size":258906,"stargazers_count":1180,"watchers_count":1180,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":696,"mirror_url":null,"open_issues_count":368,"forks":696,"open_issues":368,"watchers":1180,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:master","ref":"master","sha":"03191f3c7558d8ab6b3fe6fb002261501a2d9eb6","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":3606738,"name":"cesium","full_name":"AnalyticalGraphicsInc/cesium","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium","description":"WebGL virtual globe and map engine","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/releases{/id}","deployments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/deployments","created_at":"2012-03-02T22:27:14Z","updated_at":"2016-03-15T14:08:30Z","pushed_at":"2016-03-16T19:38:56Z","git_url":"git://github.com/AnalyticalGraphicsInc/cesium.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/cesium.git","clone_url":"https://github.com/AnalyticalGraphicsInc/cesium.git","svn_url":"https://github.com/AnalyticalGraphicsInc/cesium","homepage":"cesiumjs.org","size":258906,"stargazers_count":1180,"watchers_count":1180,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":696,"mirror_url":null,"open_issues_count":368,"forks":696,"open_issues":368,"watchers":1180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3714"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3714"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3714/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3714/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/69ed01272e22a480c716b8ebe1191d183aea3f99"}}}}