Code Monkey home page Code Monkey logo

timeline's Introduction

timeline :

Timeline is simple javascript library for making timeline easy using frames logic

#installation : You can use just script tag. It work also with AMD

#Exemple : timeline.add("slide1",document.querySelector('.hello'), { f_100 : function(){ this.$el.innerHTML ="Hi i'm frame 100 one"; }, f_1 : function(){ this.$el.innerHTML ="Hi i'm frame 1 one"; } } );

 timeline.play("slide1");

#Explain : // add the new timeline by timeline.add(id_of_timeline , DOM element can be null, {framse} , options ) timeline.add("slide1",document.querySelector('.hello'), { // new frame should begin with f_ and the duration to exicut the frame exemple f_100 f_100 : function(){ // this frame will exicuted time = 100 this.$el.innerHTML ="Hi i'm frame 100 one";

								// other methods
								// this.stop();
								// to Stop animation
								// this.cast('f_1')
								// to call to the frame 'f_1'
								//this.resume()
								// to continue playing timeline
							},
							f_1 : function(){
							 // this frame will exicuted at time = 1 
								this.$el.innerHTML ="Hi i'm frame 1 one";
							}
						},
						{	
							complete : function(){ 
								// On animation is completed
							},
							tick : function(){
								// callback on each tick 
							},
							step : function(){
								// each step before moving to next frames
							},
							onrepeat : function(){
								// On each repeat of timeline 
								// if the loop is loop
							},
							loop : 0,
							fps : 20
						} 
					);

 timeline.play("slide1");

timeline's People

Contributors

khalidahmada avatar

Watchers

Lhassan Baazzi avatar James Cloos avatar

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.