feat: that's a lotta damage easter egg

This commit is contained in:
TrèsAbhi committed 2024-07-24 13:27:46 -05:00
1 parent b1c3453d38
commit 4f7b4f1602
2 files changed
+11 -1

No files matched your search

Binary file not shown.
@@ -43,7 +43,7 @@ export function ShotDisplay() {
let animationStartTime: number | null = null;
useEffect(() => {
if (shot && shot.splashRadius !== undefined) {
if (shot?.splashRadius !== undefined) {
const outlineGeometry = new BufferGeometry().setFromPoints(
new Path().absarc(0, 0, 1, 0, Math.PI * 2).getSpacedPoints(50),
);
@@ -65,6 +65,16 @@ export function ShotDisplay() {
}
});
useEffect(() => {
if (shot?.splashRadius !== undefined && shot.in.status === 'penetration') {
const audio = new Audio('/assets/audio/lotta-damage.mp3');
audio.currentTime = 0.7;
audio.volume = 0.25;
audio.play();
}
}, [shot]);
useFrame(({ clock }) => {
if (!shot) return;