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

Overview

Timeline.js

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

Check it out in this example: http://vorg.github.io/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.

3. Node.js

First install the timeline-js package from npm

npm install timeline-js

And then

var timeline = require('timeline-js');
var Timeline = timeline.Timeline;
var anim = timeline.anim;

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

I made countdown birthday and fireworks animation using HTML Canvas, CSS, JS. The fireworks animation gonna come out once the countdown is finished or in other words, "Birthday Time".

Countdown-Birthday-Fireworks-Animation I made countdown birthday and fireworks animation using HTML Canvas, CSS, JS. The fireworks animation gonna com

Dec 31, 2022

You can easily create the horizontal timeline with two types by using this jQuery plugin.

You can easily create the horizontal timeline with two types by using this jQuery plugin.

jQuery.Timeline V2 You are able to easily create two types of horizontal timeline with this jQuery plugin. Report bug · Request feature · Blog Table o

Dec 9, 2022

Hides all the @saveToNotion @memdotai @threadreaderapp tweets from your Twitter timeline

This is a Plasmo extension project bootstrapped with plasmo init. Getting Started First, run the development server: pnpm dev # or npm run dev Open yo

Oct 11, 2022

rGUI is a GUI Library made for the GTA Multiplayer Modification RAGE:MP

rGUI is a GUI Library made for the GTA Multiplayer Modification RAGE:MP

rGUI - RAGE:MP A multifunctional GUI Library made for the GTA Multiplayer Modification RAGE:MP which is easy to use and understand. Will be updated fr

Jan 3, 2023

Fancytree - JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

Fancytree - JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

Fancytree Fancytree (sequel of DynaTree 1.x) is a JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkb

Jan 9, 2023

Gatsby-Formik-contact-form-with-backend-panel - Full working contact form with backend GUI panel.

Gatsby minimal starter 🚀 Quick start Create a Gatsby site. Use the Gatsby CLI to create a new site, specifying the minimal starter. # create a new Ga

Jan 2, 2022

A script that implements a GUI to make cheating on Blooket easier than ever.

BlooketUI What's BlooketUI? A script that implements a GUI to make cheating on Blooket easier than ever. How do i Use This? Copy the code of src.js by

Dec 24, 2022

RedisInsight - Developer GUI for Redis, by Redis.

RedisInsight - Developer GUI for Redis, by Redis.

RedisInsight - Developer GUI for Redis, by Redis. RedisInsight is a visual tool that provides capabilities to design, develop and optimize your Redis

Dec 31, 2022

An app to manage tasks. A user can add, delete and edit a task and mark it as completed, It uses simple GUI and relies on DOM manipulation in pure JS and using local storage.

An app to manage tasks. A user can add, delete and edit a task and mark it as completed, It uses simple GUI and relies on DOM manipulation in pure JS and using local storage.

An app to manage tasks. A user can add, delete and edit a task and mark it as completed, It uses simple GUI and relies on DOM manipulation in pure JS and using local storage.

Aug 20, 2022
Comments
  • Callback function call at begin/end of motion. Use external timer

    Callback function call at begin/end of motion. Use external timer

    Hi, I needed to manage the timeline from an external timer so I patched the lib in order a user can call the update method if he wants.

    I have also added a way to trigger a callback at the beginning and end of a motion.

    Cedric

    opened by cedricpinson 0
  • Bootstrap Compatibility

    Bootstrap Compatibility

    The editor is no longer bound to the bottom of the page, but can be added to any div on the page. Dynamic sizing is demonstated through button actions, as well as the ability to clear localStorage.

    It also has a json viewer to see all the settings used to create the timeline, which could then be saved to a database.

    opened by ajhalls 0
  • timeline love

    timeline love

    Thinking about giving this some love to integrate it with https://github.com/noflo/noflo-ui . I'll pretty much just use the GUI and then make a new component in https://github.com/noflo/noflo-tween that actually drives the tweens.

    If there is anything you have been planning or putting off, I'll try to contribute changes.

    opened by forresto 9
  • layerX and layerY are depricated

    layerX and layerY are depricated

    Hi there, GREAT project! Is there a patch you can suggest to stop the error: "event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future."

    Thanks very much. Alex

    opened by ghost 0
Horizontal Timeline 2.0, a fully customisable jQuery plugin to create a dynamic timeline on the horizontal axis.

Horizontal Timeline 2.0 by yCodeTech Twitter @yCodeTech Current Version: 2.0.5.3 Quick Links: Setup | Options | Autoplay | Known Issues | Known Issues

Stu 18 May 29, 2022
Quick and easy spring animation. Works with other animation libraries (gsap, animejs, framer motion, motion one, @okikio/animate, etc...) or the Web Animation API (WAAPI).

spring-easing NPM | Github | Docs | Licence Quick and easy spring animations. Works with other animation libraries (gsap, animejs, @okikio/animate, mo

Okiki Ojo 34 Dec 14, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh

three-bvh-csg An experimental, in progress, flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh. More than 100 time

Garrett Johnson 208 Jan 5, 2023
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Compact library for interacting with Ankr Scan Multichain API.

ankrscan.js Compact SDK for interacting with Ankr Scan MultiChain JSON-RPC API. SDK supports following MultiChain methods: getLogs - logs matching the

Ankr 23 Jan 3, 2023
Animation library build on top of web animation API (WAAPI)

unanime.js Javascript animation library build on top of web animation API (WAAPI). Learn more about WAAPI: Web animation API Documentation Blog Daniel

Clément Laval 3 Jun 21, 2022
With monitors getting wider and websites more compact, maximizing the browser is a waste of space.

With monitors getting wider and websites more compact, maximizing the browser is a waste of space. Widefox utilizes all available vertical real estate while adding extra features to your browsing experience!

null 46 Dec 18, 2022
A JavaScript animation plugin for menus. It creates a div that moves when you mouse over an element, giving it an elastic animation.

Lava-Lamp Description: A JavaScript animation plugin for menus. It creates a div that moves when you mouse over an element, giving it an elastic anima

Richard Hung 38 Jun 4, 2022