JSPM

tweening-color-middleware

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q39835F
  • License ISC

Color middleware for tweening

Package Exports

  • tweening-color-middleware

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 (tweening-color-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Tweening color middleware

Color middleware for tweening.

1.1kb gzipped.

Usage

Currently supports hex, rgb and rgba colors:

import tween from 'tweening';
import colorMiddleware from 'tweening-color-middleware';

tween({
  from: '#000',
  to: '#F0F0F0',
  duration: 5000,
  middleware: [ colorMiddleware ],
  next: color => console.log( color ),
});

CommonJS

This is how you get to the good stuff if you're using require.

const TweeningColorMiddleware = require( 'tweening-color-middleware' );
const colorMiddleware = TweeningColorMiddleware.default;

UMD

And if you just want to smash in a Javascript file you're also covered. Drop this in place ...

https://npmcdn.com/tweening-color-middleware@1.2.0/dist/tweening-color-middleware.min.js

Then access it on the TweeningColorMiddleware global variable.

const colorMiddleware = TweeningColorMiddleware.default;

Help make this better

Issues and pull requests gratefully received!

I'm also on twitter @colinmeinke.

Thanks 🌟

License

ISC.