Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaps are ignored when in-between flat segments #43

Closed
etpinard opened this issue Feb 19, 2019 · 0 comments · Fixed by dy/array-normalize#1 or #46
Closed

Gaps are ignored when in-between flat segments #43

etpinard opened this issue Feb 19, 2019 · 0 comments · Fixed by dy/array-normalize#1 or #46

Comments

@etpinard
Copy link
Member

Consider

let regl = require('regl')({extensions: 'angle_instanced_arrays'})
let line2d = require('./')(regl)

const arr1 = [0, 1, 1, NaN, 2, 1, 3, 2]
const arr2 = [0, 3, 1, NaN, 2, 3, 3, 3]

const rng = [-1, -1, 4, 4]
const vp = [80, 80, 556, 350]

line2d.render({ thickness: 4, points: arr1, color: 'red', viewport: vp, range: rng, join: 'rect', overlay: true })
line2d.render({ thickness: 4, points: arr2, color: 'blue', viewport: vp, range: rng, join: 'rect', overlay: true })

which results in

image

where the gap in the blue trace at the 2nd (x,y) position is missing.


plotly.js example in -> plotly/plotly.js#3551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant