From ef199a9e930129a9c5b13894e4a034ca9e71dfa1 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Wed, 18 Apr 2018 00:31:20 -0700 Subject: [PATCH] generating random data at initialization not necessary --- src/components/graph/graph.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/graph/graph.js b/src/components/graph/graph.js index 2104ec30..58d4d25e 100644 --- a/src/components/graph/graph.js +++ b/src/components/graph/graph.js @@ -69,9 +69,9 @@ class Graph extends React.Component { const drawPoints = _drawPoints(regl) // preallocate buffers - const pointBuffer = regl.buffer(generatePoints(count)) - const colorBuffer = regl.buffer(generateColors(count)) - const sizeBuffer = regl.buffer(generateSizes(count)) + const pointBuffer = regl.buffer(); + const colorBuffer = regl.buffer(); + const sizeBuffer = regl.buffer(); regl.frame(({viewportWidth, viewportHeight}) => { @@ -164,9 +164,7 @@ class Graph extends React.Component { scaleRGB(parseInt(parsedHex[3], 16)) ]); } - sizes.push(cell["__selected__"] ? 4 : .2) /* make this a function of the number of total cells, including regraph */ - } })