-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcave.html
42 lines (34 loc) · 913 Bytes
/
cave.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>Plato's Quantum Cave</title>
<script>
let canvas, ctx, audioCtx, oscillator;
let particleCount = 0;
window.onload = function() {
canvas = document.createElement('canvas');
document.body.appendChild(canvas);
ctx = canvas.getContext('2d');
audioCtx = new (window.AudioContext || window.webkitAudioContext)();
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
};
function drawParticle(x, y, color, radius) {
// Existing code
}
function playSound(frequency, type) {
// Existing code
}
function generateField() {
// Existing code
}
</script>
</head>
<body>
<header>
<h1>Plato's Quantum Cave</h1>
</header>
<button onclick="generateField()">Generate Virtual Quantum Field</button>
<div id="count">Particles Generated: 0</div>
</body>
</html>