1.1.0 • Published 7 years ago

dynn-fx v1.1.0

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

Dynn-fx

Promise based graphics utility-belt

Usage

Here a usage example using React.

import React from 'react'
import { render } from 'react-dom'
import {fromUrl as fx, grayscale, crop, mirror, rotate, texturize} from 'dynn-fx'
import {baseImage, textureImage} from './image_urls'

const modifiedImage = fx(baseImage)
  .then(grayscale) // make image black / white
  .then(crop({x: 25, y:25, w: 50, h:50})) // take center from image
  .then(mirror) // mirror image
  .then(rotate) // rotate image 90degree to the right
  .then(texturize(textureImage)) // blend texture pattern into the image

// let's make a view for our new image
const App = image => <img src={image} alt='dynn-fx' />

// now render our freshly modified image
const whenAppIsReady = modifiedImage.then(App)

whenAppIsReady.then(app => render(app, document.getElementById('some-dom-el')))

Contributors

Uses

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago