gl-scatter2d-sdf

Fancy and slow scatter plots

Usage no npm install needed!

<script type="module">
  import glScatter2dSdf from 'https://cdn.skypack.dev/gl-scatter2d-sdf';
</script>

README

gl-scatter2d-sdf

This code is similar to gl-scatter2d-fancy, but utilizes SDF technique to render symbols.

const createPlot = require('gl-plot2d')
const createScatter = require('gl-scatter2d-fancy')

let plot = createPlot({gl, ...})

let scatter = createScatter(plot, {
    positions:    [.5,.5, .6,.7, ...],
    sizes:        [2, 3, ...],
    colors:       [0,0,0,1, .5,.5,1,1, ...],
    glyphs:       ['x', 'y', ...],
    borderWidths: [.5, 1, ...],
    borderColors: [1,0,0,.5, 0,0,1,.5, ...]
})

plot.draw()

License

(c) 2016 Dima Yv. MIT License