Skip to content

Commit

Permalink
update bubble path
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgammon committed Aug 31, 2024
1 parent 9454f2b commit b3659a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function updatePieceGrid(grid, shape, color) {
cellElement.className = 'piece-cell';
cellElement.style.backgroundColor = cell ? color : 'transparent';
if (cell) {
cellElement.style.backgroundImage = 'url("./bubble.png")';
cellElement.style.backgroundImage = 'url("./public/bubble.png")';
cellElement.style.backgroundSize = 'cover';
const hueRotation = getHueRotationFromColor(color);
cellElement.style.filter = `hue-rotate(${hueRotation}deg)`;
Expand Down Expand Up @@ -297,7 +297,7 @@ function dragStart(e) {
shape.forEach((row, rowIndex) => {
row.forEach((cell, colIndex) => {
const cellElement = document.createElement('div');
cellElement.style.backgroundImage = cell ? 'url("./bubble.png")' : 'transparent';
cellElement.style.backgroundImage = cell ? 'url("./public/bubble.png")' : 'transparent';
cellElement.style.backgroundSize = 'cover';
console.log('a', color);
const hueRotation = getHueRotationFromColor(color);
Expand Down Expand Up @@ -516,7 +516,7 @@ function placePiece(pieceShape, targetIndex, gridSize, color) {
const cellIndex = (targetRow + row) * gridSize + (targetCol + col);
const cell = document.querySelector(`.grid-cell[data-index="${cellIndex}"]`);
if (cell) {
cell.style.backgroundImage = 'url("./bubble.png")';
cell.style.backgroundImage = 'url("./public/bubble.png")';
cell.style.backgroundSize = 'cover';
const hueRotation = getHueRotationFromColor(color);
cell.style.filter = `hue-rotate(${hueRotation}deg)`;
Expand Down

0 comments on commit b3659a7

Please sign in to comment.