JSPM

ctx-blur

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q41603F
  • License ISC

Applies a blur filter to a canvas

Package Exports

  • ctx-blur

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ctx-blur) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ctx-blur

Applies a blur filter to a canvas

Build Status js-standard-style npm version Coverage Status

Usage

var transform = cBlur(options)

  • options (object) - Options for blurring:

    • radius {number} - guassian blur radius
  • returns (function) transform - A function that accepts a canvas and returns it blurred

Examples

javascript (browser)

const cBlur = require('ctx-blur')

var canvas = document.getElementById('aCanvas')

cBlur({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
  ...
})

Node.js

const cBlur = require('ctx-blur')

var Canvas = require('canvas')
var canvas = new Canvas()

cIdentity({ sigma: 2, radius: 2 })(canvas, function (err, newCanvas) {
  ...
})