{"action":"created","comment":{"url":"https://api.github.com/repos/iTowns/itowns/pulls/comments/206100938","pull_request_review_id":141494354,"id":206100938,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjEwMDkzOA==","diff_hunk":"@@ -456,118 +207,65 @@ function GlobeControls(view, target, radius, options = {}) {\n     // Enable Damping\n     this.enableDamping = true;\n \n-    if (enableTargetHelper) {\n-        this.pickingHelper = new THREE.AxesHelper(500000);\n-    }\n-\n-    // Radius tangent sphere\n-    tSphere.setRadius(radius);\n-    spherical.radius = tSphere.radius;\n-\n-    sizeRendering.copy(view.mainLoop.gfxEngine.getWindowSize());\n-    sizeRendering.FOV = this.camera.fov;\n-    // Note A\n-    // TODO: test before remove test code\n-    // so camera.up is the orbit axis\n-    // var quat = new THREE.Quaternion().setFromUnitVectors(camera.up, new THREE.Vector3(0, 1, 0));\n-    // var quatInverse = quat.clone().inverse();\n-\n     this.startEvent = {\n         type: 'start',\n     };\n     this.endEvent = {\n         type: 'end',\n     };\n \n-    this.updateCamera = function updateCamera() {\n-        snapShotCamera.init(this.camera);\n-        sizeRendering.width = this.domElement.clientWidth;\n-        sizeRendering.height = this.domElement.clientHeight;\n-        sizeRendering.FOV = this.camera.fov;\n-    };\n-\n-    this._view.addFrameRequester(MAIN_LOOP_EVENTS.AFTER_CAMERA_UPDATE, () => {\n-        const dim = this._view.mainLoop.gfxEngine.getWindowSize();\n-        const sizeDiff = (dim.width != sizeRendering.width || dim.height != sizeRendering.height);\n-        if (sizeDiff) {\n-            this.updateCamera();\n-        }\n-    });\n-\n-    this.getAutoRotationAngle = function getAutoRotationAngle() {\n-        return 2 * Math.PI / 60 / 60 * this.autoRotateSpeed;\n-    };\n-\n     this.getDollyScale = function getDollyScale() {\n         return Math.pow(0.95, this.zoomSpeed);\n     };\n \n-    this.rotateLeft = function rotateLeft(angle) {\n-        if (angle === undefined) {\n-            angle = this.getAutoRotationAngle();\n-        }\n+    this.rotateLeft = function rotateLeft(angle = 0) {\n         sphericalDelta.theta -= angle;\n     };\n \n-    this.rotateUp = function rotateUp(angle) {\n-        if (angle === undefined) {\n-            angle = this.getAutoRotationAngle();\n-        }\n-\n+    this.rotateUp = function rotateUp(angle = 0) {\n         sphericalDelta.phi -= angle;\n     };\n \n     // pass in distance in world space to move left\n     this.panLeft = function panLeft(distance) {\n-        var te = this.camera.matrix.elements;\n-\n+        const te = this.camera.matrix.elements;\n         // get X column of matrix\n-        panOffset.set(te[0], te[1], te[2]);\n+        panOffset.fromArray(te);\n         panOffset.multiplyScalar(-distance);\n-\n         panVector.add(panOffset);\n     };\n \n     // pass in distance in world space to move up\n     this.panUp = function panUp(distance) {\n-        var te = this.camera.matrix.elements;\n-\n+        const te = this.camera.matrix.elements;\n         // get Y column of matrix\n-        panOffset.set(te[4], te[5], te[6]);\n+        panOffset.fromArray(te, 4);\n         panOffset.multiplyScalar(distance);\n-\n         panVector.add(panOffset);\n     };\n \n+    const states = new StateControl();\n+    state = states.NONE;\n+    this.states = states;\n+\n     // pass in x,y of change desired in pixel space,\n     // right and down are positive\n     this.mouseToPan = function mouseToPan(deltaX, deltaY) {\n-        var element = this.domElement === document ? this.domElement.body : this.domElement;\n-\n+        const gfx = view.mainLoop.gfxEngine;","path":"src/Renderer/ThreeExtended/GlobeControls.js","position":501,"original_position":501,"commit_id":"dfb5206fd07dc8e4084422444493247a65de4c8f","original_commit_id":"dfb5206fd07dc8e4084422444493247a65de4c8f","user":{"login":"gchoqueux","id":11291849,"node_id":"MDQ6VXNlcjExMjkxODQ5","avatar_url":"https://avatars3.githubusercontent.com/u/11291849?v=4","gravatar_id":"","url":"https://api.github.com/users/gchoqueux","html_url":"https://github.com/gchoqueux","followers_url":"https://api.github.com/users/gchoqueux/followers","following_url":"https://api.github.com/users/gchoqueux/following{/other_user}","gists_url":"https://api.github.com/users/gchoqueux/gists{/gist_id}","starred_url":"https://api.github.com/users/gchoqueux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gchoqueux/subscriptions","organizations_url":"https://api.github.com/users/gchoqueux/orgs","repos_url":"https://api.github.com/users/gchoqueux/repos","events_url":"https://api.github.com/users/gchoqueux/events{/privacy}","received_events_url":"https://api.github.com/users/gchoqueux/received_events","type":"User","site_admin":false},"body":"yes I would see that in another PR","created_at":"2018-07-30T11:37:41Z","updated_at":"2018-07-30T11:37:41Z","html_url":"https://github.com/iTowns/itowns/pull/795#discussion_r206100938","pull_request_url":"https://api.github.com/repos/iTowns/itowns/pulls/795","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/comments/206100938"},"html":{"href":"https://github.com/iTowns/itowns/pull/795#discussion_r206100938"},"pull_request":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/795"}},"in_reply_to_id":205680885},"pull_request":{"url":"https://api.github.com/repos/iTowns/itowns/pulls/795","id":198038936,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MDM4OTM2","html_url":"https://github.com/iTowns/itowns/pull/795","diff_url":"https://github.com/iTowns/itowns/pull/795.diff","patch_url":"https://github.com/iTowns/itowns/pull/795.patch","issue_url":"https://api.github.com/repos/iTowns/itowns/issues/795","number":795,"state":"open","locked":false,"title":"Utilities to place a camera with geographic settings","user":{"login":"gchoqueux","id":11291849,"node_id":"MDQ6VXNlcjExMjkxODQ5","avatar_url":"https://avatars3.githubusercontent.com/u/11291849?v=4","gravatar_id":"","url":"https://api.github.com/users/gchoqueux","html_url":"https://github.com/gchoqueux","followers_url":"https://api.github.com/users/gchoqueux/followers","following_url":"https://api.github.com/users/gchoqueux/following{/other_user}","gists_url":"https://api.github.com/users/gchoqueux/gists{/gist_id}","starred_url":"https://api.github.com/users/gchoqueux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gchoqueux/subscriptions","organizations_url":"https://api.github.com/users/gchoqueux/orgs","repos_url":"https://api.github.com/users/gchoqueux/repos","events_url":"https://api.github.com/users/gchoqueux/events{/privacy}","received_events_url":"https://api.github.com/users/gchoqueux/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nUtilities to place a camera with geographic settings.\r\nThis utility works in globe and planar, and doesn't yet integrate the panoramic or immersive mode.\r\nall settings are all optional \r\n```js\r\nsettings = {\r\n   coord,  // target coordinate to camera's lookAt\r\n   range, // distance between target coordinate and camera\r\n   heading, // camera's heading\r\n   pitch, // camera's pitch\r\n}\r\n```\r\n\r\n## Motivation and Context\r\nit is a tool with a geomatic approach the visualization of geographical data.\r\nSimplify enormously `globeControls` (it's a first step in its refacto), the method is more robust and removes a lot of bugs in `globeControls`\r\n","created_at":"2018-06-28T13:56:48Z","updated_at":"2018-07-30T11:37:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"674cedcaa15d48219ae7d865d3be626e06cd1f10","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":386017226,"node_id":"MDU6TGFiZWwzODYwMTcyMjY=","url":"https://api.github.com/repos/iTowns/itowns/labels/Feature","name":"Feature","color":"fbca04","default":false},{"id":284711787,"node_id":"MDU6TGFiZWwyODQ3MTE3ODc=","url":"https://api.github.com/repos/iTowns/itowns/labels/ready","name":"ready","color":"52c63d","default":false},{"id":1004587935,"node_id":"MDU6TGFiZWwxMDA0NTg3OTM1","url":"https://api.github.com/repos/iTowns/itowns/labels/validated","name":"validated","color":"c5def5","default":false}],"milestone":{"url":"https://api.github.com/repos/iTowns/itowns/milestones/3","html_url":"https://github.com/iTowns/itowns/milestone/3","labels_url":"https://api.github.com/repos/iTowns/itowns/milestones/3/labels","id":3300762,"node_id":"MDk6TWlsZXN0b25lMzMwMDc2Mg==","number":3,"title":"2.4","description":null,"creator":{"login":"gchoqueux","id":11291849,"node_id":"MDQ6VXNlcjExMjkxODQ5","avatar_url":"https://avatars3.githubusercontent.com/u/11291849?v=4","gravatar_id":"","url":"https://api.github.com/users/gchoqueux","html_url":"https://github.com/gchoqueux","followers_url":"https://api.github.com/users/gchoqueux/followers","following_url":"https://api.github.com/users/gchoqueux/following{/other_user}","gists_url":"https://api.github.com/users/gchoqueux/gists{/gist_id}","starred_url":"https://api.github.com/users/gchoqueux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gchoqueux/subscriptions","organizations_url":"https://api.github.com/users/gchoqueux/orgs","repos_url":"https://api.github.com/users/gchoqueux/repos","events_url":"https://api.github.com/users/gchoqueux/events{/privacy}","received_events_url":"https://api.github.com/users/gchoqueux/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-04-26T09:47:55Z","updated_at":"2018-06-28T13:57:19Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/iTowns/itowns/pulls/795/commits","review_comments_url":"https://api.github.com/repos/iTowns/itowns/pulls/795/comments","review_comment_url":"https://api.github.com/repos/iTowns/itowns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iTowns/itowns/issues/795/comments","statuses_url":"https://api.github.com/repos/iTowns/itowns/statuses/dfb5206fd07dc8e4084422444493247a65de4c8f","head":{"label":"iTowns:controls","ref":"controls","sha":"dfb5206fd07dc8e4084422444493247a65de4c8f","user":{"login":"iTowns","id":14266889,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjY2ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"repo":{"id":43068275,"node_id":"MDEwOlJlcG9zaXRvcnk0MzA2ODI3NQ==","name":"itowns","full_name":"iTowns/itowns","owner":{"login":"iTowns","id":14266889,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjY2ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iTowns/itowns","description":"A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data","fork":false,"url":"https://api.github.com/repos/iTowns/itowns","forks_url":"https://api.github.com/repos/iTowns/itowns/forks","keys_url":"https://api.github.com/repos/iTowns/itowns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iTowns/itowns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iTowns/itowns/teams","hooks_url":"https://api.github.com/repos/iTowns/itowns/hooks","issue_events_url":"https://api.github.com/repos/iTowns/itowns/issues/events{/number}","events_url":"https://api.github.com/repos/iTowns/itowns/events","assignees_url":"https://api.github.com/repos/iTowns/itowns/assignees{/user}","branches_url":"https://api.github.com/repos/iTowns/itowns/branches{/branch}","tags_url":"https://api.github.com/repos/iTowns/itowns/tags","blobs_url":"https://api.github.com/repos/iTowns/itowns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iTowns/itowns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iTowns/itowns/git/refs{/sha}","trees_url":"https://api.github.com/repos/iTowns/itowns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iTowns/itowns/statuses/{sha}","languages_url":"https://api.github.com/repos/iTowns/itowns/languages","stargazers_url":"https://api.github.com/repos/iTowns/itowns/stargazers","contributors_url":"https://api.github.com/repos/iTowns/itowns/contributors","subscribers_url":"https://api.github.com/repos/iTowns/itowns/subscribers","subscription_url":"https://api.github.com/repos/iTowns/itowns/subscription","commits_url":"https://api.github.com/repos/iTowns/itowns/commits{/sha}","git_commits_url":"https://api.github.com/repos/iTowns/itowns/git/commits{/sha}","comments_url":"https://api.github.com/repos/iTowns/itowns/comments{/number}","issue_comment_url":"https://api.github.com/repos/iTowns/itowns/issues/comments{/number}","contents_url":"https://api.github.com/repos/iTowns/itowns/contents/{+path}","compare_url":"https://api.github.com/repos/iTowns/itowns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iTowns/itowns/merges","archive_url":"https://api.github.com/repos/iTowns/itowns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iTowns/itowns/downloads","issues_url":"https://api.github.com/repos/iTowns/itowns/issues{/number}","pulls_url":"https://api.github.com/repos/iTowns/itowns/pulls{/number}","milestones_url":"https://api.github.com/repos/iTowns/itowns/milestones{/number}","notifications_url":"https://api.github.com/repos/iTowns/itowns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iTowns/itowns/labels{/name}","releases_url":"https://api.github.com/repos/iTowns/itowns/releases{/id}","deployments_url":"https://api.github.com/repos/iTowns/itowns/deployments","created_at":"2015-09-24T13:24:26Z","updated_at":"2018-07-25T15:04:57Z","pushed_at":"2018-07-27T16:06:47Z","git_url":"git://github.com/iTowns/itowns.git","ssh_url":"git@github.com:iTowns/itowns.git","clone_url":"https://github.com/iTowns/itowns.git","svn_url":"https://github.com/iTowns/itowns","homepage":"http://www.itowns-project.org","size":7409,"stargazers_count":130,"watchers_count":130,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":70,"open_issues":100,"watchers":130,"default_branch":"master"}},"base":{"label":"iTowns:master","ref":"master","sha":"152ac732071e6ad1fcc270fe7ad3fb4a7842102c","user":{"login":"iTowns","id":14266889,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjY2ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"repo":{"id":43068275,"node_id":"MDEwOlJlcG9zaXRvcnk0MzA2ODI3NQ==","name":"itowns","full_name":"iTowns/itowns","owner":{"login":"iTowns","id":14266889,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjY2ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iTowns/itowns","description":"A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data","fork":false,"url":"https://api.github.com/repos/iTowns/itowns","forks_url":"https://api.github.com/repos/iTowns/itowns/forks","keys_url":"https://api.github.com/repos/iTowns/itowns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iTowns/itowns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iTowns/itowns/teams","hooks_url":"https://api.github.com/repos/iTowns/itowns/hooks","issue_events_url":"https://api.github.com/repos/iTowns/itowns/issues/events{/number}","events_url":"https://api.github.com/repos/iTowns/itowns/events","assignees_url":"https://api.github.com/repos/iTowns/itowns/assignees{/user}","branches_url":"https://api.github.com/repos/iTowns/itowns/branches{/branch}","tags_url":"https://api.github.com/repos/iTowns/itowns/tags","blobs_url":"https://api.github.com/repos/iTowns/itowns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iTowns/itowns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iTowns/itowns/git/refs{/sha}","trees_url":"https://api.github.com/repos/iTowns/itowns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iTowns/itowns/statuses/{sha}","languages_url":"https://api.github.com/repos/iTowns/itowns/languages","stargazers_url":"https://api.github.com/repos/iTowns/itowns/stargazers","contributors_url":"https://api.github.com/repos/iTowns/itowns/contributors","subscribers_url":"https://api.github.com/repos/iTowns/itowns/subscribers","subscription_url":"https://api.github.com/repos/iTowns/itowns/subscription","commits_url":"https://api.github.com/repos/iTowns/itowns/commits{/sha}","git_commits_url":"https://api.github.com/repos/iTowns/itowns/git/commits{/sha}","comments_url":"https://api.github.com/repos/iTowns/itowns/comments{/number}","issue_comment_url":"https://api.github.com/repos/iTowns/itowns/issues/comments{/number}","contents_url":"https://api.github.com/repos/iTowns/itowns/contents/{+path}","compare_url":"https://api.github.com/repos/iTowns/itowns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iTowns/itowns/merges","archive_url":"https://api.github.com/repos/iTowns/itowns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iTowns/itowns/downloads","issues_url":"https://api.github.com/repos/iTowns/itowns/issues{/number}","pulls_url":"https://api.github.com/repos/iTowns/itowns/pulls{/number}","milestones_url":"https://api.github.com/repos/iTowns/itowns/milestones{/number}","notifications_url":"https://api.github.com/repos/iTowns/itowns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iTowns/itowns/labels{/name}","releases_url":"https://api.github.com/repos/iTowns/itowns/releases{/id}","deployments_url":"https://api.github.com/repos/iTowns/itowns/deployments","created_at":"2015-09-24T13:24:26Z","updated_at":"2018-07-25T15:04:57Z","pushed_at":"2018-07-27T16:06:47Z","git_url":"git://github.com/iTowns/itowns.git","ssh_url":"git@github.com:iTowns/itowns.git","clone_url":"https://github.com/iTowns/itowns.git","svn_url":"https://github.com/iTowns/itowns","homepage":"http://www.itowns-project.org","size":7409,"stargazers_count":130,"watchers_count":130,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":70,"open_issues":100,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/795"},"html":{"href":"https://github.com/iTowns/itowns/pull/795"},"issue":{"href":"https://api.github.com/repos/iTowns/itowns/issues/795"},"comments":{"href":"https://api.github.com/repos/iTowns/itowns/issues/795/comments"},"review_comments":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/795/comments"},"review_comment":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/795/commits"},"statuses":{"href":"https://api.github.com/repos/iTowns/itowns/statuses/dfb5206fd07dc8e4084422444493247a65de4c8f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gchoqueux"}}