generating random data at initialization not necessary

This commit is contained in:
Colin Megill
2018-04-18 00:31:20 -07:00
parent ba2c3f4dfa
commit ef199a9e93

View File

@@ -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 */
}
})