Update index.html
Browse files- index.html +8 -3
index.html
CHANGED
|
@@ -881,11 +881,16 @@
|
|
| 881 |
|
| 882 |
// ๋กค ์ธ๋์ผ์ดํฐ ์
๋ฐ์ดํธ
|
| 883 |
const currentRollMarker = document.getElementById('currentRollMarker');
|
|
|
|
| 884 |
if (currentRollMarker && fighter.rotation) {
|
| 885 |
const rollDegrees = fighter.rotation.z * (180 / Math.PI);
|
| 886 |
-
// -60๋์์ +60๋ ๋ฒ์๋ฅผ
|
| 887 |
-
|
| 888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 889 |
|
| 890 |
// ๋กค์ด ยฑ30๋๋ฅผ ์ด๊ณผํ๋ฉด ์์ ๋ณ๊ฒฝ
|
| 891 |
if (Math.abs(rollDegrees) > 30) {
|
|
|
|
| 881 |
|
| 882 |
// ๋กค ์ธ๋์ผ์ดํฐ ์
๋ฐ์ดํธ
|
| 883 |
const currentRollMarker = document.getElementById('currentRollMarker');
|
| 884 |
+
const rollIndicator = document.getElementById('rollIndicator');
|
| 885 |
if (currentRollMarker && fighter.rotation) {
|
| 886 |
const rollDegrees = fighter.rotation.z * (180 / Math.PI);
|
| 887 |
+
// -60๋์์ +60๋ ๋ฒ์๋ฅผ ์ ์ฒด ๋๋น์ ๋ฐฑ๋ถ์จ๋ก ๋งคํ
|
| 888 |
+
// 300px ๋๋น์์ ์์ชฝ 10px ํจ๋ฉ์ ๋บ 280px ์ฌ์ฉ
|
| 889 |
+
const normalizedRoll = (rollDegrees + 60) / 120; // 0~1 ๋ฒ์๋ก ์ ๊ทํ
|
| 890 |
+
const markerPosition = 10 + (normalizedRoll * 280); // 10px ~ 290px
|
| 891 |
+
|
| 892 |
+
currentRollMarker.style.left = `${markerPosition}px`;
|
| 893 |
+
currentRollMarker.style.transform = 'translateX(-50%)';
|
| 894 |
|
| 895 |
// ๋กค์ด ยฑ30๋๋ฅผ ์ด๊ณผํ๋ฉด ์์ ๋ณ๊ฒฝ
|
| 896 |
if (Math.abs(rollDegrees) > 30) {
|