canvas-arrow-path

1.0.1 • Public • Published

canvas-arrow-path

NPM Version

Draw arrows along a path in a html canvas.

Installation

npm install canvas-arrow-path

Example

var arrow = require('canvas-arrow-path')
  , canvas = document.getElementById('my-canvas')
  , ctx = canvas.getContext('2d')
 
ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.translate(200, 200)
 
ctx.lineWidth = 2
ctx.strokeStyle = 'red'
 
arrow(ctx, [ [0, 0]
           , [200, 0]
           , [250, 100]
           , [250, 200]
           ])

/canvas-arrow-path/

    Package Sidebar

    Install

    npm i canvas-arrow-path

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • keis