Compare commits
4 Commits
6a5774667e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d0e9f9951d | |||
| 6e546483f9 | |||
| ddcb13cd63 | |||
| 2eb0e64b30 |
@@ -258,6 +258,15 @@ main {
|
|||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.captor-vertical-top {
|
||||||
|
background-color: #DADEEF;
|
||||||
|
background-image: url("/web/assets/img/tiles/Capteur-1.svg");
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
.cable {
|
.cable {
|
||||||
background-color: #DADEEF;
|
background-color: #DADEEF;
|
||||||
background-image: url("/web/assets/img/tiles/CableH.svg");
|
background-image: url("/web/assets/img/tiles/CableH.svg");
|
||||||
@@ -274,6 +283,14 @@ main {
|
|||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cable-turn-horizontale3 {
|
||||||
|
background-color: #DADEEF;
|
||||||
|
background-image: url("/web/assets/img/tiles/CableTopRight.svg");
|
||||||
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
.cable-vertical {
|
.cable-vertical {
|
||||||
background-color: #DADEEF;
|
background-color: #DADEEF;
|
||||||
background-image: url("/web/assets/img/tiles/CableV.svg");
|
background-image: url("/web/assets/img/tiles/CableV.svg");
|
||||||
|
|||||||
0
web/assets/img/fakeimg.img
Normal file
0
web/assets/img/fakeimg.img
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 520 KiB |
BIN
web/assets/img/img_test_main_menu.png
Normal file
BIN
web/assets/img/img_test_main_menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
@@ -28,6 +28,8 @@ const legend = {
|
|||||||
cableTurnHorizontale2: 24,
|
cableTurnHorizontale2: 24,
|
||||||
captorTurnHorizontal: 25,
|
captorTurnHorizontal: 25,
|
||||||
wallSemiAngle: 26,
|
wallSemiAngle: 26,
|
||||||
|
cableTurnHorizontale3: 27,
|
||||||
|
captorVerticalTop: 28
|
||||||
};
|
};
|
||||||
|
|
||||||
const laserColors = {
|
const laserColors = {
|
||||||
@@ -58,6 +60,11 @@ const glassOptions = [
|
|||||||
{ color: laserColors.blue, maxAmount: 1, currentAmount: 1 },
|
{ color: laserColors.blue, maxAmount: 1, currentAmount: 1 },
|
||||||
{ color: laserColors.yellow, maxAmount: 2, currentAmount: 2 },
|
{ color: laserColors.yellow, maxAmount: 2, currentAmount: 2 },
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
{ color: laserColors.red, maxAmount: 3, currentAmount: 3 },
|
||||||
|
{ color: laserColors.blue, maxAmount: 2, currentAmount: 2 },
|
||||||
|
{ color: laserColors.yellow, maxAmount: 1, currentAmount: 1 },
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
let levels = [
|
let levels = [
|
||||||
@@ -112,20 +119,21 @@ let levels = [
|
|||||||
[0, 0, 0, 0, 6, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 6, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
[0, 0, 0, 0, 10, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 10, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0],
|
||||||
],
|
],
|
||||||
];
|
|
||||||
/*
|
|
||||||
[
|
[
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 11, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 12, 6, 9, 0, 10, 6, 9, 0, 0, 0, 3, 0, 17, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[12, 6, 9, 0, 0, 0, 6, 0, 7, 0, 0, 0, 0, 18, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[6, 9, 0, 0, 0, 0, 6, 11, 0, 0, 12, 0, 0, 18, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[1, 0, 0, 0, 0, 12, 6, 6, 11, 0, 0, 3, 0, 18, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[10, 6, 11, 0, 0, 6, 0, 0, 10, 6, 6, 6, 6, 18, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 10, 6, 28, 6, 9, 0, 0, 0, 10, 6, 6, 24, 23, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 10, 27, 16, 3, 4, 0, 0, 0, 10, 24, 23, 0, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 10, 6, 18, 6, 11, 0, 12, 18, 0, 0, 0],
|
||||||
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
[0, 0, 0, 0, 0, 10, 27, 16, 16, 16, 16, 23, 0, 0, 0],
|
||||||
], */
|
],
|
||||||
|
];
|
||||||
|
|
||||||
let currentLevelIndex = 0;
|
let currentLevelIndex = 0;
|
||||||
|
|
||||||
const initialMirrorAngles = [
|
const initialMirrorAngles = [
|
||||||
@@ -136,6 +144,7 @@ const initialMirrorAngles = [
|
|||||||
{
|
{
|
||||||
"2,9": 225,
|
"2,9": 225,
|
||||||
},
|
},
|
||||||
|
{},
|
||||||
{}
|
{}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -147,6 +156,7 @@ const buttonGroups = [
|
|||||||
{
|
{
|
||||||
"9,4": 1,
|
"9,4": 1,
|
||||||
},
|
},
|
||||||
|
{}
|
||||||
];
|
];
|
||||||
|
|
||||||
const doorGroups = [
|
const doorGroups = [
|
||||||
@@ -157,6 +167,7 @@ const doorGroups = [
|
|||||||
"4,6": 1,
|
"4,6": 1,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
|
{}
|
||||||
];
|
];
|
||||||
|
|
||||||
const captorGroups = [
|
const captorGroups = [
|
||||||
@@ -165,6 +176,7 @@ const captorGroups = [
|
|||||||
"2,6": 1,
|
"2,6": 1,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
|
{}
|
||||||
];
|
];
|
||||||
|
|
||||||
const rotatorButtons = [
|
const rotatorButtons = [
|
||||||
@@ -176,6 +188,7 @@ const rotatorButtons = [
|
|||||||
{
|
{
|
||||||
"3,7": { mirrorX: 7, mirrorY: 7, step: -22.5, intervalMs: 1000 },
|
"3,7": { mirrorX: 7, mirrorY: 7, step: -22.5, intervalMs: 1000 },
|
||||||
},
|
},
|
||||||
|
{}
|
||||||
];
|
];
|
||||||
|
|
||||||
let laserDirection = { dx: 0, dy: 0 };
|
let laserDirection = { dx: 0, dy: 0 };
|
||||||
@@ -811,9 +824,15 @@ function loadGrid() {
|
|||||||
case legend.captorTurnHorizontal:
|
case legend.captorTurnHorizontal:
|
||||||
cell.classList.add("captor-turn-horizontale2");
|
cell.classList.add("captor-turn-horizontale2");
|
||||||
break;
|
break;
|
||||||
|
case legend.cableTurnHorizontale3:
|
||||||
|
cell.classList.add("cable-turn-horizontale3");
|
||||||
|
break;
|
||||||
case legend.wallSemiAngle:
|
case legend.wallSemiAngle:
|
||||||
cell.classList.add("wall-semi-angle");
|
cell.classList.add("wall-semi-angle");
|
||||||
break;
|
break;
|
||||||
|
case legend.captorVerticalTop:
|
||||||
|
cell.classList.add("captor-vertical-top");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
drawLaserInCell(cell, laserSegments[`${y},${x}`]);
|
drawLaserInCell(cell, laserSegments[`${y},${x}`]);
|
||||||
@@ -1044,6 +1063,15 @@ function traceLaser() {
|
|||||||
laserActive = false;
|
laserActive = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case legend.captorVerticalTop:
|
||||||
|
if (currentLaserColor === laserColors.blue) {
|
||||||
|
laserDirection = reverseLaser(laserDirection);
|
||||||
|
} else if (currentLaserColor === laserColors.yellow) {
|
||||||
|
saveLaserSegment(currentX, currentY, laserDirection, currentLaserColor);
|
||||||
|
} else {
|
||||||
|
laserActive = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case legend.rotatorButton:
|
case legend.rotatorButton:
|
||||||
if (currentLaserColor === laserColors.red) {
|
if (currentLaserColor === laserColors.red) {
|
||||||
const rotatorKey = `${currentY},${currentX}`;
|
const rotatorKey = `${currentY},${currentX}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user