gl-scatter2d-sdf

1.3.11 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gl-scatter2d-sdf

Weekly Downloads

71

Version

1.3.11

License

MIT

Last publish

Collaborators

  • farkites
  • ndrezner
  • lconnors
  • alexshoe
  • t4rk
  • bronsolo
  • jmmease
  • chriddyp
  • bpostlethwaite
  • alexcjohnson
  • nicolaskruchten
  • antrg
  • archmoj
  • xhlu
  • hammadtheone
  • dfcreative
  • etpinard