Git Product home page Git Product logo

timeliner's Introduction

Timeliner

Timeliner is a graphical graphical tool to help create and prototype animations quickly. It is useful for adjusting variables and checking out how the effects changes over time with keyframing and easing/tweening functions. It may also have some similarities with the timeline component of adobe flash, after effects, edge animate or other animation software.

It is written in javascript and meant to work with different javascript libraries or webgl frameworks, in 1d, 2d, or 3d. It is built primary for myself, but feel free to send me suggestions or requests.

Follow me on twitter for updates.

Demo

Video

screenshot

Another js timeline library?

Below are some existing javascript timeline libraries which I think are pretty good. I decided to write mine partly to scratch my itch and partly to challenge myself technically. There are challenges in writing one, but its nice to be in control of your own tools.

  1. Timeline.js by Marcin Ignac
  2. Keytime Editor by Matt DesLauriers
  3. Frame.js by Ricardo Cabello (Side note: mrdoob's talk on this also showcase interesting editors used by the demoscene)
  4. TweenTime by idflood.

I think the current version is much a work in progress. However Ben Schwarz says that a cat dies everytime code doesn't get publish during cssconf asia 2014, so I thought it would be a good idea to release this early.

Philosophy

I wrote Timeliner to be as lightweight and embedable as possible. Styles, HTML, icons are all embeded in a single javascript file. This means it could work as an included script, bookmarklet, or part of a bigger project. I intent to have interoperablility with other controls tools like dat.gui or gui.js.

Usage

Include the timeliner.js file.

<script src="timeliner.js"></script>

or import via ES modules

import { Timeliner } from './build/timeliner.min.js'

Load data by code, file upload or loading from saved localStorage.

// target is a "pojo" which gets updated when values change.
var target = {
	name1: 1,
	name2: 2,
	name3: 3
};

// initialize timeliner
var timeliner = new Timeliner(target);
timeliner.addLayer('name1');
timeliner.addLayer('name2');
timeliner.addLayer('name3');

Add a keyframe

  1. double click on the timeline

or

  1. Select a time on the timeline
  2. Click on the keyframe

Add a tween

  1. Select time between 2 keyframes
  2. Select easing type from the dropdown

Development

To test without compiling, open test_module.html in the browser.

Format code

yarn run fix

Generate Build

yarn run mini

Releases

2.0.0

  • Refactored using ES modules

1.5.0

  • Fix package.json dependencies
  • Easy way to move keyframes (reimplemented block dragging)
  • Time scale and styling improvements thanks @tschw

1.4.0

  • Bug fix (insert keyframes should interpolate)
  • ghosting / onioning skinning tweened values
  • Icon and layout tweaks
  • Basic time & vertical scrolling
  • Simple Ghosting / Onion Skinning Support Example

1.3.0

  • autosave
  • load (localstorage, new, autosave, filesystem)
  • save (export, localstorage, download)
  • ui tweaks

1.2.0

  • icons using extracted fontawesome data
  • slightly npm-ify
  • window management
  • basic keyboard shortcuts
  • basic hdpi
  • basic touch support

1.1.0

  • undo / redo (basic)

1.0.0

  • slider time scale (basic)
  • fix positioning mouse events
  • basic play toggled with pause button
  • basic hook playback to target object
  • basic playback and pause
  • semi-allow layer panel to repaint on data change
  • show current easing of layers
  • update tween props on insert
  • show tween values on cursor movement
  • edit tween (basic)
  • insert tween (basic)
  • drag keyframe
  • insert keyframe on value adjust
  • adjust value
  • remove keyframe
  • insert keyframe
  • adjust values (basic)

TODO

  • slider units
  • usability improvements
  • better marking time when scaling time
  • better keyboard shortcuts
  • move tween blocks
  • custom context / popup menu
  • attempt virtual-dom / v.rendering
  • consider immutable js or localstorage for undo stack
  • curve editor
  • graph editor
  • support audio
  • support guestures
  • remote control
  • a whole ton more

timeliner's People

Contributors

cocoademon avatar ebour avatar tschw avatar zz85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timeliner's Issues

Separate tween updating from GUI

Hello,

I'd like to set this up to be able to use it without showing a GUI.

Right now, the tween update happens in LayerView (view_layer.js), in the repaint() function. Most of the interesting stuff is in util.timeAtLayer() though.

I'm not sure which is the best way to separate out the tween engine from the GUI - it doesn't need to be completely separate, but at least there should be an update path.

One simple way is to have LayerView listen to the time.update message, separately to render(), but I'm wary of doing this as there's a TODO comment in view_panel.js saying "// DON'T use time.update for everything".

An alternative is to duplicate the state loading code and tween update logic into a separate, smaller library, which can be swapped out for the full timeliner library. Maybe a separate "timeliner_player.js".

With some careful design, this could be done without actually copying any code around.

Thoughts?

Audio/video as waveform (line/oscillo/etc) [suggestion]

Use case: better visual sync between animations and audio/video, a bit like demoscene usual audio/visual reactivity ( http://www.airtightinteractive.com/2013/10/making-audio-reactive-visuals/ )

Ideally, in the end, it's about having a custom ease where you can edit spline to make it look like the line waveform of you audio.
(many audio/video tag libs like https://github.com/collab-project/videojs-wavesurfer or https://github.com/bbcrd/peaks.js etc)

How to use without GUI?

Silly question, but let's say I create some stuff with this library, how do I show the final result without showing the GUI?

hi i have a question

hi
i'm new to web dev beginner, i just read your code for learning, but i can't find the do.js...
how can i get it?

thanks

Implement Simple Undo / Redo System

There are usually 2 different ways to handle undo / redo

  1. you snapshot and store the states, so you can load them anytime
  2. you store the deltas or events/commands/actions between save points.

Method 1 is simplistic. But it works. It's a lot like git.
It works with the reactive flow.

Method 2 has certain use cases. It might map better to a collaborative
environment. It is more like hg. It might be a little towards
operational transformation.

I think I'll try method 1 first.

Cannot start project

Hello guys, I cloned this code and run 'npm install' to install library needed to run. After run this command, I run script {start} in package.json. But I have a issue: Error: Cannot find module 'package-json-versionify' from '../video-annotator/timeliner'.. I hope that, I can receive answer from everyone, all comments are valuable. Thanks

Support for audio?

Hi,
I wondered if you had given any thought about how you might support audio? I would like to use Timeliner for animation with Three.js to animate 3D objects but would also like to sync an audio track (voice-over). The use-case is instructional videos for engineering topics.
Cheers!

Multiple objects

Hi. Is it possible to add multiple objects (target) to the timeline? Or you support just a single object per timeline?

Thanks!

License?

I'm very much interested in using this project and hopefully also contributing to it, but I don't see a license. Would you be so kind as to add one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.