Compare commits
12 Commits
3d663fb5d6
...
8218883faf
Author | SHA1 | Date | |
---|---|---|---|
8218883faf | |||
145cb5f637 | |||
6d3f74f911 | |||
b22f13887f | |||
2a3f2212a7 | |||
98df08e5fa | |||
d42280eb10 | |||
0739c65961 | |||
ea599809b8 | |||
08c38c6374 | |||
854775011c | |||
e33d8c02e9 |
5
public/static/img/compass.svg
Normal file
5
public/static/img/compass.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||||
|
<polygon id="needleNorth" points="50,0 33,50 66,50" style="fill:red;stroke:black;stroke-width:1" />
|
||||||
|
<polygon id="needleSouth" points="50,100 33,50 66,50" style="fill:white;stroke:black;stroke-width:1" />
|
||||||
|
Sorry, your browser does not support inline SVG.
|
||||||
|
</svg>
|
After Width: | Height: | Size: 328 B |
@ -387,6 +387,10 @@
|
|||||||
document.getElementById('currentRound').innerHTML = String(Game.rounds.length) + '/' + String(Game.NUMBER_OF_ROUNDS);
|
document.getElementById('currentRound').innerHTML = String(Game.rounds.length) + '/' + String(Game.NUMBER_OF_ROUNDS);
|
||||||
|
|
||||||
Game.loadPano(Game.panoId, Game.pov);
|
Game.loadPano(Game.panoId, Game.pov);
|
||||||
|
|
||||||
|
// update the compass
|
||||||
|
const heading = Game.panorama.getPov().heading;
|
||||||
|
document.getElementById("compass").style.transform = "translateY(-50%) rotate(" + heading + "deg)";
|
||||||
},
|
},
|
||||||
|
|
||||||
handleErrorResponse: function (error) {
|
handleErrorResponse: function (error) {
|
||||||
@ -863,6 +867,9 @@
|
|||||||
|
|
||||||
Game.panorama.addListener('pov_changed', function () {
|
Game.panorama.addListener('pov_changed', function () {
|
||||||
Game.rewriteGoogleLink();
|
Game.rewriteGoogleLink();
|
||||||
|
|
||||||
|
const heading = Game.panorama.getPov().heading;
|
||||||
|
document.getElementById("compass").style.transform = "translateY(-50%) rotate(" + heading + "deg)";
|
||||||
});
|
});
|
||||||
|
|
||||||
if (COOKIES_CONSENT) {
|
if (COOKIES_CONSENT) {
|
||||||
@ -950,4 +957,8 @@
|
|||||||
document.getElementById('returnToStart').onclick = function () {
|
document.getElementById('returnToStart').onclick = function () {
|
||||||
Game.loadPano(Game.panoId, Game.pov);
|
Game.loadPano(Game.panoId, Game.pov);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.getElementById('compassContainer').onclick = function () {
|
||||||
|
Game.panorama.setPov({ heading: 0, pitch: Game.panorama.getPov().pitch });
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
@ -60,6 +60,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="navigation">
|
<div id="navigation">
|
||||||
|
<div id="compassContainer" class="navigationItem">
|
||||||
|
<div>
|
||||||
|
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<img id="compass" src="<?= $_ENV['STATIC_ROOT'] ?>/img/compass.svg?rev=<?= REVISION ?>" alt="compass icon" class="navigationIcon" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="returnToStart" class="navigationItem">
|
<div id="returnToStart" class="navigationItem">
|
||||||
<div>
|
<div>
|
||||||
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
|
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
|
||||||
|
Loading…
Reference in New Issue
Block a user