mirror of
https://github.com/openglobus/openglobus.git
synced 2025-12-08 19:25:27 +00:00
v0.27.9
This commit is contained in:
parent
f7d2ff07fd
commit
236479e5a8
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openglobus/og",
|
||||
"version": "0.27.8",
|
||||
"version": "0.27.9",
|
||||
"description": "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",
|
||||
"main": "lib/og.es.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
||||
@ -123,6 +123,21 @@ export class SimpleNavigation extends Control {
|
||||
this.renderer.handler.canvas!.classList.add("ogGrabbingPoiner");
|
||||
this._grabbedPoint = this.renderer.getCartesianFromPixel(e);
|
||||
this._grabbedScreenPoint.set(e.nx, e.ny);
|
||||
|
||||
// let depth = this.renderer.getDepthMinDistance();
|
||||
// console.log(depth);
|
||||
|
||||
if (!this._grabbedPoint) {
|
||||
let cam = this.renderer.activeCamera;
|
||||
let p0 = new Vec3(),
|
||||
p1 = new Vec3(1, 0, 0),
|
||||
p2 = new Vec3(0, 0, 1);
|
||||
let px = new Vec3();
|
||||
if (new Ray(cam.eye, e.direction).hitPlaneRes(Plane.fromPoints(p0, p1, p2), px) === Ray.INSIDE) {
|
||||
this._grabbedPoint = px;
|
||||
}
|
||||
}
|
||||
|
||||
if (this._grabbedPoint) {
|
||||
this._eye0.copy(this.renderer.activeCamera.eye);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user