https://github.com/dansl/quencer
Image Sequencer for Javascript
https://github.com/dansl/quencer
animation html image javascript sequencer web website
Last synced: about 1 year ago
JSON representation
Image Sequencer for Javascript
- Host: GitHub
- URL: https://github.com/dansl/quencer
- Owner: dansl
- License: mit
- Created: 2015-12-01T17:17:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-02-20T16:47:52.000Z (over 1 year ago)
- Last Synced: 2025-04-01T22:57:49.208Z (about 1 year ago)
- Topics: animation, html, image, javascript, sequencer, web, website
- Language: JavaScript
- Homepage:
- Size: 2.84 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Quencer v0.1 - Image Sequencer for Javascript
By: Dansl.net
Example:
```javascript
//Div in DOM with ID "exampleDiv", this is the div the animation will be placed, use this div to position the animation.
var exampleDiv = document.getElementById("exampleDiv");
//Reference: Quencer(_imagePrefix, _format, _frameWidth, _frameHeight, _totalFrames, _speed, _stylingClass)
var exampleSequence = new Quencer("images/introSequence/introSequenceStart", ".png", 281, 168, 79, 50, "");
//Add event listener for oncomplete, calls "exampleFunction" when animation completes
exampleSequence.addEventListener("complete", exampleFunction);
//Adds animation to the div
exampleSequence.AddTo(exampleDiv);
```
Run animation
```javascript
//Without looping
exampleSequence.RunAni();
//With Looping
exampleSequence.RunAni(true);
//loop frames 10 through 60
exampleSequence.RunAni(true, 10, 60);
//Call to stop Animation
exampleSequence.Stop();
```