{"action":"created","comment":{"url":"https://api.github.com/repos/pboyer/flood/pulls/comments/24190311","id":24190311,"diff_hunk":"@@ -374,125 +375,6 @@ define(['backbone', 'FLOOD', 'staticHelpers'], function (Backbone, FLOOD, static\n       if (this.workspace)\n         this.workspace.run();\n \n-    },\n-\n-    updateNodeGeometry: function(param) {\n-        var graphicData = param.geometryData.graphicPrimitivesData;\n-\n-        graphicData.pointVertices = staticHelpers.getFloatArray(graphicData.pointVertices);\n-        graphicData.lineStripVertices = staticHelpers.getFloatArray(graphicData.lineStripVertices);\n-        graphicData.lineStripCounts = staticHelpers.getIntArray(graphicData.lineStripCounts);\n-        graphicData.triangleVertices = staticHelpers.getFloatArray(graphicData.triangleVertices);\n-        graphicData.triangleNormals = staticHelpers.getFloatArray(graphicData.triangleNormals);\n-\n-        var geometries = []; // prettyLastValue\n-        graphicData.numberOfCoordinates = 3;\n-\n-        this.addPoints(graphicData, geometries);\n-        this.addTriangles(graphicData, geometries);\n-        this.addCurves(graphicData, geometries);\n-\n-        this.set('prettyLastValue', geometries);\n-        },\n-\n-        clearGeometry: function() {\n-            this.set('prettyLastValue', {});\n-    },\n-\n-    addPoints: function (graphicData, geometries) {\n-        var length, pos;\n-        // if we have single points\n-        if (graphicData.pointVertices && graphicData.pointVertices.length) {\n-            length = graphicData.pointVertices.length / graphicData.numberOfCoordinates\n-            var points = {vertices: []}, onePoint;\n-            for(var i = 0; i < length; i++){\n-                // add [x, y, z]\n-                pos = i * graphicData.numberOfCoordinates;\n-                onePoint = [\n-                  graphicData.pointVertices[pos], \n-                  graphicData.pointVertices[pos + 1],\n-                  graphicData.pointVertices[pos + 2]\n-                ];\n-                points.vertices.push(onePoint);\n-            }\n-\n-            geometries.push(points);\n-        }\n-    },\n-\n-    addCurves: function (graphicData, geometries) {\n-        // if we have line strips\n-        if (graphicData.lineStripVertices && graphicData.lineStripVertices.length\n-            && graphicData.lineStripCounts && graphicData.lineStripCounts.length) {\n-            var curve, count, oneVertex, size, index = 0, pos = 0;\n-\n-            for (var k = 0; k < graphicData.lineStripCounts.length; k++) {\n-                curve = { linestrip: []};\n-                count = graphicData.lineStripCounts[k];\n-\n-                if(!count) {\n-                    continue;\n-                }\n-\n-                size = index + count;\n-\n-                for(var i = index; i < size; i++) {\n-                    pos = i * graphicData.numberOfCoordinates;\n-                    oneVertex = [\n-                      graphicData.lineStripVertices[pos],\n-                      graphicData.lineStripVertices[pos + 1],\n-                      graphicData.lineStripVertices[pos + 2]\n-                    ];\n-                    curve.linestrip.push(oneVertex);\n-                }\n-\n-                index += count;\n-                geometries.push(curve);\n-            }\n-        }\n-    },\n-\n-    addTriangles: function (graphicData, geometries) {\n-        // if we have triangles\n-        if (graphicData.triangleVertices && graphicData.triangleVertices.length\n-            && graphicData.triangleNormals && graphicData.triangleNormals.length) {\n-            var triangles = {vertices: [], faces:[]};\n-            var index = 0, oneVertex, vertexCount = 3, length, pos;\n-\n-            length = graphicData.triangleVertices.length / vertexCount * 3;\n-\n-            for(var i = 0; i <= length; i++) {\n-                for (var j = 0; j < vertexCount; j++) {\n-                    // Add vertex - [x, y, z]\n-                    pos = i * 9 + j * 3;\n-                    oneVertex = [\n-                      graphicData.triangleVertices[pos],\n-                      graphicData.triangleVertices[pos + 1],\n-                      graphicData.triangleVertices[pos + 2]\n-                    ];\n-                    triangles.vertices.push(oneVertex);\n-                }\n-\n-                pos = i * 9;\n-                // add [indexA, indexB, indexC, normal_vector: [x1, y1, z1, x2, y2, z2, x3, y3, z3]]\n-                triangles.faces.push([index++, index++, index++, [\n-                    // x1, y1, z1\n-                    graphicData.triangleNormals[pos],\n-                    graphicData.triangleNormals[pos + 1],\n-                    graphicData.triangleNormals[pos + 2],\n-                    // x2, y2, z2\n-                    graphicData.triangleNormals[pos + 3],\n-                    graphicData.triangleNormals[pos + 4],\n-                    graphicData.triangleNormals[pos + 5],\n-                    // x3, y3, z3\n-                    graphicData.triangleNormals[pos + 6],\n-                    graphicData.triangleNormals[pos + 7],\n-                    graphicData.triangleNormals[pos + 8]]\n-                ]);\n-            }\n-\n-            geometries.push(triangles);\n-        }","path":"app/scripts/models/nodes/Node.js","position":138,"original_position":138,"commit_id":"976823c8299f67299414f8bc458add363f71fa2a","original_commit_id":"976823c8299f67299414f8bc458add363f71fa2a","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"body":"Yay!","created_at":"2015-02-05T19:19:13Z","updated_at":"2015-02-05T19:19:13Z","html_url":"https://github.com/pboyer/flood/pull/132#discussion_r24190311","pull_request_url":"https://api.github.com/repos/pboyer/flood/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/pboyer/flood/pulls/comments/24190311"},"html":{"href":"https://github.com/pboyer/flood/pull/132#discussion_r24190311"},"pull_request":{"href":"https://api.github.com/repos/pboyer/flood/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/pboyer/flood/pulls/132","id":28637601,"html_url":"https://github.com/pboyer/flood/pull/132","diff_url":"https://github.com/pboyer/flood/pull/132.diff","patch_url":"https://github.com/pboyer/flood/pull/132.patch","issue_url":"https://api.github.com/repos/pboyer/flood/issues/132","number":132,"state":"open","locked":false,"title":"REACH-188 Viewer","user":{"login":"pbidenko","id":2545968,"avatar_url":"https://avatars.githubusercontent.com/u/2545968?v=3","gravatar_id":"","url":"https://api.github.com/users/pbidenko","html_url":"https://github.com/pbidenko","followers_url":"https://api.github.com/users/pbidenko/followers","following_url":"https://api.github.com/users/pbidenko/following{/other_user}","gists_url":"https://api.github.com/users/pbidenko/gists{/gist_id}","starred_url":"https://api.github.com/users/pbidenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbidenko/subscriptions","organizations_url":"https://api.github.com/users/pbidenko/orgs","repos_url":"https://api.github.com/users/pbidenko/repos","events_url":"https://api.github.com/users/pbidenko/events{/privacy}","received_events_url":"https://api.github.com/users/pbidenko/received_events","type":"User","site_admin":false},"body":"Hi @pboyer,\r\n\r\nThis pull request contains changes for moving all geometry related stuff to the ThreeViewer. The ThreeViewer is now able to handle all geometry processes including hiding/showing geometry, changing color on selection, switching between workspaces, etc. The ThreeViewer now belongs to the AppView/CustomizerAppView. Also I removed global scene object. Viewport is referenced only in ThreeViewer. All geometry is stored in typed arrays and is rendered as BufferGeometry. Also nodes do not know anything about geometry.\r\nI apologize for making this pull request a little bit huge, but there wasn't any way to make it smaller, because all changes depend on each other. I'll do my best to describe all changes in details.","created_at":"2015-02-04T13:21:37Z","updated_at":"2015-02-05T19:19:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"322fb2effd606183a11e026b8d85ab4d2ddce68c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pboyer/flood/pulls/132/commits","review_comments_url":"https://api.github.com/repos/pboyer/flood/pulls/132/comments","review_comment_url":"https://api.github.com/repos/pboyer/flood/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pboyer/flood/issues/132/comments","statuses_url":"https://api.github.com/repos/pboyer/flood/statuses/976823c8299f67299414f8bc458add363f71fa2a","head":{"label":"pbidenko:REACH-188","ref":"REACH-188","sha":"976823c8299f67299414f8bc458add363f71fa2a","user":{"login":"pbidenko","id":2545968,"avatar_url":"https://avatars.githubusercontent.com/u/2545968?v=3","gravatar_id":"","url":"https://api.github.com/users/pbidenko","html_url":"https://github.com/pbidenko","followers_url":"https://api.github.com/users/pbidenko/followers","following_url":"https://api.github.com/users/pbidenko/following{/other_user}","gists_url":"https://api.github.com/users/pbidenko/gists{/gist_id}","starred_url":"https://api.github.com/users/pbidenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbidenko/subscriptions","organizations_url":"https://api.github.com/users/pbidenko/orgs","repos_url":"https://api.github.com/users/pbidenko/repos","events_url":"https://api.github.com/users/pbidenko/events{/privacy}","received_events_url":"https://api.github.com/users/pbidenko/received_events","type":"User","site_admin":false},"repo":{"id":21495246,"name":"flood","full_name":"pbidenko/flood","owner":{"login":"pbidenko","id":2545968,"avatar_url":"https://avatars.githubusercontent.com/u/2545968?v=3","gravatar_id":"","url":"https://api.github.com/users/pbidenko","html_url":"https://github.com/pbidenko","followers_url":"https://api.github.com/users/pbidenko/followers","following_url":"https://api.github.com/users/pbidenko/following{/other_user}","gists_url":"https://api.github.com/users/pbidenko/gists{/gist_id}","starred_url":"https://api.github.com/users/pbidenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbidenko/subscriptions","organizations_url":"https://api.github.com/users/pbidenko/orgs","repos_url":"https://api.github.com/users/pbidenko/repos","events_url":"https://api.github.com/users/pbidenko/events{/privacy}","received_events_url":"https://api.github.com/users/pbidenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbidenko/flood","description":"A visual programming environment for the browser","fork":true,"url":"https://api.github.com/repos/pbidenko/flood","forks_url":"https://api.github.com/repos/pbidenko/flood/forks","keys_url":"https://api.github.com/repos/pbidenko/flood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbidenko/flood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbidenko/flood/teams","hooks_url":"https://api.github.com/repos/pbidenko/flood/hooks","issue_events_url":"https://api.github.com/repos/pbidenko/flood/issues/events{/number}","events_url":"https://api.github.com/repos/pbidenko/flood/events","assignees_url":"https://api.github.com/repos/pbidenko/flood/assignees{/user}","branches_url":"https://api.github.com/repos/pbidenko/flood/branches{/branch}","tags_url":"https://api.github.com/repos/pbidenko/flood/tags","blobs_url":"https://api.github.com/repos/pbidenko/flood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbidenko/flood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbidenko/flood/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbidenko/flood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbidenko/flood/statuses/{sha}","languages_url":"https://api.github.com/repos/pbidenko/flood/languages","stargazers_url":"https://api.github.com/repos/pbidenko/flood/stargazers","contributors_url":"https://api.github.com/repos/pbidenko/flood/contributors","subscribers_url":"https://api.github.com/repos/pbidenko/flood/subscribers","subscription_url":"https://api.github.com/repos/pbidenko/flood/subscription","commits_url":"https://api.github.com/repos/pbidenko/flood/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbidenko/flood/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbidenko/flood/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbidenko/flood/issues/comments/{number}","contents_url":"https://api.github.com/repos/pbidenko/flood/contents/{+path}","compare_url":"https://api.github.com/repos/pbidenko/flood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbidenko/flood/merges","archive_url":"https://api.github.com/repos/pbidenko/flood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbidenko/flood/downloads","issues_url":"https://api.github.com/repos/pbidenko/flood/issues{/number}","pulls_url":"https://api.github.com/repos/pbidenko/flood/pulls{/number}","milestones_url":"https://api.github.com/repos/pbidenko/flood/milestones{/number}","notifications_url":"https://api.github.com/repos/pbidenko/flood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbidenko/flood/labels{/name}","releases_url":"https://api.github.com/repos/pbidenko/flood/releases{/id}","created_at":"2014-07-04T11:29:46Z","updated_at":"2014-07-04T14:53:01Z","pushed_at":"2015-02-05T13:20:26Z","git_url":"git://github.com/pbidenko/flood.git","ssh_url":"git@github.com:pbidenko/flood.git","clone_url":"https://github.com/pbidenko/flood.git","svn_url":"https://github.com/pbidenko/flood","homepage":"","size":47001,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pboyer:Reach","ref":"Reach","sha":"3e8615b3f72f93dc9bd76adb3476a64b8a5e3020","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"repo":{"id":10161776,"name":"flood","full_name":"pboyer/flood","owner":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pboyer/flood","description":"A visual programming environment for the browser","fork":false,"url":"https://api.github.com/repos/pboyer/flood","forks_url":"https://api.github.com/repos/pboyer/flood/forks","keys_url":"https://api.github.com/repos/pboyer/flood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pboyer/flood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pboyer/flood/teams","hooks_url":"https://api.github.com/repos/pboyer/flood/hooks","issue_events_url":"https://api.github.com/repos/pboyer/flood/issues/events{/number}","events_url":"https://api.github.com/repos/pboyer/flood/events","assignees_url":"https://api.github.com/repos/pboyer/flood/assignees{/user}","branches_url":"https://api.github.com/repos/pboyer/flood/branches{/branch}","tags_url":"https://api.github.com/repos/pboyer/flood/tags","blobs_url":"https://api.github.com/repos/pboyer/flood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pboyer/flood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pboyer/flood/git/refs{/sha}","trees_url":"https://api.github.com/repos/pboyer/flood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pboyer/flood/statuses/{sha}","languages_url":"https://api.github.com/repos/pboyer/flood/languages","stargazers_url":"https://api.github.com/repos/pboyer/flood/stargazers","contributors_url":"https://api.github.com/repos/pboyer/flood/contributors","subscribers_url":"https://api.github.com/repos/pboyer/flood/subscribers","subscription_url":"https://api.github.com/repos/pboyer/flood/subscription","commits_url":"https://api.github.com/repos/pboyer/flood/commits{/sha}","git_commits_url":"https://api.github.com/repos/pboyer/flood/git/commits{/sha}","comments_url":"https://api.github.com/repos/pboyer/flood/comments{/number}","issue_comment_url":"https://api.github.com/repos/pboyer/flood/issues/comments/{number}","contents_url":"https://api.github.com/repos/pboyer/flood/contents/{+path}","compare_url":"https://api.github.com/repos/pboyer/flood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pboyer/flood/merges","archive_url":"https://api.github.com/repos/pboyer/flood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pboyer/flood/downloads","issues_url":"https://api.github.com/repos/pboyer/flood/issues{/number}","pulls_url":"https://api.github.com/repos/pboyer/flood/pulls{/number}","milestones_url":"https://api.github.com/repos/pboyer/flood/milestones{/number}","notifications_url":"https://api.github.com/repos/pboyer/flood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pboyer/flood/labels{/name}","releases_url":"https://api.github.com/repos/pboyer/flood/releases{/id}","created_at":"2013-05-19T21:45:23Z","updated_at":"2015-02-03T22:14:09Z","pushed_at":"2015-02-05T19:00:27Z","git_url":"git://github.com/pboyer/flood.git","ssh_url":"git@github.com:pboyer/flood.git","clone_url":"https://github.com/pboyer/flood.git","svn_url":"https://github.com/pboyer/flood","homepage":"http://www.floodeditor.com","size":48367,"stargazers_count":120,"watchers_count":120,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":6,"forks":12,"open_issues":6,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pboyer/flood/pulls/132"},"html":{"href":"https://github.com/pboyer/flood/pull/132"},"issue":{"href":"https://api.github.com/repos/pboyer/flood/issues/132"},"comments":{"href":"https://api.github.com/repos/pboyer/flood/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/pboyer/flood/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/pboyer/flood/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pboyer/flood/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/pboyer/flood/statuses/976823c8299f67299414f8bc458add363f71fa2a"}}}}