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

animation-steps

v1.0.1

Published

a less function for steps animation

Downloads

2

Readme

通过引用内置的帧动画函数实现帧动画效果

  • 诸如指定图片序列顺序播放实现类似 GIF动画效果
  • 任意指定图片组合实现诸如 霓虹灯不稳定闪烁 等动画效果

用法实例见 demo

帧动画基本知识

step-end / steps(1) / steps(1, end) 无论播放多少次,动画过程中的 每一轮动画的 最后一帧(100%)都是被pass的

	if (如果非无限循环动画 && fill-mode: forwards) {
		direction: alternate && iteration-count: 偶数 ?
   	停留在0% :
		停留在被pass的100% ;
   }

step-end 如要保证一轮素材中每一张都播放到,最后一张图除了需要是100%,也需要同时是倒数第二帧,这样无论如何, 都符合预期


step-start / steps(1, start) 无论播放多少次,动画过程中的 每一轮动画的 第一帧(0%)都是被pass的

	if (如果非无限循环动画 && fill-mode: forwards) {
		direction: alternate && iteration-count: 偶数 ?
   	停留在0% 之后的那一帧 :
		停留在100% ;
   }

step-start 0% 无论如何都不会执行,所以空余0%,用给出的素材得出 n%(n > 0) , ... , 100% 即可。

总结:逻辑上讲,如果为了保证每一帧都执行到,用 start 更通顺,但 steps 默认是 end,使用者自行决定用哪种实现吧