gbiobob / ED3D-Galaxy-Map

Elite: Dangerous 3D map visualiser API (build with WebGL)

Home Page:https://wiki.ed-board.net/en/map/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scale is always set as distanceFromTarget which doesn't work if target isn't where user is zooming in

Gerdofal opened this issue · comments

Scale appears determined by distanceFromTarget (line 697 ed3dmap.js). However, it is possible to manually move the camera and zoom in with the mouse wheel, thus zooming in on an area very far from the target. The result of this is that the user can zoom in on an area and all stars will disappear because they are so far from the target they become minimum size.

see:
http://gerdofal.net/ed/ed3dmap/plotedsm.php

I've check your edsm test, nice filters ;)
The issue seems coming from the "playerPos" parameter, your values are extremely far from the map so it cause some problems.

  1. I will take a look to fix the intitial "playerPos" if there is extremes values,
  2. I think what you want is to have a far initial view of the milky way : you have set a far coords for the camera target (playerPos) but what you need it's to have a way to set inital coord for the camera position not for the camera target (should stay 0,0,0 in your case ou sagittarius A*). I will add tomorrow a new parameter to let you set the initial camera postion. I hope my explanation are enough clear :)

I just release a small patch, now you can set both camera target (player position) & camera position.
In your case, instead of using playerPos: [0, 40000, -45000] (should stay [0,0,0])
just set cameraPos: [0, 40000, -45000]

I let you test that, it should be better.

Looks very nice. Works great. Thanks!