npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

frame-seq

v0.2.1-a

Published

Flipbook style playback of image sequences. Custom HTML element.

Downloads

17

Readme

frame-seq

Custom HTML element to animate nested images.

Early alpha. Preloading not implemented yet so it will stutter through first playthrough.

Not a lot of demo stuff yet, but there is my basic test suite.

Features

Current

  • playback of any nested elements in sequence
  • playback direction control
  • autoplay
  • looping
  • fps control
  • simple events

TBD before v1:

  • pingpong playback
  • buffering
  • preloading
  • folder-based image sequences
  • size mismatch management
  • finer-grained events

Post v1

  • Onion skinning

Usage

To use, embed JS file in dist and add the <frame-seq> element to your HTML. Any elements nested inside will be played back in order of the HTML.

<frame-seq>
    <img src="imgseq01.jpg" ... >
    <img src="imgseq02.jpg" ... >
    <img src="imgseq03.jpg" ... >
    <img src="imgseq04.jpg" ... >
    <img src="imgseq05.jpg" ... >
    <img src="imgseq06.jpg" ... >
    <img src="imgseq07.jpg" ... >
    <img src="imgseq08.jpg" ... >
    <img src="imgseq09.jpg" ... >
    <img src="imgseq10.jpg" ... >
</frame-seq>

Attributes

  • fps - Playback speed (frames-per-second). Default 12.
  • autoplay - Boolean: Begin playback as soon as element is rendered.
  • reverse - Boolean: Playback is in opposite direction.
  • pingpong - Boolean: Doesn't do anything yet.
  • loop - Boolean: Playback automatically loops (regardless of direction).
  • width - Doesn't do anything yet.
  • height - Doesn't do anything yet.
  • preload - Boolean: Doesn't do anything yet.

Properties

All attributes are also expressed as properties. Additional properties are:

  • currentFrame - The current playhead position (starting at 1).
  • totalFrames - The total number of frames in the animation (read-only).
  • duration - The total running time of the animation, based on the current FPS (read-only).
  • playing - Boolean: Whether the animation is currently playing (read-only).
  • paused - Boolean: Whether the animation is currently paused (read-only).
  • stopped - Boolean: Whether the animation is currently stopped (read-only).

Methods

These methods will almost certainly be thinned out in a future version.

  • play()
  • pause()
  • resume()
  • stop()
  • gotoAndPlay(frame)
  • gotoAndResume(frame)
  • nextFrame()
  • prevFrame()

Events

  • stateChanged - When the playback state has changed or any attribute is modified.
  • enterFrame - At the beginning of each redraw.