File size: 2,414 Bytes
c140ae3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
<!-- static/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D Spacetime Fluid Simulator</title>
    <link rel="stylesheet" href="/static/styles.css">
</head>
<body>
    <div id="container">
        <div id="controls">
            <h1>3D Spacetime Fluid Simulator</h1>
            <p>Adjust the masses and positions of the spheres, then click "Start Simulation".</p>
            <div class="sphere-controls">
                <h3>Brown Sphere</h3>
                <label>Mass: <input type="range" id="brown-mass" min="10" max="100" value="92"></label>
                <label>X: <input type="range" id="brown-x" min="-10" max="10" value="0"></label>
                <label>Y: <input type="range" id="brown-y" min="-10" max="10" value="0"></label>
                <label>Z: <input type="range" id="brown-z" min="-10" max="10" value="0"></label>
            </div>
            <div class="sphere-controls">
                <h3>Green Sphere</h3>
                <label>Mass: <input type="range" id="green-mass" min="10" max="100" value="29"></label>
                <label>X: <input type="range" id="green-x" min="-10" max="10" value="5"></label>
                <label>Y: <input type="range" id="green-y" min="-10" max="10" value="0"></label>
                <label>Z: <input type="range" id="green-z" min="-10" max="10" value="5"></label>
            </div>
            <div class="sphere-controls">
                <h3>Red Sphere</h3>
                <label>Mass: <input type="range" id="red-mass" min="10" max="100" value="10"></label>
                <label>X: <input type="range" id="red-x" min="-10" max="10" value="-5"></label>
                <label>Y: <input type="range" id="red-y" min="-10" max="10" value="0"></label>
                <label>Z: <input type="range" id="red-z" min="-10" max="10" value="-5"></label>
            </div>
            <button id="start-btn">Start Simulation</button>
            <button id="reset-btn">Reset Simulation</button>
        </div>
        <div id="scene-container"></div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
    <script src="/static/script.js"></script>
</body>
</html>