ease-preview
v1.0.3
Published
This module will create a canvas element which can be used to visualize easing equations
Maintainers
Readme
ease-preview
This module will create a canvas element which can be used to visualize easing equations. Example output:

Usage
var canvas = require('ease-preview)(easefunc, [opts])
Pass in an an ease function you'd like to preview the ease function should accept a value between 0-1 and return a value between 0-1 (the same format as the eases module).
ease-preview also accepts a second options object with the following options:
canvascanvas you'd like to render the ease equation into. If no canvas is supplied a new canvas will be created.widthwidth of the canvas element if no canvas element is passed. Default value200heightheight of the canvas element if no canvas element is passed. Default value200styleBackgroundthe fill style of the background. Default value'#FFF'styleEasethe stroke style of the ease line. Default value'#000'styleBoundarythe stroke style of the lines that indicate 0 and 1 on graphic. Default value'#CCC'widthEasethe stroke width of the ease line. Default value1widthBoundarythe stroke width of the boundary lines. Default value1shouldRenderBoundarywhether boundary lines should be rendered. Default valuetrueboundarySizehow many pixels should be allocated to render beyond 0 and 1. Default value100
License
MIT, see LICENSE.md for details.

