Git Product home page Git Product logo

sequence's Introduction

Sequence.js Flattr this git repo Join the chat at https://gitter.im/IanLunn/Sequence

The responsive CSS animation framework for creating unique sliders, presentations, banners, and other step-based applications.

Sequence.js provides all of the JavaScript functionality you need for step-based applications such as sliders and presentations, allowing you to concentrate on producing your content with style.

Easily add transitions using the .seq-in and .seq-out CSS classes automatically added via Sequence.js to style how your slides/steps and content animate.

Find out how Sequence.js works in the Introduction theme or for more details, head to the documentation.

See the introduction and ready-made themes.

Features

  • Rapid development of animated step-based applications using CSS
  • Fully supports responsive design
  • Supported on mobile, tablet, and desktop devices
  • No limitations on CSS, HTML, and workflow you can use
  • Animate canvas and content
  • Hardware acceleration (for smooth animation even on mobile devices)
  • Touch support via Hammer.js
  • Auto play
  • Easy-to-add next/previous/pause buttons and pagination
  • Preloader via ImagesLoaded
  • Hash tag support
  • Keyboard navigation
  • 30+ options and API for custom functionality
  • Top quality documentation
  • Supports all major browsers with a fallback mode for legacy browsers (detailed browser support)
  • Ready-made themes available
  • Yeoman generator available for quick scaffolding of themes

Browser Support

Sequence.js is supported in modern browsers on major platforms, with a fallback theme for Internet Explorer 8 and 9, and other older browsers that don't support CSS transitions.

See Browser Support in more detail.

Getting Started

To get started download Sequence.js and then head to the documentation. If you'd like to contribute to Sequence.js development, please see the contributing guidelines.

Download

Sequence.js can also be installed using the Bower command:

bower install sequencejs

or NPM:

npm install sequencejs

Philosophy

Sequence.js aims to provide a complete animation framework for you to create animated step-based applications almost entirely in CSS without getting in the way of how you or a web browser work. Create content and then animate it using the HTML, CSS, and workflow you're used to. Sequence.js will take care of the JavaScript functionality. There's no special syntax to learn, no limitations on the workflow you are used to, and no heavy JavaScript implementations recreating what the browser is already capable of.

Authors

Ian Lunn and contributors.

Follow @IanLunn on Twitter for Sequence.js news, web design & development links, tips, and opinions

Sponsors

Browser testing environment provided by BrowserStack.

Browser Stack

Licenses

License information can be found on the Sequence.js website.

Hire Ian Lunn

Ian Lunn is a Web Designer, Front-end Developer, and author of CSS3 Foundations.

Hire Ian Lunn for responsive design, WordPress sites, HTML, CSS, and JavaScript.

sequence's People

Contributors

damian avatar fredgithub avatar ianlunn avatar martinansty avatar oldskool73 avatar planestepper avatar redclov3r avatar seththetech avatar slickmb avatar timboland avatar timgates42 avatar ulikoehler 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  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

sequence's Issues

Optimise this.init

A lot of the init code is repeated and can be reduced quite significantly

Go to next frame whilst current frame is animating

Currently whilst a frame is animating, Sequence is locked and won't allow for navigating between slides until animations are complete. A future version should include an option to allow for skipping between frames regardless of whether a frame is animating or not.

If this is implemented, it should be best determined how the frame that is currently animating is dealt with. Should elements move to their animate-out position mid animate-in, should they fade out and then immediately go to animate-out etc. These varying methods may become options that are dependencies of the skip option.

Test for Modernizr before including

The sequence plugin should test for Modernizr presence before including it.

Included version is old and lacks new features I'd like to use together with sequence, but I cant.

Opera delayDuringOutInTransitions/animateIn issue

When delayDuringOutInTransitions is set to false, the next frame doesn't always animate in correctly in Opera. A workaround was introduced in the beta to make Opera wait 50ms before animateIn() is called to prevent this.

Keyframes

Currently Sequence can only support keyframe animations when sequences are going forward. Browsers don't support keyframe animations going backwards which means the animations simply pop in and cause Sequence to get stuck because 'animationEnd' isn't triggered.

Need to do more testing with this and come up with potential solutions to allow them to be included and fully supported.

Implement Solution for when JS is Disabled

Currently the best solution is to add a class of "animate-in" to each child in the frame the developer wishes to have in view when JS is disabled. Would be good to make this automatic though as many developers may not add the class/concern themselves with compatibility.

Implement Preloader

Add a preloader that prevents Sequence from displaying frames until everything has loaded

Swipe threshold not working

I have tested the swipe threshold on an iPad, and it appears that it isn't working.

Here is a fix :

if(self.settings.touchEnabled && self.hasTouch){
        var touches = {
            "touchstart": -1,
            "touchmove" : -1, 
            "swipeDirection" : ""
        };
        self.sequence.on("touchstart touchmove touchend", function(e){
            e.preventDefault(); 
            switch(e.originalEvent.type){
            case "touchstart":
            case "touchmove":
                touches[e.originalEvent.type] = e.originalEvent.touches[0].pageX;
                break;
            case 'touchend':
                if(touches["touchmove"] > -1)
                {
                if(touches["touchstart"] < touches["touchmove"])
                {
                    if( (touches["touchmove"] - touches["touchstart"]) > self.settings.calculatedSwipeThreshold)
                    {
                    self.next();
                    }
                }
                else
                {
                    if( (touches["touchstart"] - touches["touchmove"]) > self.settings.calculatedSwipeThreshold)
                    {
                    self.prev();
                    }
                }

                }
                touches = {
                "touchstart": -1,
                "touchmove" : -1
                };
            default:
                break;
            }
        });
        }

Improve Touch Swiping

The beta version of touch swiping was implemented quickly and prevented a page from scrolling (because Sequence cancelled the event, anticipating it as a finger swipe). Improve swiping with a better ratio for pixel density.

Back Button Issues

People have reported issues with the the plugin breaking the back button.

Transitions/Animations Don't End if CSS Properties haven't Changed

A transition/animation won't trigger as ended if none of an elements CSS properties have changed -- even if you specify a transition duration. A hack is to find a property that doesn't affect the look but causes the element to actually transition/animate (such as z-index).

This needs a better solution.

iPad Safari: animations breaking on 0.2b and 0.3b

On both a website being developed and on the Apple Style demo, Safari causes the animation to stop or fail continuing (demo - iPhones disappear, animation locks up at a certain stage). On the mentioned website, the next and previous buttons simply cease to work and no animation is run. After the locking happens, a click on the prev/next buttons do not yield any responses, but debugging has shown that the events are triggered, and never leave the loop where it waits for the animation events to finish).

On the demo, to achieve the lock, it is necessary to tap on the screen randomly and/or scroll. On the mentioned website, the effects above are noticed when the screen is scrolled.

On the website, the behavior was detected on both 0.2 beta and 0.3 beta, but not on 0.1 (where it works nicely).

Add default pagination options

Currently pagination is possible but needs to be custom built specific to each Sequence. Build in some options that allow people to quickly apply default pagination

Create a stylesheet with some default styles for quick use

A stylesheet with some default styles applied would allow developers to quickly set up a basic theme. This would also be beneficial to people with lesser capabilities trying to better understand the plugin.

Styles such as:

  • Animate left/right
  • Animate up/down
  • Rotate x degrees

Turn modifyElements into a chainable function

Often, when using modifyElements on particular elements, those elements also have their classes changed at the same time, like so:

frameChildren.removeClass("animate-out");
self.modifyElements(frameChildren, cssValue);
frameChildren.addClass("animate-in");

In some cases, classes are changed and sometimes not, meaning they can't be written into the modifyElements function. It'd be a good idea to make modifyElements a chainable function, so the above code would look like this:

frameChildren.removeClass("animate-out").modifyElements(cssValue).addClass("animate-in");

Auto Prefix CSS

Currently when creating themes, it's necessary to write out browser specific properties for each individual vendor. It'd be beneficial to have the plugin auto prefix to allow theme developers to only have to write properties for the browser they're testing in.

Need to look into how easily this can be achieved.

Fix pauseIcon

When using a pauseIcon, the following error occurs:

Object false has no method 'charAt'

Option: Disable animation phases (specifically animate-out)

In themes such as "Image Stack", the "animate-out" class has to be given a redundant property to make Sequence believe the frame has reached it's animate-out position, when in fact the theme doesn't differ between the "animate-in" and "animate-out" phases.

It may be worth while to include an option that allows for the "animate-out" phases to be disabled.

Counting when animations end doesn't work properly

When binding transitionEnd to an element, sometimes a transitionEnd is triggered more than once for a specific element. This means that on some frames, Sequence thinks the frame has ended animating sooner than it has and the next frame can be initiated.

Change names of classes that Sequence uses

Allow developers to override the default class names used for Sequence's elements and transitional phases. .animate-in, .sequence-next etc can be renamed to whatever the developer likes.

Option to animate forwards when a previous button is clicked

Currently, when hitting the previous button/swiping backwards etc, Sequence causes frames to animate in reverse, from "animateOut" to "animateIn". In themes such as Sliding Horizontal Parallax this means the frame with the aeroplane looks unrealistic because the plane flies backwards.

Add a developer options that allows the choice between animating forwards and reverse when the previous frame is initiated.

Option: Cycle

Determine whether the slideshow starts again once it's reached the end. (True/False)

Finalize before/after animate in/out callbacks

Determine which callbacks are needed. At the moment there's quite a few that could possibly be made redundant.

Example: is it necessary to have afterLastFrameAnimatesIn() when afterFrameAnimatesIn() can be used along with a frameID query?

Package Themes

Package each theme with readme's, documentation, default css and images etc

Opera Workaround

Opera requires a workaround because at present, when retrieving a CSS value with a browser prefix, it returns an empty value. The workaround retrieves CSS properties from the stylesheet rather than the DOM. This needs to be tested further and optimised.

When animatingIn (in reverse), some elements within a frame snap to their end point without animating

In the following example, the .iphone element should rotate from -40deg to 0 when animating in (in reverse):

.iphone{
    left: -450px;
    opacity: 1;
    position: absolute;
    top: -550px;
    -webkit-transform: rotate(-40deg);
    -webkit-transition-duration: 1.5s;
}

.iphone.animate-in{
    left: 600px;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
    filter: alpha(opacity=100);
    opacity: 1;
    top: 50px;
    -webkit-transform: rotate(0deg);
    -webkit-transition-duration: 1.5s;
}

.iphone.animate-out{
    left: 1100px;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
    filter: alpha(opacity=0);
    opacity: 0;
    top: -400px;
    -webkit-transform: rotate(-40deg);
    -webkit-transition-duration: 1s;
}

Due to the rotate property of .animate-out being different to .animate-in, the frame doesn't animate and instead just snaps to its new position.

By changing the rotate value of .animate-out to 0deg (the same as .animate-in), the animation works as expected.

Make infinite navigation optional

One should be able to enable/disable infinite navigation in the options at init time. If infinite navigation is turned off, when reaching the last frame, one cannot continue to the first frame. Same thing applies for the first frame (cannot go back to last frame).

I disabled the navigation buttons, but using the keyboard to navigate makes it infinite.

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.