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
+3 -5
View File
@@ -69,9 +69,9 @@ class Graph extends React.Component {
const drawPoints = _drawPoints(regl) const drawPoints = _drawPoints(regl)
// preallocate buffers // preallocate buffers
const pointBuffer = regl.buffer(generatePoints(count)) const pointBuffer = regl.buffer();
const colorBuffer = regl.buffer(generateColors(count)) const colorBuffer = regl.buffer();
const sizeBuffer = regl.buffer(generateSizes(count)) const sizeBuffer = regl.buffer();
regl.frame(({viewportWidth, viewportHeight}) => { regl.frame(({viewportWidth, viewportHeight}) => {
@@ -164,9 +164,7 @@ class Graph extends React.Component {
scaleRGB(parseInt(parsedHex[3], 16)) scaleRGB(parseInt(parsedHex[3], 16))
]); ]);
} }
sizes.push(cell["__selected__"] ? 4 : .2) /* make this a function of the number of total cells, including regraph */ sizes.push(cell["__selected__"] ? 4 : .2) /* make this a function of the number of total cells, including regraph */
} }
}) })