JSPM

maskew

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

Skew the shapes of elements without distorting their contents

Package Exports

  • maskew

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

Readme

Maskew

Maskew

Skew the shapes of elements without distorting their contents

Dan Motzenbecker, MIT License

@dcmotz

Features

  • < 5k
  • mobile friendly
  • no dependencies
  • optional jQuery plugin

Demos

Usage

Use it:

var maskew = new Maskew(document.getElementById('skew-me'), angle)

// or

var maskew = new Maskew('#skew-me', angle)

With jQuery:

var $maskew = $('#skew-me').maskew(angle)

Add some touch:

// from the start:

var touchMe = new Maskew(document.getElementById('skew-me'), angle, {
  touch: true
})

// or:

maskew.setTouch(true)

// disable touch:

maskew.setTouch(false)