Add new MFM animation

This commit is contained in:
syuilo
2020-11-02 15:16:37 +09:00
parent 666c8c0498
commit 09cab605fc
5 changed files with 33 additions and 0 deletions

View File

@ -125,6 +125,12 @@ export default defineComponent({
}, genEl(token.children));
}
case 'twitch': {
return h('span', {
style: this.$store.state.device.animatedMfm ? 'display: inline-block; animation: anime-twitch 0.5s ease infinite;' : 'display: inline-block;'
}, genEl(token.children));
}
case 'url': {
return [h(MkUrl, {
key: Math.random(),

View File

@ -499,6 +499,21 @@ hr {
100% { transform: translateY(0); }
}
// const gen = () => `translate(${Math.floor(Math.random() * 24) - 12}px, ${Math.floor(Math.random() * 24) - 12}px)`
@keyframes anime-twitch {
0% { transform: translate(0px, -9px); }
10% { transform: translate(5px, -11px); }
20% { transform: translate(-12px, 2px); }
30% { transform: translate(10px, 4px); }
40% { transform: translate(0px, 9px); }
50% { transform: translate(-6px, 2px); }
60% { transform: translate(-7px, 7px); }
70% { transform: translate(14px, 7px); }
80% { transform: translate(-5px, 10px); }
90% { transform: translate(3px, -3px); }
100% { transform: translate(10px, 8px); }
}
@keyframes anime-tada {
from {
transform: scale3d(1, 1, 1);