npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

anim8js-dom

v1.0.17

Published

anim8 your HTML elements

Downloads

24

Readme

anim8js

anim8 your HTML elements

anim8js-dom modifies the animation definition and animator functions to include units. Any unit that the property supports in CSS is usable in anim8js - and can handle converting between different units. You can even animate between values with different units. The following functions have changed:

  • Animator.set( attrs ) can set values with units like 12px or 10%
  • Animator.get( attrs ) you can specify what unit you want an attribute to be returned in
  • Animator.ref( attr, desiredUnit, relativeTo ) reference to an attributes value with the given unit
  • Animator.value( attr ) returns the value of the attribute with its unit
  • Animator.tweenTo( attr, target, options, cache, unit ) you can specify the target value unit
  • Animator.tweenManyTo( targets, options, cache, units ) you can specify a map of units to match the map of target values
  • Animator.tweenFrom( attr, starting, options, cache, unit ) you can specify the starting value unit
  • Animator.tweenManyFrom( startings, options, cache, units ) you can specify a map of units to match the map of startings
  • Animator.tween( attr, starts, ends, options, cache, unit ) you can specity the unit for tweening
  • Animator.tweenMany( starts, ends, options, cache, units ) you can specify a map of units to match the map of starts
  • Animator.move( attr, amount, options, cache, unit ) move by the given unit
  • Animator.moveMany( amounts, options, cache, units ) move many by the given map of units
  • Animator.follow( attr, path, options, cache, unit ) follow a path where the values in the path are the given unit

The animation definition has been modified to now include a units map like so:

anim8.save('animationName`, {
  keyframe: {
    '0,20,60,100': {
      left: 50
    },
    '10,40,80`: {
      left: 0
    }
  },
  units: {
    left: '%
  }
});

Notes

  • relativeTo is one of: parentWidth, parentHeight, width, height, fontSize, parentFontSize, or htmlFontSize and is used with using the % unit

Installation

  • Bower: bower install anim8js-dom
  • Node: npm install anim8js-dom
  • Download: anim8js-dom
Properties you can anim8

If a (type) isn't beside the property - assume a simple number type.

padding paddingTop paddingLeft paddingBottom paddingRight margin marginTop marginLeft marginBottom marginRight borderRadius borderTopLeftRadius borderTopRightRadius borderBottomLeftRadius borderBottomRightRadius borderWidth borderTopWidth borderRightWidth borderBottomWidth borderLeftWidth outlineWidth outlineOffset tabSize textIndent borderSpacing fontSize lineHeight letterSpacing wordSpacing origin(2d) originX originY opacity zIndex width minWidth maxWidth height minHeight maxHeight top right bottom left blur sepia brightness grayscale contrast invert saturation heuRotate rotate rotate3d(quaternion) translate(2d) translateX translateY translateZ translate3d(3d) scale(2d) scaleX scaleY scaleZ scale3d(3d) skew(2d) skewX skewY backface visibility backgroundColor(rgba) color(rgba) borderTopColor(rgba) borderRightColor(rgba) borderBottomColor(rgba) borderLeftColor(rgba) borderColor(rgba) outlineColor(rgba) textDecorationColor(rgba) textShadowX textShadowY textShadowPosition(2d) textShadowBlur textShadowColor(rgba) shadowX shadowY shadowPosition(2d) shadowBlur shadowSpread shadowColor(rgba) shadowInset scrollLeft scrollTop

Dynamic properties you can anim8

center(2d) centerX centerY angle distance orbitOffset(2d)