๐Ÿ“ฆ sbuggay / boids

๐Ÿ“„ index.html ยท 65 lines
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65<html>

<head>
    <style>
        body {
            padding: 0;
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            width: 100%;
            height: 100%;
            background: black;
            color: white;
        }

        #sketch {
            margin: 0 auto;
            width: 100vw;
            height: 100vw;
            max-height: 800px;
            max-width: 800px;
        }

        #info {
            margin: 4px auto;
            width: 100vw;
            max-width: 800px;
        }

        canvas {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            -o-user-select: none;
            user-select: none;
        }
    </style>

</head>

<body>
    <div>
        <div id="sketch">
        </div>
        <div id="info">

            <div>
                Press R to reset.
            </div>
            <div>
                Press D to cycle through debug modes. <button id="debugButton">debug</button>
            </div>
            <div>
                Use mouseclick to give boids a target.
            </div>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/p5"></script>
    <script src="boid.js"></script>
    <script src="quadtree.js"></script>
    <script src="script.js"></script>
</body>

</html>