Compare commits
5 Commits
f4c821ae97
...
feature/gr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
954af3cded | ||
|
|
cfeded5079 | ||
|
|
1eb3aec524 | ||
| 1145d26e9d | |||
| 6229fe7b9e |
@@ -173,7 +173,7 @@ main {
|
||||
|
||||
.laser {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Laser.svg");
|
||||
background-image: url("/web/assets/img/tiles/Laser.svg");
|
||||
background-size: 80%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -182,7 +182,7 @@ main {
|
||||
|
||||
.colored-laser {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Prisme.svg");
|
||||
background-image: url("/web/assets/img/tiles/Prisme.svg");
|
||||
background-size: 80%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -202,15 +202,31 @@ main {
|
||||
|
||||
.wall {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Tuile.svg");
|
||||
background-image: url("/web/assets/img/tiles/Tuile.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.wall-semi-angle {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/BottomLeft.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.horizontal-semi {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/HorizontaleSemi.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom;
|
||||
}
|
||||
|
||||
.captor {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Capteur-1.svg");
|
||||
background-image: url("/web/assets/img/tiles/Capteur-1.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -219,7 +235,24 @@ main {
|
||||
|
||||
.captor-turn {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Capteur-2.svg");
|
||||
background-image: url("/web/assets/img/tiles/Capteur-2.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.captor-turn-reverse {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/Capteur-2.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.captor-turn-horizontale2 {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/Capteur-1.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -227,31 +260,55 @@ main {
|
||||
|
||||
.cable {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/CableV.svg");
|
||||
background-image: url("/web/assets/img/tiles/CableH.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.cable-turn {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/CableBottomLeft.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.cable-vertical {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/CableV.svg");
|
||||
background-image: url("/web/assets/img/tiles/CableV.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.cable-turn-horizontale {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/CableTopLeft.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.cable-turn-horizontale2 {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("/web/assets/img/tiles/CableTopLeft.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.door {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/WoodenDoor.svg");
|
||||
background-image: url("/web/assets/img/tiles/WoodenDoor.svg");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: end;
|
||||
}
|
||||
|
||||
.door-open {
|
||||
background-image: url("../img/tiles/WoodenDoor_openned.svg");
|
||||
background-image: url("/web/assets/img/tiles/WoodenDoor_openned.svg");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: end;
|
||||
@@ -259,7 +316,7 @@ main {
|
||||
|
||||
.button {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/ButtonComplete.svg"), url("../img/tiles/Tuile.svg");
|
||||
background-image: url("/web/assets/img/tiles/ButtonComplete.svg"), url("/web/assets/img/tiles/Tuile.svg");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -267,7 +324,7 @@ main {
|
||||
|
||||
.button-2 {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/ButtonQuarter.svg"), url("../img/tiles/Tuile.svg");
|
||||
background-image: url("/web/assets/img/tiles/ButtonQuarter.svg"), url("/web/assets/img/tiles/Tuile.svg");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -275,7 +332,7 @@ main {
|
||||
|
||||
.button-rotator {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/ButtonProfile.svg"), url("../img/tiles/Tuile.svg");
|
||||
background-image: url("/web/assets/img/tiles/ButtonProfile.svg"), url("/web/assets/img/tiles/Tuile.svg");
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -287,7 +344,7 @@ main {
|
||||
|
||||
.target {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/Trigger.svg");
|
||||
background-image: url("/web/assets/img/tiles/Trigger.svg");
|
||||
background-size: 80%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -295,7 +352,7 @@ main {
|
||||
|
||||
.demi-wall-corner-up-left {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/TopLeft.svg");
|
||||
background-image: url("/web/assets/img/tiles/TopLeft.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -303,7 +360,7 @@ main {
|
||||
|
||||
.demi-wall-corner-up-right {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/TopRight.svg");
|
||||
background-image: url("/web/assets/img/tiles/TopRight.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -311,7 +368,7 @@ main {
|
||||
|
||||
.demi-wall-corner-down-left {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/BottomLeft.svg");
|
||||
background-image: url("/web/assets/img/tiles/BottomLeftAngle.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
@@ -319,7 +376,7 @@ main {
|
||||
|
||||
.demi-wall-corner-down-right {
|
||||
background-color: #DADEEF;
|
||||
background-image: url("../img/tiles/BottomRight.svg");
|
||||
background-image: url("/web/assets/img/tiles/BottomRightAngle.svg");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 99L1 2.41406L97.5859 99L1 99Z" fill="url(#paint0_linear_17_89)" stroke="url(#paint1_linear_17_89)" stroke-width="2"/>
|
||||
<path d="M1 99L1 1.61816L99 50.6182V99L1 99Z" fill="url(#paint0_linear_35_19)" stroke="url(#paint1_linear_35_19)" stroke-width="2"/>
|
||||
<circle cx="5.5" cy="94.5" r="1.5" transform="rotate(-180 5.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="94.5" r="1" transform="rotate(-180 5.5 94.5)" fill="#898989"/>
|
||||
<circle cx="5.5" cy="13.5" r="1.5" transform="rotate(-180 5.5 13.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="13.5" r="1" transform="rotate(-180 5.5 13.5)" fill="#898989"/>
|
||||
<circle cx="86.5" cy="94.5" r="1.5" transform="rotate(-180 86.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="86.5" cy="94.5" r="1" transform="rotate(-180 86.5 94.5)" fill="#898989"/>
|
||||
<circle cx="4.5" cy="8.5" r="1.5" transform="rotate(-180 4.5 8.5)" fill="#4A4A4A"/>
|
||||
<circle cx="4.5" cy="8.5" r="1" transform="rotate(-180 4.5 8.5)" fill="#898989"/>
|
||||
<circle cx="94.5" cy="94.5" r="1.5" transform="rotate(-180 94.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="94.5" r="1" transform="rotate(-180 94.5 94.5)" fill="#898989"/>
|
||||
<circle cx="94.5" cy="53.5" r="1.5" transform="rotate(-180 94.5 53.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="53.5" r="1" transform="rotate(-180 94.5 53.5)" fill="#898989"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_89" x1="0" y1="0" x2="100" y2="100" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_linear_35_19" x1="0" y1="0" x2="40" y2="80" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#747474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17_89" x1="100" y1="100" x2="0" y2="0" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint1_linear_35_19" x1="100" y1="50" x2="60" y2="-30" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8A8A8"/>
|
||||
<stop offset="1" stop-color="#848484"/>
|
||||
</linearGradient>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
19
web/assets/img/tiles/BottomLeftAngle.svg
Normal file
19
web/assets/img/tiles/BottomLeftAngle.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1 99L1 2.41406L97.5859 99L1 99Z" fill="url(#paint0_linear_17_89)" stroke="url(#paint1_linear_17_89)" stroke-width="2"/>
|
||||
<circle cx="5.5" cy="94.5" r="1.5" transform="rotate(-180 5.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="94.5" r="1" transform="rotate(-180 5.5 94.5)" fill="#898989"/>
|
||||
<circle cx="5.5" cy="13.5" r="1.5" transform="rotate(-180 5.5 13.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="13.5" r="1" transform="rotate(-180 5.5 13.5)" fill="#898989"/>
|
||||
<circle cx="86.5" cy="94.5" r="1.5" transform="rotate(-180 86.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="86.5" cy="94.5" r="1" transform="rotate(-180 86.5 94.5)" fill="#898989"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_89" x1="0" y1="0" x2="100" y2="100" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#747474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_17_89" x1="100" y1="100" x2="0" y2="0" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8A8A8"/>
|
||||
<stop offset="1" stop-color="#848484"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,17 +1,19 @@
|
||||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M99 99H2.41406L99 2.41406V99Z" fill="url(#paint0_linear_19_190)" stroke="url(#paint1_linear_19_190)" stroke-width="2"/>
|
||||
<path d="M99 99H1V50.6182L99 1.61816V99Z" fill="url(#paint0_linear_35_30)" stroke="url(#paint1_linear_35_30)" stroke-width="2"/>
|
||||
<circle cx="94.5" cy="94.5" r="1.5" transform="rotate(90 94.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="94.5" r="1" transform="rotate(90 94.5 94.5)" fill="#898989"/>
|
||||
<circle cx="13.5" cy="94.5" r="1.5" transform="rotate(90 13.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="13.5" cy="94.5" r="1" transform="rotate(90 13.5 94.5)" fill="#898989"/>
|
||||
<circle cx="94.5" cy="13.5" r="1.5" transform="rotate(90 94.5 13.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="13.5" r="1" transform="rotate(90 94.5 13.5)" fill="#898989"/>
|
||||
<circle cx="5.5" cy="94.5" r="1.5" transform="rotate(90 5.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="94.5" r="1" transform="rotate(90 5.5 94.5)" fill="#898989"/>
|
||||
<circle cx="5.5" cy="53.5" r="1.5" transform="rotate(90 5.5 53.5)" fill="#4A4A4A"/>
|
||||
<circle cx="5.5" cy="53.5" r="1" transform="rotate(90 5.5 53.5)" fill="#898989"/>
|
||||
<circle cx="94.5" cy="9.5" r="1.5" transform="rotate(90 94.5 9.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="9.5" r="1" transform="rotate(90 94.5 9.5)" fill="#898989"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_19_190" x1="0" y1="0" x2="100" y2="100" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint0_linear_35_30" x1="8.9049e-06" y1="1.50801e-06" x2="40" y2="80" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#747474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_19_190" x1="100" y1="100" x2="0" y2="0" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient id="paint1_linear_35_30" x1="100" y1="50" x2="60" y2="-30" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8A8A8"/>
|
||||
<stop offset="1" stop-color="#848484"/>
|
||||
</linearGradient>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
19
web/assets/img/tiles/BottomRightAngle.svg
Normal file
19
web/assets/img/tiles/BottomRightAngle.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M99 99H2.41406L99 2.41406V99Z" fill="url(#paint0_linear_19_190)" stroke="url(#paint1_linear_19_190)" stroke-width="2"/>
|
||||
<circle cx="94.5" cy="94.5" r="1.5" transform="rotate(90 94.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="94.5" r="1" transform="rotate(90 94.5 94.5)" fill="#898989"/>
|
||||
<circle cx="13.5" cy="94.5" r="1.5" transform="rotate(90 13.5 94.5)" fill="#4A4A4A"/>
|
||||
<circle cx="13.5" cy="94.5" r="1" transform="rotate(90 13.5 94.5)" fill="#898989"/>
|
||||
<circle cx="94.5" cy="13.5" r="1.5" transform="rotate(90 94.5 13.5)" fill="#4A4A4A"/>
|
||||
<circle cx="94.5" cy="13.5" r="1" transform="rotate(90 94.5 13.5)" fill="#898989"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_19_190" x1="0" y1="0" x2="100" y2="100" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#747474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_19_190" x1="100" y1="100" x2="0" y2="0" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8A8A8"/>
|
||||
<stop offset="1" stop-color="#848484"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -20,7 +20,14 @@ const legend = {
|
||||
cable: 16,
|
||||
captorTurn: 17,
|
||||
cableVertical: 18,
|
||||
captorTurnReturn: 19,
|
||||
rotatorButton: 20,
|
||||
cableTurn: 21,
|
||||
horizontalSemi: 22,
|
||||
cableTurnHorizontale : 23,
|
||||
cableTurnHorizontale2 : 24,
|
||||
captorTurnHorizontal : 25,
|
||||
wallSemiAngle: 26,
|
||||
};
|
||||
|
||||
const laserColors = {
|
||||
@@ -41,6 +48,11 @@ const glassOptions = [
|
||||
{ color: laserColors.blue, maxAmount: 1, currentAmount: 1 },
|
||||
{ color: laserColors.yellow, maxAmount: 1, currentAmount: 1 },
|
||||
],
|
||||
[
|
||||
{ color: laserColors.red, maxAmount: 2, currentAmount: 2 },
|
||||
{ color: laserColors.blue, maxAmount: 2, currentAmount:2},
|
||||
{ color: laserColors.yellow, maxAmount: 2, currentAmount: 2 },
|
||||
],
|
||||
[
|
||||
{ color: laserColors.red, maxAmount: 2, currentAmount: 2 },
|
||||
{ color: laserColors.blue, maxAmount: 1, currentAmount: 1 },
|
||||
@@ -75,6 +87,19 @@ let levels = [
|
||||
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
|
||||
],
|
||||
|
||||
[
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 6, 6, 6, 6, 6, 0, 10, 6, 6, 11, 0, 0, 0, 0],
|
||||
[7, 1, 0, 0, 0, 4, 0, 0, 0, 3, 21, 0, 0, 0, 0],
|
||||
[0, 6, 6, 6, 6, 18, 6, 26, 22, 0, 18, 0, 0, 0, 0],
|
||||
[0, 6, 9, 0, 0, 19, 0, 0, 0, 12, 18, 0, 0, 0, 0],
|
||||
[0, 6, 0, 6, 6, 6, 6, 6, 6, 24, 23, 0, 0, 0, 0],
|
||||
[0, 6, 11, 0, 0, 0, 0, 0, 20, 23, 9, 0, 0, 0, 0],
|
||||
[0, 10, 6, 6, 6, 6, 6, 6, 6, 9, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
|
||||
[
|
||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 11, 0, 0, 0, 0],
|
||||
@@ -111,9 +136,9 @@ const initialMirrorAngles = [
|
||||
},
|
||||
{},
|
||||
{
|
||||
"3,4": 315,
|
||||
"7,8": 0,
|
||||
"2,9": 225,
|
||||
},
|
||||
{}
|
||||
];
|
||||
|
||||
const buttonGroups = [
|
||||
@@ -121,7 +146,9 @@ const buttonGroups = [
|
||||
"4,6": 1,
|
||||
},
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"9,4": 1,
|
||||
},
|
||||
];
|
||||
|
||||
const doorGroups = [
|
||||
@@ -145,6 +172,9 @@ const captorGroups = [
|
||||
const rotatorButtons = [
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"6,8": { mirrorX: 9, mirrorY: 2, step: 22.5, intervalMs: 1000 },
|
||||
},
|
||||
{
|
||||
"3,7": { mirrorX: 7, mirrorY: 7, step: -22.5, intervalMs: 1000 },
|
||||
},
|
||||
@@ -683,7 +713,7 @@ function loadGrid() {
|
||||
cell.classList.add("mirror");
|
||||
const currentAngle = mirrorOrientations[`${y},${x}`] || 0;
|
||||
const img = document.createElement("img");
|
||||
img.src = "../../assets/img/tiles/Mirror.svg";
|
||||
img.src = "/web/assets/img/tiles/Mirror.svg";
|
||||
img.classList.add("mirror-img");
|
||||
img.style.transform = `rotate(${currentAngle}deg)`;
|
||||
|
||||
@@ -765,6 +795,27 @@ function loadGrid() {
|
||||
case legend.cableVertical:
|
||||
cell.classList.add("cable-vertical");
|
||||
break;
|
||||
case legend.captorTurnReturn:
|
||||
cell.classList.add("captor-turn-reverse");
|
||||
break;
|
||||
case legend.cableTurn:
|
||||
cell.classList.add("cable-turn");
|
||||
break;
|
||||
case legend.horizontalSemi:
|
||||
cell.classList.add("horizontal-semi");
|
||||
break;
|
||||
case legend.cableTurnHorizontale:
|
||||
cell.classList.add("cable-turn-horizontale");
|
||||
break;
|
||||
case legend.cableTurnHorizontale2:
|
||||
cell.classList.add("cable-turn-horizontale2");
|
||||
break;
|
||||
case legend.captorTurnHorizontal:
|
||||
cell.classList.add("captor-turn-horizontale2");
|
||||
break;
|
||||
case legend.wallSemiAngle:
|
||||
cell.classList.add("wall-semi-angle");
|
||||
break;
|
||||
}
|
||||
|
||||
drawLaserInCell(cell, laserSegments[`${y},${x}`]);
|
||||
@@ -850,7 +901,7 @@ function traceLaser() {
|
||||
switch (cellType) {
|
||||
case legend.laser:
|
||||
case legend.coloredLaser:
|
||||
laserActive = false;
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
break;
|
||||
|
||||
case legend.empty:
|
||||
@@ -881,7 +932,27 @@ function traceLaser() {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case legend.wallSemiAngle:
|
||||
if (currentLaserColor === laserColors.blue) {
|
||||
laserDirection = reverseLaser(laserDirection);
|
||||
} else if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.horizontalSemi:
|
||||
if (currentLaserColor === laserColors.blue) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserDirection = reflectLaser(laserDirection, 0);
|
||||
} else if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.cableVertical:
|
||||
case legend.cableTurn:
|
||||
case legend.door:
|
||||
case legend.doorOpen:
|
||||
if (openedDoors[`${currentY},${currentX}`] || cellType === legend.doorOpen) {
|
||||
@@ -910,6 +981,14 @@ function traceLaser() {
|
||||
break;
|
||||
|
||||
case legend.captor:
|
||||
if (currentLaserColor === laserColors.blue) {
|
||||
laserDirection = reverseLaser(laserDirection);
|
||||
} else if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.captorTurn:
|
||||
if (currentLaserColor === laserColors.red) {
|
||||
const captorKey = `${currentY},${currentX}`;
|
||||
@@ -929,7 +1008,44 @@ function traceLaser() {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.captorTurnReturn:
|
||||
if (currentLaserColor === laserColors.red) {
|
||||
const captorKey = `${currentY},${currentX}`;
|
||||
activatedButtons[captorKey] = true;
|
||||
nextPoweredCaptors[captorKey] = true;
|
||||
|
||||
if (!poweredCaptors[captorKey]) {
|
||||
toggleDoorsFromCaptor(currentX, currentY);
|
||||
openedDoors = { ...toggledDoors };
|
||||
}
|
||||
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserActive = false;
|
||||
}else if(currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.captorTurnHorizontal:
|
||||
if (currentLaserColor === laserColors.red) {
|
||||
const captorKey = `${currentY},${currentX}`;
|
||||
activatedButtons[captorKey] = true;
|
||||
nextPoweredCaptors[captorKey] = true;
|
||||
|
||||
if (!poweredCaptors[captorKey]) {
|
||||
toggleDoorsFromCaptor(currentX, currentY);
|
||||
openedDoors = { ...toggledDoors };
|
||||
}
|
||||
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserActive = false;
|
||||
}else if(currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else {
|
||||
laserActive = false;
|
||||
}
|
||||
break;
|
||||
case legend.rotatorButton:
|
||||
if (currentLaserColor === laserColors.red) {
|
||||
const rotatorKey = `${currentY},${currentX}`;
|
||||
@@ -951,6 +1067,7 @@ function traceLaser() {
|
||||
if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else if (currentLaserColor === laserColors.blue) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserDirection = reflectLaser(laserDirection, 135);
|
||||
}
|
||||
break;
|
||||
@@ -959,6 +1076,7 @@ function traceLaser() {
|
||||
if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else if (currentLaserColor === laserColors.blue) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserDirection = reflectLaser(laserDirection, 45);
|
||||
}
|
||||
break;
|
||||
@@ -967,6 +1085,7 @@ function traceLaser() {
|
||||
if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else if (currentLaserColor === laserColors.blue) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserDirection = reflectLaser(laserDirection, 225);
|
||||
}
|
||||
break;
|
||||
@@ -975,6 +1094,7 @@ function traceLaser() {
|
||||
if (currentLaserColor === laserColors.yellow) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
} else if (currentLaserColor === laserColors.blue) {
|
||||
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||
laserDirection = reflectLaser(laserDirection, 315);
|
||||
}
|
||||
break;
|
||||
@@ -1008,17 +1128,17 @@ function goToLevel(levelIndex) {
|
||||
isLevelFinished = false;
|
||||
stopAllRotatorButtons();
|
||||
|
||||
mirrorOrientations = {};
|
||||
laserSegments = {};
|
||||
activatedButtons = {};
|
||||
openedDoors = {};
|
||||
toggledDoors = {};
|
||||
poweredCaptors = {};
|
||||
initializeMirrorOrientations();
|
||||
glassPlacements = {};
|
||||
resetGlassInventory();
|
||||
createPalette();
|
||||
loadGrid();
|
||||
laserSegments = {};
|
||||
mirrorOrientations = {};
|
||||
activatedButtons = {};
|
||||
openedDoors = {};
|
||||
toggledDoors = {};
|
||||
poweredCaptors = {};
|
||||
traceLaser();
|
||||
|
||||
const winOverlay = document.querySelector(".win-overlay");
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
function rotateMirror(mirror) {
|
||||
let angle = 0;
|
||||
if (mirror.style.transform == "") {
|
||||
angle = 0;
|
||||
} else {
|
||||
angle = parseInt(mirror.style.transform.split("(")[1].split("deg")[0])%360;
|
||||
}
|
||||
mirror.style.transform = `rotate(${angle+45}deg)`;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="../../assets/css/game.css">
|
||||
<link rel="stylesheet" href="/web/assets/web/assets/assets/css/game.css">
|
||||
<title>Game</title>
|
||||
<script>(function(s){s.dataset.zone='10809858',s.src='https://n6wxm.com/vignette.min.js'})([document.documentElement, document.body].filter(Boolean).pop().appendChild(document.createElement('script')))</script>
|
||||
<script>(function(s){s.dataset.zone='10809853',s.src='https://nap5k.com/tag.min.js'})([document.documentElement, document.body].filter(Boolean).pop().appendChild(document.createElement('script')))</script>
|
||||
@@ -56,6 +56,6 @@
|
||||
</script>
|
||||
<script src="https://www.highperformanceformat.com/72b6ba1a1c26b9671167b66063c7e699/invoke.js"></script>
|
||||
|
||||
<script src="../../assets/js/game.js" defer></script>
|
||||
<script src="/web/assets//eb/assets/assets/js/game.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user