canvas-cave-path

1.0.1 • Public • Published

canvas-cave-path

NPM Version

Draw cave walls along a path in a html canvas.

Installation

npm install canvas-cave-path

Example

var cave = require('canvas-cave-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'
 
cave(ctx, [ [0, 0]
           , [200, 0]
           , [250, 100]
           , [250, 200]
           ])

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 1.0.0
    0

Package Sidebar

Install

npm i canvas-cave-path

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • keis