diff --git a/src/components/Playing/End/Lost.tsx b/src/components/Playing/End/Lost.tsx index fee53ba..4993f75 100644 --- a/src/components/Playing/End/Lost.tsx +++ b/src/components/Playing/End/Lost.tsx @@ -1,22 +1,7 @@ import React from 'react' -import Confetti from 'react-confetti' - -var tweenFunctions = require('tween-functions') - const Lost: React.FunctionComponent = ()=> { return ( - { - context.font = '2rem serif' - context.textAlign = "center" - context.textBaseline = "middle"; - context.fillText('💩', 0, 0) - }} - /> +
) } diff --git a/src/components/Playing/End/Won.tsx b/src/components/Playing/End/Won.tsx index 227333e..d3b6e37 100644 --- a/src/components/Playing/End/Won.tsx +++ b/src/components/Playing/End/Won.tsx @@ -4,7 +4,6 @@ import Confetti from 'react-confetti' const Won: React.FunctionComponent = ()=> { return ( diff --git a/src/components/Playing/End/lost.svg b/src/components/Playing/End/lost.svg new file mode 100644 index 0000000..43e492d --- /dev/null +++ b/src/components/Playing/End/lost.svg @@ -0,0 +1,44 @@ + + + 💩 + + + + 💩 + + + + + 💩 + + + + 💩 + + + + diff --git a/src/index.css b/src/index.css index 92dc42d..a95fe6b 100644 --- a/src/index.css +++ b/src/index.css @@ -86,3 +86,25 @@ code { .error { color:red; } + +#lost{ + position: absolute; + top:0; + right:0; + left:0; + bottom:0; + + z-index: -1; + opacity: 0; + animation: fadeIn 3s forwards; + + background-image: url(./components/Playing/End/lost.svg); + background-repeat: repeat; + background-size: 50rem 50rem; + background-position: 0 0; +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 0.2; } +}