diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index f641aaf7..b7626e1e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,21 +1,2 @@ -Thank you for your interest! In an effort to make it easier to respond to your problem we would like -for you to consider a few things: -- Can you try to phrase it as a task? - Instead of "What unit is used in the cut view?" ask for "Clarify unit in cut view". - -- Can you make a screenshot or a screencast? - Some graphic errors are hard to describe, a screenshot helps to get your problem accross. - A service like [Gyazo Gif](https://gyazo.com/download) makes it possible to keep the link up for a long time. - Please don't link to a url that could be gone in a month or two (like dropbox). - -- Did you reach out on Gitter? - We have a gitter [channel for potree](https://gitter.im/potree/Lobby). Did you try to ask about your issue there? - -- Is all information accessible for us? - A cryptic error message like "Doesn't work on my computer" will not help us much. It would be awesome if - you could provide a permalink or code sample to the problematic section. What OS, potree and browser version you are - you using? How can we reproduce the issue? Logs can help too and - [Gists](https://help.github.com/articles/creating-gists/) are a good idea as well. - -Thank you for your consideration, please delete this text after you read it. +If you're reporting an error, please try to provide detailed error messages and, if possible, instructions on how to replicate the issue. \ No newline at end of file diff --git a/examples/ca13.html b/examples/ca13.html index 138f2d95..1647cd96 100644 --- a/examples/ca13.html +++ b/examples/ca13.html @@ -57,7 +57,6 @@ viewer.toggleSidebar(); }); - // Sigeom Potree.loadPointCloud("http://5.9.65.151/mschuetz/potree/resources/pointclouds/opentopography/CA13_1.4/cloud.js", "CA13", function(e){ viewer.scene.addPointCloud(e.pointcloud); e.pointcloud.position.z = 0; diff --git a/src/navigation/EarthControls.js b/src/navigation/EarthControls.js index 74f18ff4..913ea302 100644 --- a/src/navigation/EarthControls.js +++ b/src/navigation/EarthControls.js @@ -47,6 +47,7 @@ export class EarthControls extends EventDispatcher { } let camStart = this.camStart; + let camera = this.scene.getActiveCamera(); let view = this.viewer.scene.view; // let camera = this.viewer.scene.camera; @@ -55,7 +56,7 @@ export class EarthControls extends EventDispatcher { if (e.drag.mouse === MOUSE.LEFT) { - let ray = Utils.mouseToRay(mouse, camStart, domElement.clientWidth, domElement.clientHeight); + let ray = Utils.mouseToRay(mouse, camera, domElement.clientWidth, domElement.clientHeight); let plane = new THREE.Plane().setFromNormalAndCoplanarPoint( new THREE.Vector3(0, 0, 1), this.pivot); diff --git a/src/utils.js b/src/utils.js index 334a0a4e..59a63e65 100644 --- a/src/utils.js +++ b/src/utils.js @@ -527,9 +527,8 @@ export class Utils { }; let vector = new THREE.Vector3(normalizedMouse.x, normalizedMouse.y, 0.5); - let origin = new THREE.Vector3(normalizedMouse.x, normalizedMouse.y, 0); + let origin = camera.position.clone(); vector.unproject(camera); - origin.unproject(camera); let direction = new THREE.Vector3().subVectors(vector, origin).normalize(); let ray = new THREE.Ray(origin, direction);