music: change bg text function scope
This commit is contained in:
parent
62ba9dceff
commit
fd2b768475
1 changed files with 18 additions and 15 deletions
|
|
@ -5,8 +5,10 @@
|
||||||
</cute-container>
|
</cute-container>
|
||||||
</music>
|
</music>
|
||||||
<script>
|
<script>
|
||||||
|
(function () {
|
||||||
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
const container = document.getElementById("bg-text");
|
const container = document.getElementById("bg-text");
|
||||||
|
if (!container) return;
|
||||||
const colWidth = 20;
|
const colWidth = 20;
|
||||||
const rowHeight = 24;
|
const rowHeight = 24;
|
||||||
const cols = Math.ceil(window.innerWidth / colWidth);
|
const cols = Math.ceil(window.innerWidth / colWidth);
|
||||||
|
|
@ -22,4 +24,5 @@
|
||||||
}
|
}
|
||||||
container.appendChild(col);
|
container.appendChild(col);
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue