Feature In-Game Compass #27
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/in-game-compass"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Compass
Added a new icon, which shows the direction to north. The direction information is coming from POV heading variable.
@ -857,1 +864,4 @@
Game.rewriteGoogleLink();
const heading = Game.panorama.getPov().heading;
document.getElementById("compass").style.transform = "rotate(" + heading + "deg)";
I would give the id
compass
to the compassimg
itself so only the compass graphic would rotate. But then this line should look like this to keep the default translate of the image:@ -62,0 +62,4 @@
<div id="navigation">
<div id="compass" class="navigationItem">
<span>
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
So I meant here that this should have the id:
<img id="compass" ...
It is not a practical issue but for me it seems to be better if not the whole parent div rotates.
Most of the changes comes from #26 so I would merge that first. But this new feature really looks cool, it is like our competitor :D
Features Return to Start & In-Game Compassto Feature In-Game Compass@ -174,1 +208,4 @@
}
#navigation {
bottom: 25px;
left: 5px;
This should be 10px as in the other PR:
8f0cfd4489/public/static/css/game.css (L211)
Otherwise the buttons will be very close to the left side of a mobile device.Looks good, I had one more finding. But I think #26 can be merged first then the conflicts should solved and this can be also merged. Or what do you prefer, merge the both changes in this PR?I was too slow again, I see that you merged the other one :D