diff --git a/docs/assets/js/constants.js b/docs/assets/js/constants.js index d9c73f2..e3fd9cb 100644 --- a/docs/assets/js/constants.js +++ b/docs/assets/js/constants.js @@ -12,6 +12,7 @@ var constants = { bg_color: "#242424", text_color: "#ffffff", canvas_border: "rgb(63, 63, 63)", + canvas_bg: "darkslategray", loading_animation_color: "#ff4136" }, diff --git a/docs/assets/js/player/lifeFunctions.js b/docs/assets/js/player/lifeFunctions.js index e569fc1..81f8a8f 100644 --- a/docs/assets/js/player/lifeFunctions.js +++ b/docs/assets/js/player/lifeFunctions.js @@ -69,4 +69,7 @@ function heartbeat() { pressure = 100; } heartBeat = true; + + // Play the heartbeat sound + soundAssets.heartbeat.play(); }; \ No newline at end of file diff --git a/docs/assets/js/sounds/sounds.js b/docs/assets/js/sounds/sounds.js index f513783..af498c8 100644 --- a/docs/assets/js/sounds/sounds.js +++ b/docs/assets/js/sounds/sounds.js @@ -18,7 +18,8 @@ let soundAssetMap = { "footstep3":"./assets/sounds/footsteps/footstep3.mp3", "footstep4":"./assets/sounds/footsteps/footstep4.mp3", "footstep5":"./assets/sounds/footsteps/footstep5.mp3", - "footstep6":"./assets/sounds/footsteps/footstep6.mp3" + "footstep6":"./assets/sounds/footsteps/footstep6.mp3", + "heartbeat":"./assets/sounds/heartbeat.mp3" } // All available sounds @@ -29,7 +30,8 @@ let soundAssets = { footstep3: new SoundSnippet("footstep3", audioAssetType.sfx), footstep4: new SoundSnippet("footstep4", audioAssetType.sfx), footstep5: new SoundSnippet("footstep5", audioAssetType.sfx), - footstep6: new SoundSnippet("footstep6", audioAssetType.sfx) + footstep6: new SoundSnippet("footstep6", audioAssetType.sfx), + heartbeat: new SoundSnippet("heartbeat", audioAssetType.sfx) } /** diff --git a/docs/assets/sounds/heartbeat.mp3 b/docs/assets/sounds/heartbeat.mp3 new file mode 100644 index 0000000..08c13cb Binary files /dev/null and b/docs/assets/sounds/heartbeat.mp3 differ diff --git a/docs/index.html b/docs/index.html index badf7e9..9dc0328 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,7 @@ margin:auto; border: 5px solid var(--theme-webpage-canvas_border); border-radius: 10px; - background-color: darkslategray; + background-color: var(--theme-webpage-canvas_bg); }