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

timeline-js

v0.0.2

Published

A compact JavaScript animation library with a GUI timeline for fast editing

Downloads

7

Readme

Timeline.js

A compact JavaScript animation library with a GUI timeline for fast editing.

Check it out in this example: http://vorg.github.com/timeline.js/examples/cssAnimation.html

More on the project website: http://marcinignac.com/blog/timeline-js/

Created by Marcin Ignac

Timeline

Usage:

1. Animation

<script type="text/javascript" src="timeline/timeline.js"></script>   

anim(target).to(delay, {property:value,...}, duration, easing);    

After specifying the target using anim() you can chain as many to() animations as you want. To start parallel track simply call anim() on the same target again.

1.1 Basic example

Animate x property of the sprite object to 100 over 1s using quadratic easing. Then wait 5s and animate it back to 0 over 2s

anim(sprite).to({x:100}, 1, Timeline.Easing.Quadratic.EaseIn).to(5, {x:0}, 2);

1.2 Example of parallel animations

Animate width and height of the rect object to 50 and 75 over 3s. At the same time animate opacity to 0 over 4s.

anim(rect).to({width:50, height:75}, 3);
anim(rect).to({opacity:0}, 4); 

2. Timeline GUI

<script type="text/javascript" src="timeline/gui.js"></script>   

anim(targetName, target).to(delay, {property:value,...}, duration, easing);

Adding gui.js script to the page will open a timeline panel on the bottom of the page if any animation was added before first frame. One track for every animated property will be created. Click and drag to edit key frames, double click to add new frames. Press export button (tree horizontal lines) to export code you can then copy paste in your scrip .

In this case we have to specify targetName in anim() that will be used when we export the code from the timeline GUI. For each property used in to() call there will be an animation track created. Animation data is stored in localStorage and shared between sessions so refreshing the page and adding new properties and objects to be animated is possible. When an animation track exists in localStorage all to() calls modifying this property are ignored.

2.1 Example

anim("rect", rect).to({x:rect.x, y:rect.y});

Add the rect object and it's x and y properties to animation and use their default values. Target name should be always exactly the same as variable name.