fix(metal): transition animation

This commit is contained in:
Eddybrando Vásquez 2023-04-12 11:40:34 +02:00
parent f824cfefd7
commit 52e8f6a301
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ const pattern: number[][] = [
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]; // size 16x9
const hiddenCells: string[] = [];
const hiddenCells = ref<string[]>([]);
const slotContainerIsHidden = ref(false);
@ -147,7 +147,7 @@ const fallingCells = computed<string[]>(() =>
);
function isHidden(pos: CellSpecification): boolean {
return hiddenCells.includes(getPosId(pos));
return hiddenCells.value.includes(getPosId(pos));
}
function isTrigger(pos: CellSpecification): boolean {
@ -178,7 +178,7 @@ function removeCell() {
const index = Math.floor(Math.random() * length);
const cellToHideId = fallingCells.value.splice(index, 1)[0];
hiddenCells.splice(0, 0, cellToHideId);
hiddenCells.value.splice(0, 0, cellToHideId);
setTimeout(removeCell, timeToRemoveNextCell);
}