@@ -400,25 +400,30 @@ Scatter.prototype.update = function (...args) {
400
400
401
401
// buffer for filtered markers
402
402
selectionBuffer : regl . buffer ( {
403
+ data : new Uint8Array ( 0 ) ,
403
404
usage : 'stream' ,
404
405
type : 'uint8'
405
406
} ) ,
406
407
407
408
// buffers with data: it is faster to switch them per-pass
408
409
// than provide one congregate buffer
409
410
sizeBuffer : regl . buffer ( {
411
+ data : new Uint8Array ( 0 ) ,
410
412
usage : 'dynamic' ,
411
413
type : 'uint8'
412
414
} ) ,
413
415
colorBuffer : regl . buffer ( {
416
+ data : new Uint8Array ( 0 ) ,
414
417
usage : 'dynamic' ,
415
418
type : 'uint8'
416
419
} ) ,
417
420
positionBuffer : regl . buffer ( {
421
+ data : new Uint8Array ( 0 ) ,
418
422
usage : 'dynamic' ,
419
423
type : 'float'
420
424
} ) ,
421
425
positionFractBuffer : regl . buffer ( {
426
+ data : new Uint8Array ( 0 ) ,
422
427
usage : 'dynamic' ,
423
428
type : 'float'
424
429
} )
@@ -536,7 +541,6 @@ Scatter.prototype.update = function (...args) {
536
541
537
542
// build cluster tree if required
538
543
if ( snap && ( snap === true || count > snap ) ) {
539
- console . log ( 'yai' )
540
544
group . tree = cluster ( positions , { bounds } )
541
545
}
542
546
// existing tree instance
@@ -717,7 +721,7 @@ Scatter.prototype.update = function (...args) {
717
721
}
718
722
719
723
colorBuffer ( {
720
- data : colors ,
724
+ data : colors || new Uint8Array ( 0 ) ,
721
725
type : 'uint8' ,
722
726
usage : 'dynamic'
723
727
} )
0 commit comments