Skip to content

Commit

Permalink
v5.0.0-alpha.267: Fix simpleSlides opacity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncheung00 committed Oct 3, 2023
1 parent d7b5eaa commit f40258e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
"preview:https": "serve dist",
"reinstall": "rm -rf node_modules; yarn; vue-tsc --noEmit"
},
"version": "5.0.0-alpha.266"
"version": "5.0.0-alpha.267"
}
6 changes: 3 additions & 3 deletions src/scripts/gamesmanUni/moveAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const animateImageAutoGUI = (volume: number, currPosition: string, nextPosition:
for (i = animationWindow[0]; i < animationWindow[1]; i++) {
if (currBoard[i] != nextBoard[i]) {
if (currBoard[i] != '-' && currBoard[i] in entities) { // Entity originally at center i shall fade out
gsap.fromTo("#entity" + i, {autoAlpha: 1}, {duration: 0.5, autoAlpha: 0.001});
gsap.fromTo("#entity" + i, {autoAlpha: 1}, {duration: 0.5, autoAlpha: 0});
}
if (nextBoard[i] != '-') { // Entity that will be at center i shall fade in
appearingChar = nextBoard[i];
Expand Down Expand Up @@ -194,7 +194,7 @@ const animateImageAutoGUI = (volume: number, currPosition: string, nextPosition:

for (i of fadeOutIdxs) {
if (currBoard[i] in entities) {
gsap.fromTo("#entity" + i, {autoAlpha: 1}, {duration: 0.5, autoAlpha: 0.001});
gsap.fromTo("#entity" + i, {autoAlpha: 1}, {duration: 0.5, autoAlpha: 0});
}
}
for (i of fadeInIdxs) {
Expand Down Expand Up @@ -303,7 +303,7 @@ export const animationEpilogue = (currentMatch: Types.Match) => {
// 50% of the time for some reason) so we use fromTo instead
var entities = document.getElementsByClassName('entity');
if (entities.length > 0) {
gsap.to(".entity", {duration: 0.001, opacity: 1});
gsap.fromTo(".entity", {autoAlpha: 0}, {duration: 0.001, autoAlpha: 1});
}
if (document.getElementById("animationForeground")) {
document.getElementById("animationForeground")!.remove();
Expand Down

0 comments on commit f40258e

Please sign in to comment.