diff --git a/package-lock.json b/package-lock.json index 44ace55..28d3c21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -326,6 +326,11 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "howler": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.1.tgz", + "integrity": "sha512-0iIXvuBO/81CcrQ/HSSweYmbT50fT2mIc9XMFb+kxIfk2pW/iKzDbX1n3fZmDXMEIpYvyyfrB+gXwPYSDqUxIQ==" + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", diff --git a/package.json b/package.json index d93ee8b..85ac154 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "svelte": "^3.0.0" }, "dependencies": { + "howler": "^2.2.1", "sirv-cli": "^1.0.0" } } diff --git a/public/sound/thought_patterns.m4a b/public/sound/thought_patterns.m4a new file mode 100644 index 0000000..dc71ec8 Binary files /dev/null and b/public/sound/thought_patterns.m4a differ diff --git a/public/sprite/backg.xcf b/public/sprite/backg.xcf index 1a72812..ebed5c1 100644 Binary files a/public/sprite/backg.xcf and b/public/sprite/backg.xcf differ diff --git a/public/sprite/fin_backg.png b/public/sprite/fin_backg.png index e8346f2..495f9cd 100644 Binary files a/public/sprite/fin_backg.png and b/public/sprite/fin_backg.png differ diff --git a/src/App.svelte b/src/App.svelte index cb26a03..20af452 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,5 +1,6 @@ diff --git a/src/pages/button.svelte b/src/pages/button.svelte index 0a32c0d..fa5eb4f 100644 --- a/src/pages/button.svelte +++ b/src/pages/button.svelte @@ -1,8 +1,9 @@ - + @@ -19,15 +20,16 @@ text-align: center; background-position-x: center; cursor: pointer; - opacity: 0.7; + opacity: 0.8; margin-top: 15px; margin-bottom: 15px; transition: opacity .3s, margin .3s, transform .3s; } - .button:first-child:hover, .button:first-child:focus { + .button:first-child:hover, .button:first-child:focus, .button:first-child.active { margin-top: 15px; } - .button:hover, .button:focus { + .button:hover, .button:focus, .button.active { + outline: none; opacity: 1; margin-top: 5px; margin-bottom: 5px; diff --git a/src/pages/dialog.svelte b/src/pages/dialog.svelte index 63a8441..575636c 100644 --- a/src/pages/dialog.svelte +++ b/src/pages/dialog.svelte @@ -1,6 +1,7 @@ + + @@ -24,12 +79,17 @@ import Button from "./button.svelte"; {character.name}, {character.title} - {d.text} - - {#each d.buttons as button} - {button.text} - {/each} + {d.text} + + {#if d.buttons} + {#each d.buttons as button, i} + select(i)}>{button.text} + {/each} + {/if} + {#if success} + SUCCESS + {/if} @@ -50,12 +110,74 @@ import Button from "./button.svelte"; text-align: center; letter-spacing: 2px; } + h2 { + position: relative; + width: 400px; + color: white; + font-size: 70px; + letter-spacing: 12px; + text-align: center; + margin: 15px auto; + text-shadow: 0 0 6px white; + } + h2::before, h2::after { + position: absolute; + content: ""; + background: white; + box-shadow: 0 0 15px white; + border-radius: 50%; + top: 50%; + transform: translateY(-50%); + } + h2::before { + animation: successLeft .4s; + animation-timing-function: ease-out; + } + h2::after { + animation: successRight .4s; + animation-timing-function: ease-out; + } + @keyframes successLeft { + 0% { + left: 50%; + width: 100px; + height: 10px; + } + 100% { + left: -60px; + width: 50px; + height: 2px; + } + } + @keyframes successRight { + 0% { + right: 50%; + width: 100px; + height: 10px; + } + 100% { + right: -60px; + width: 50px; + height: 2px; + } + } p { margin: 0; text-align: center; font-size: 25px; font-weight: 600; } + .animate { + animation: appear .3s; + } + @keyframes appear { + from { + transform: scale(0.7); + } + to { + transform: scale(1); + } + } .text { max-width: 700px; margin: 0 auto;
{d.text}