diff --git a/package.json b/package.json
index a9c4526..8e9a0ef 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
},
"type": "module",
"dependencies": {
+ "@fireworks-js/svelte": "^2.10.7",
"@joeattardi/emoji-button": "^4.6.4",
"uuid": "^9.0.0",
"ws": "^8.13.0"
diff --git a/src/components/FireworkShow.svelte b/src/components/FireworkShow.svelte
deleted file mode 100644
index 3846491..0000000
--- a/src/components/FireworkShow.svelte
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
- {#each $rockets as rocket (rocket.id)}
-
- {/each}
-
\ No newline at end of file
diff --git a/src/routes/estimation/[roomId]/+page.svelte b/src/routes/estimation/[roomId]/+page.svelte
index 192b269..446dce5 100644
--- a/src/routes/estimation/[roomId]/+page.svelte
+++ b/src/routes/estimation/[roomId]/+page.svelte
@@ -36,7 +36,7 @@
import EstimateGroupsList from '../../../components/EstimateGroupsList.svelte';
import Modal from '../../../components/Modal.svelte';
import Estimates from '../../../components/Estimates.svelte';
- import FireworkShow from '../../../components/FireworkShow.svelte';
+ import Fireworks, { type FireworksOptions } from '@fireworks-js/svelte';
import { connectToWebSocket, sendMessage, generateId } from '../estimation.js';
@@ -90,9 +90,24 @@
let showEstimates = false;
let disableEstimates: boolean = false;
let audioElement;
- let fireworks;
- let selectedCardSet;
let showFireworks = false;
+ let fireworks: Fireworks
+ let fireworkOptions: FireworksOptions = {
+ opacity: 0.5,
+ sound: {
+ enabled: true,
+ files: [
+ '/sounds/explosion0.mp3',
+ '/sounds/explosion1.mp3',
+ '/sounds/explosion2.mp3'
+ ],
+ volume: {
+ min: 4,
+ max: 8
+ }
+ }
+ }
+ let selectedCardSet;
function closeModal() {
showModal = false;
@@ -180,16 +195,11 @@
} else if (message.type === 'estimation-closed') {
estimateGroups = message.groupedEstimates;
showFireworks = areEstimatesSame(estimateGroups);
- if (showFireworks) {
- fireworks.play();
- }
showRestartButton = true;
showEstimates = true;
disableEstimates = true;
} else if (message.type === 'estimation-restarted') {
showFireworks = false;
- fireworks.pause();
- fireworks.currentTime = 0;
estimateGroups = {};
showRestartButton = false;
showEstimates = false;
@@ -265,11 +275,12 @@
{/if}
{#if showFireworks}
-
+
+
+
{/if}
-
{#if showTooltip && newChanges.length > 0}
@@ -376,4 +387,13 @@
#tooltip-container ul li {
text-indent: -10px;
}
+
+ .launch-pad {
+ position: fixed;
+ top: 0;
+ z-index: -1;
+ pointer-events: none;
+ left: 0;
+ right: 0;
+ }
diff --git a/static/fireworks.mp3 b/static/fireworks.mp3
deleted file mode 100644
index 33af969..0000000
Binary files a/static/fireworks.mp3 and /dev/null differ
diff --git a/static/sounds/explosion0.mp3 b/static/sounds/explosion0.mp3
new file mode 100644
index 0000000..bc1af2a
Binary files /dev/null and b/static/sounds/explosion0.mp3 differ
diff --git a/static/sounds/explosion1.mp3 b/static/sounds/explosion1.mp3
new file mode 100644
index 0000000..574246c
Binary files /dev/null and b/static/sounds/explosion1.mp3 differ
diff --git a/static/sounds/explosion2.mp3 b/static/sounds/explosion2.mp3
new file mode 100644
index 0000000..58a8e49
Binary files /dev/null and b/static/sounds/explosion2.mp3 differ