Skip to content

Commit

Permalink
new processor animation
Browse files Browse the repository at this point in the history
  • Loading branch information
s-zhdanova committed Jan 8, 2025
1 parent 81edc8e commit 1555d92
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/deploy/autoscore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
</div>
<div class="imageContainer">
<img src="processor1.png" alt="" width="512px" height="512px" id="processor">
<img src="processorEmpty.png" alt="" width="512px" height="512px" id="processor">
</div>
</div>
<div class="locationContainer" style="display: none">
Expand Down
22 changes: 14 additions & 8 deletions src/main/deploy/autoscore/processor.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const processorButton = document.getElementById("button");
const animationIntervals = [];
const animationFPS = 6;
const animationFPS = 11.25;
const processorImage = document.getElementById("processor");

processorButton.onmouseenter = () => {
processorImage.style.filter = "brightness(1.25)";
}
processorImage.style.filter = "brightness(1.25)";
}

processorButton.onmouseleave = () => {
processorImage.style.filter = "brightness(1)";
Expand All @@ -19,15 +19,21 @@ processorButton.onclick = () => {
})
let frame = 1;
const animationInterval = setInterval(() => {
if(frame == 8) {
if(frame == 15) {
console.log("clearing");
changeMenu("choice");
clearInterval(animationInterval);
} else {
if(frame == 7) {
processorImage.src = `processor1.png`;
} else {
processorImage.src = `processor${frame}.png`;
if(frame == 14) {
processorImage.src = `processorEmpty.png`;
}
else {
if(frame == 13) {
processorImage.src = `processorr12`;
}
else {
processorImage.src = `processorr${frame}.png`;
}
}
frame++;
}
Expand Down
Binary file removed src/main/deploy/autoscore/processorgif.gif
Binary file not shown.
Binary file added src/main/deploy/autoscore/processorr1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/deploy/autoscore/processorr9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1555d92

Please sign in to comment.