1.0.0 • Published 7 years ago

smoke-element v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

smoke-element Build Status

Make smoke over an element

Install

$ npm install --save smoke-element

Usage

demo

You can run this demo directly:

npm start
var smokeElement = require('smoke-element')
var target = document.createElement('div')

var smoke = smokeElement({element: target})

// start the smoke
smoke.start()

// stop generating new smoke in a second
setTimeout(() => smoke.stop(), 1000)

API

smokeElement(options) -> smoke

options
element

Required
Type: HTMLElement

An element to emit smoke from.

colors

Type: array[number]
Default: [0, 0, 0]

RGB color values for the smoke. Defaults to black.

See Also

  • smoke.js: <canvas> smoke generation was adapted from the demo with rewritten state management and drawing methods
  • eaze-menu-fire: A Chrome extension that uses this library for an easter egg

License

MIT © Ben Drucker

1.0.0

7 years ago