html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Valentine's Day Code III</title>
<style>
body {
margin: 0;
background: #000 url('https://dl.dropbox.com/scl/fi/uzce4rf0gj0fymz9ofd9a/fe88d5a0-cdd5-4d33-8ac6-9ab17968d398.jpeg?rlkey=ypkg3tgsz76wtr0dax9241jkr&st=w2jcofk4&dl=1') no-repeat center center / cover;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
outline: none;
-webkit-tap-highlight-color: transparent;
}
canvas {
position: absolute;
left: 0;
width: 100vw;
background: transparent;
}
#particleCanvas {
top: 0;
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Audio
var url = 'https://dl.dropbox.com/scl/fi/o5lhtvmytwibiw4w66921/Duggy-Stay-In-Memories.mp3?rlkey=uslvct3flee24ecj3wy3a4g2s&st=gz4kksyc&dl=1';
window.AudioContext = window.AudioContext||window.webkitAudioContext; //fix up prefixing
var context = new AudioContext(); //context
var source = context.createBufferSource(); //source node
source.connect(context.destination); //connect source to speakers so we can hear it
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.responseType = 'arraybuffer'; //the response is an array of bits
request.onload = function() {
context.decodeAudioData(request.response, function(response) {
source.buffer = response;
source.start(0); //play audio immediately
source.loop = true;
}, function () { console.error('The request failed.'); } );
}
request.send();
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run