Fix for whole world globe

This commit is contained in:
Evolvedexperiment 2019-11-01 13:26:51 +00:00
parent bb9ed93db9
commit d635e799f6

View file

@ -260,7 +260,7 @@ async function updateGlobeTexure(addMesh) {
const mapHeight = rn(mapCoordinates.latT / 180 * height); const mapHeight = rn(mapCoordinates.latT / 180 * height);
const mapWidth = world ? mapHeight * 2 : rn(graphWidth / graphHeight * mapHeight); const mapWidth = world ? mapHeight * 2 : rn(graphWidth / graphHeight * mapHeight);
const dy = world ? 0 : (90 - mapCoordinates.latN) / 180 * height; const dy = world ? 0 : (90 - mapCoordinates.latN) / 180 * height;
const dx = mapWidth / 4; const dx = world ? 0 : mapWidth / 4;
// draw map on canvas // draw map on canvas
const ctx = document.createElement("canvas").getContext("2d"); const ctx = document.createElement("canvas").getContext("2d");
@ -331,4 +331,4 @@ function OrbitControls(camera, domElement) {
return {create, redraw, update, stop, options, setScale, setLightness, setSun, setRotation, toggleSky, setResolution, setColors, saveScreenshot}; return {create, redraw, update, stop, options, setScale, setLightness, setSun, setRotation, toggleSky, setResolution, setColors, saveScreenshot};
}))); })));