JSPM

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

SVG Shape Morphing Plugin for es6-tween

Package Exports

  • es6tween-plugin-morph

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

Readme

es6-tween-plugin-morph

size gzipsize

Morph plug-in for ES6 tween

Usage

import { Tween } from 'es6-tween';
import 'es6-tween-plugin-morph';

let tween = new Tween(document.querySelector('#myPath'), {morph:{shape:'#circleSVGShape'}).to({morph:{shape:'#rectSVGShape'}}, 2000).start();

Config

  • shape: Any - If want to use reverse/moveIndex, you should shape
  • reverse: Boolean - Reverses the path if your want change naturality
  • moveIndex: Number - Changes the index of points to make better/worse naturality
  • approximate: Boolean - Requires flubber library and makes animation a lot better