Colors
This commit is contained in:
parent
1bf0a97daa
commit
b7d2f1ab0e
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas {
|
canvas {
|
||||||
background: #f00;
|
background: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
body > div {
|
body > div {
|
||||||
|
@ -123,10 +123,10 @@
|
||||||
<button onclick="connect()">Connect</button>
|
<button onclick="connect()">Connect</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="map border"></div>
|
<div class="map border"></div>
|
||||||
<div class="border data" id="data_al"></div>
|
<div class="border data" id="data_al" data-color="#FFBF00"></div>
|
||||||
<div class="border data" id="data_sp"></div>
|
<div class="border data" id="data_sp" data-color="#00C600"></div>
|
||||||
<div class="border data" id="data_ps"></div>
|
<div class="border data" id="data_ps" data-color="#C100C1"></div>
|
||||||
<div class="border data" id="data_hp"></div>
|
<div class="border data" id="data_hp" data-color="#0000D3"></div>
|
||||||
<div class="console border">
|
<div class="console border">
|
||||||
<pre id="stdout"></pre>
|
<pre id="stdout"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -148,25 +148,25 @@
|
||||||
|
|
||||||
let graph;
|
let graph;
|
||||||
if (true) // Use moving 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
|
else
|
||||||
graph = new Graph(canvas, "#FFBF00", 100);
|
graph = new Graph(canvas, dataContainers[i].dataset["color"], 100);
|
||||||
|
|
||||||
graph.smooth = true; // Can change on fly
|
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++) {
|
for (let v = 0; v < amount; v++) {
|
||||||
graph.add( Math.random() * 100 );
|
graph.add( Math.random() * 100 );
|
||||||
}
|
}
|
||||||
graph.draw();
|
graph.draw();
|
||||||
a = graph;
|
//a = graph;
|
||||||
|
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
graph.add( Math.random() * 100 );
|
graph.add( Math.random() * 100 );
|
||||||
graph.draw();
|
graph.draw();
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
function* buffer2HexArray(buff, start = 0, end = buff.byteLength) {
|
function* buffer2HexArray(buff, start = 0, end = buff.byteLength) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user