mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-12 23:23:20 +00:00
Add randomize
This commit is contained in:
parent
5aa524cff8
commit
9b42a0796b
@ -1,11 +1,28 @@
|
||||
Vue.component("blob-snow", {
|
||||
methods: {
|
||||
text() {
|
||||
LEN = 23;
|
||||
START = "\uE010";
|
||||
START_HEX = START.codePointAt(0) || 65;
|
||||
const BLOBS = [];
|
||||
for (i = 0; i < LEN; i++) {
|
||||
char = String.fromCharCode(START_HEX + i);
|
||||
BLOBS.push(char);
|
||||
}
|
||||
|
||||
return `${BLOBS[Math.floor(Math.random() * BLOBS.length)]}`;
|
||||
}
|
||||
},
|
||||
|
||||
template: `
|
||||
<div class="snowflakes" aria-hidden="true">
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake"></div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
<div class="snowflake">{{ text() }}</div>
|
||||
</div>` });
|
@ -85,7 +85,7 @@
|
||||
-ms-user-select: none;
|
||||
user-select:none; cursor:default;
|
||||
-webkit-animation-name: snowflakes-fall, snowflakes-shake;
|
||||
-webkit-animation-duration: 10s, 3s;
|
||||
-webkit-animation-duration: 15s, 5s;
|
||||
-webkit-animation-timing-function: linear, ease-in-out;
|
||||
-webkit-animation-iteration-count: infinite, infinite;
|
||||
-webkit-animation-play-state: running, running;
|
||||
|
Loading…
Reference in New Issue
Block a user