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 🙏

© 2026 – Pkg Stats / Ryan Hefner

frame-animation-canvas

v0.1.1

Published

A Frame Animation implementation Based on HTML5 Canvas

Readme

一种基于canvas的帧动画实现

beta

The English edition of instruction is edited and is to be published soon

使用

npm i frame-animation-canvas --save

然后可以直接:

var frameAnimationCanvas = require("frame-animation-canvas");
//...
var ani = frameAnimationCanvas("frameResult.png",$theDomNode,ArrayFromJsonResult,60,1.15);
ani.begin();

默认引入的是babel编译好的ES5版本,无需进行编译即可使用。

源文件在src文件夹下,也可以直接拷贝源文件进行使用。

另外值得注意的是,素材需要由Egret Texture Merger这个工具生成,也可参考这里

构造函数参数列表

| 属性 | 是否必须 | 默认值 | 描述 | 类型 | | ------| ------ | ------ | ------ | ------ | | imgSrc | 必须 | null | 所有帧的合成图片地址 | png/jpg | | canvasDom | 必须 | null | canvas对应的实际dom元素 | DOM | | positionInfo | 必须 | null | Egret Texture Merger生成的结果frames属性内容(转化成array) | array | | interFrameTime | 必须 | null | 帧间隔 | Number |

注意:由于之前的scale参数可能会出现问题,现在已经删除scale参数,建议直接控制canvas的大小来实现缩放功能。

协议

MIT