Skip to content

Commit

Permalink
Fix safari logging error
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Apr 30, 2018
1 parent cfd3eea commit c1183ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,25 +400,30 @@ Scatter.prototype.update = function (...args) {

// buffer for filtered markers
selectionBuffer: regl.buffer({
data: new Uint8Array(0),
usage: 'stream',
type: 'uint8'
}),

// buffers with data: it is faster to switch them per-pass
// than provide one congregate buffer
sizeBuffer: regl.buffer({
data: new Uint8Array(0),
usage: 'dynamic',
type: 'uint8'
}),
colorBuffer: regl.buffer({
data: new Uint8Array(0),
usage: 'dynamic',
type: 'uint8'
}),
positionBuffer: regl.buffer({
data: new Uint8Array(0),
usage: 'dynamic',
type: 'float'
}),
positionFractBuffer: regl.buffer({
data: new Uint8Array(0),
usage: 'dynamic',
type: 'float'
})
Expand Down Expand Up @@ -536,7 +541,6 @@ Scatter.prototype.update = function (...args) {

// build cluster tree if required
if (snap && (snap === true || count > snap)) {
console.log('yai')
group.tree = cluster(positions, { bounds })
}
// existing tree instance
Expand Down Expand Up @@ -717,7 +721,7 @@ Scatter.prototype.update = function (...args) {
}

colorBuffer({
data: colors,
data: colors || new Uint8Array(0),
type: 'uint8',
usage: 'dynamic'
})
Expand Down

0 comments on commit c1183ef

Please sign in to comment.