use piece for glint
This commit is contained in:
parent
2d687d5fcb
commit
57639b0c2a
4
app.js
4
app.js
@ -236,8 +236,8 @@ class Matrix extends MinoesTable {
|
||||
if (piece.locked) className += " locking"
|
||||
if (piece==this.piece && actionsQueue.length) className += " moving"
|
||||
super.drawPiece(piece, className)
|
||||
matrix.table.style.setProperty('--ghost-column', this.ghost.center.x)
|
||||
matrix.table.style.setProperty('--ghost-row', this.ghost.center.y)
|
||||
matrix.table.style.setProperty('--piece-column', this.piece.center.x)
|
||||
matrix.table.style.setProperty('--piece-row', this.piece.center.y)
|
||||
}
|
||||
|
||||
redraw() {
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
:root {
|
||||
--cell-side: 24px;
|
||||
}
|
||||
@ -18,8 +19,8 @@ body {
|
||||
}
|
||||
|
||||
.minoes-table {
|
||||
--ghost-row : 0;
|
||||
--ghost-column: 0;
|
||||
--piece-column: 0;
|
||||
--piece-row : 0;
|
||||
table-layout: fixed;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
|
@ -24,8 +24,8 @@ body {
|
||||
inset: 0;
|
||||
padding: 1px;
|
||||
border-radius: 0.3vmin;
|
||||
--glint-x: calc(50% + 50% * (var(--ghost-column) - var(--column))/10);
|
||||
--glint-y: calc(50% + 50% * (var(--ghost-row) - var(--row))/25);
|
||||
--glint-x: calc(50% + 50% * (var(--piece-column) - var(--column))/10);
|
||||
--glint-y: calc(50% + 50% * (var(--piece-row) - var(--row))/25);
|
||||
background: radial-gradient(
|
||||
at var(--glint-x) var(--glint-y),
|
||||
rgba(204, 238, 247, 0.9) 0%,
|
||||
|
Loading…
x
Reference in New Issue
Block a user