Skip to content

Commit c1183ef

Browse files
committed
Fix safari logging error
1 parent cfd3eea commit c1183ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scatter.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,25 +400,30 @@ Scatter.prototype.update = function (...args) {
400400

401401
// buffer for filtered markers
402402
selectionBuffer: regl.buffer({
403+
data: new Uint8Array(0),
403404
usage: 'stream',
404405
type: 'uint8'
405406
}),
406407

407408
// buffers with data: it is faster to switch them per-pass
408409
// than provide one congregate buffer
409410
sizeBuffer: regl.buffer({
411+
data: new Uint8Array(0),
410412
usage: 'dynamic',
411413
type: 'uint8'
412414
}),
413415
colorBuffer: regl.buffer({
416+
data: new Uint8Array(0),
414417
usage: 'dynamic',
415418
type: 'uint8'
416419
}),
417420
positionBuffer: regl.buffer({
421+
data: new Uint8Array(0),
418422
usage: 'dynamic',
419423
type: 'float'
420424
}),
421425
positionFractBuffer: regl.buffer({
426+
data: new Uint8Array(0),
422427
usage: 'dynamic',
423428
type: 'float'
424429
})
@@ -536,7 +541,6 @@ Scatter.prototype.update = function (...args) {
536541

537542
// build cluster tree if required
538543
if (snap && (snap === true || count > snap)) {
539-
console.log('yai')
540544
group.tree = cluster(positions, { bounds })
541545
}
542546
// existing tree instance
@@ -717,7 +721,7 @@ Scatter.prototype.update = function (...args) {
717721
}
718722

719723
colorBuffer({
720-
data: colors,
724+
data: colors || new Uint8Array(0),
721725
type: 'uint8',
722726
usage: 'dynamic'
723727
})

0 commit comments

Comments
 (0)