PIXI graphics function to generate a smooth line through specific points
https://davidfig.github.io/bezierpoints/
const bezierpoints = require('bezierpoints')
const renderer = PIXI.autoDetectRenderer(800, 600)
document.body.appendChild(renderer.view)
const g = new PIXI.Graphics()
g.lineStyle(10, 0xff0000)
bezierpoints(g, [53, 100, 90, 150, 180, 32, 250, 23])
renderer.render(g)
npm i bezierpoints
- {PIXI.Graphics} g
- {number[]|object[]} points [x1, y1, x2, y2, ...] or [{x, y}, {x, y}, ...]
MIT License
(c) 2017 YOPEY YOPEY LLC by David Figatner