This commit is contained in:
Emily 2019-08-21 08:02:04 +02:00
parent 1bf0a97daa
commit b7d2f1ab0e

View File

@ -27,7 +27,7 @@
}
canvas {
background: #f00;
background: #000;
}
body > div {
@ -123,10 +123,10 @@
<button onclick="connect()">Connect</button>
</div>
<div class="map border"></div>
<div class="border data" id="data_al"></div>
<div class="border data" id="data_sp"></div>
<div class="border data" id="data_ps"></div>
<div class="border data" id="data_hp"></div>
<div class="border data" id="data_al" data-color="#FFBF00"></div>
<div class="border data" id="data_sp" data-color="#00C600"></div>
<div class="border data" id="data_ps" data-color="#C100C1"></div>
<div class="border data" id="data_hp" data-color="#0000D3"></div>
<div class="console border">
<pre id="stdout"></pre>
</div>
@ -148,25 +148,25 @@
let graph;
if (true) // Use moving graph
graph = new MovingGraph(canvas, "#FFBF00", 100, 64, Float32Array);
graph = new MovingGraph(canvas, dataContainers[i].dataset["color"], 100, 64, Float32Array);
else
graph = new Graph(canvas, "#FFBF00", 100);
graph = new Graph(canvas, dataContainers[i].dataset["color"], 100);
graph.smooth = true; // Can change on fly
let amount = Math.random() * graph.bufferLength * 1.4;
let amount = Math.random() * graph.getLength() * 1.4;
for (let v = 0; v < amount; v++) {
graph.add( Math.random() * 100 );
}
graph.draw();
a = graph;
//a = graph;
setInterval(function(){
graph.add( Math.random() * 100 );
graph.draw();
}, 100);
break;
//break;
}
function* buffer2HexArray(buff, start = 0, end = buff.byteLength) {