Skip to content

Commit

Permalink
add console log for mobile debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tsriram committed Oct 12, 2023
1 parent a06b651 commit c4f3568
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/components/Game.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
const grid = document.querySelector('.grid');
if (grid) {
rowSize = parseInt(getComputedStyle(grid).getPropertyValue('--column-size'));
console.log('rowSize: ', rowSize);
rowGap = parseInt(getComputedStyle(grid).getPropertyValue('--row-gap'));
console.log('rowGap: ', rowGap);
}
} catch {
console.error('Error setting row size');
Expand All @@ -46,6 +48,7 @@
if (gameState.newCoinCol !== null && gameState.newCoinRow !== null) {
// get the row to which the new coin was added
const position = (gameState.newCoinRow + 1) * (rowSize + rowGap) * -1;
console.log('position: ', position);
transformSpring = spring(position, { stiffness: 0.1, damping: 0.6 });
transformSpring.set(0);
}
Expand Down

0 comments on commit c4f3568

Please sign in to comment.