Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
timeline-js
Advanced tools
A compact JavaScript animation library with a GUI timeline for fast editing
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
<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.
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);
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);
<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.
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.
FAQs
A compact JavaScript animation library with a GUI timeline for fast editing
The npm package timeline-js receives a total of 1 weekly downloads. As such, timeline-js popularity was classified as not popular.
We found that timeline-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.