0.0.6 • Published 4 years ago

@kissmybutton/motorcortex-polymorph v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

motorcortex-polymorph

Demo

Check it out here

Installation

$ npm install --save @kissmybutton/motorcortex-polymorph
# OR
$ yarn add @kissmybutton/motorcortex-polymorph

Loading

import MotorCortex from "@kissmybutton/motorcortex/"
import polymorphDefinition from "@kissmybutton/motorcortex-polymorph"
const Plugin = MotorCortex.loadPlugin(polymorphDefinition);

Create incident

Polymorph

const polymorph = new Plugin.Polymorph(
  {
    animatedAttrs: {
      d: `M209 289h-4c-4-8.4-5.8-8.8-13.5-3.9-2.4 1.5-5 2.6-7.5 11.4z`,
    },
    addPoints: 100,
    originX: 0,
    originY: 0,
    precision: 0,
  },
  {
    selector: "#poly",
    duration: 1000,
  }
);

Polymorph Attrs

NameAreValues
dsvg pathsting
addPointsAdds additional points to each side of the tween over what is requirednum
originXIs values between 0 and 1 representing 0% to 100% of the bounding box of the path.num
originYIs values between 0 and 1 representing 0% to 100% of the bounding box of the path.num
precisionThe number of decimal places to use when rendering pathsnum
0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago