Package Exports
- gka
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gka) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Generate Keyframes Animation
gka
gka 是一款高效、高性能的帧动画生成工具。
通过对图片集进行处理,一键式生成序列帧动画文件,并内置相关优化。
- 一键式 : 图片文件批量序列化重命名,生成 css keyframes,生成帧动画预览文件
- 性能佳 : 支持图片压缩✓,支持
合图模式✓,相同帧图片复用✓

Install
$ sudo npm install -g gkaUsage
gka <options> <files>
-d, --dir <string> -d 图片文件夹地址
-p, --prefix <string> -p 重命名前缀
-s, --sprites <boolean> -s true 开启合图模式
-f, --frameduration <number> -f 每帧时长 默认为 0.04
-t, --tiny <string> -t 图片文件夹地址 压缩图片# 帧动画生成 - 普通模式
$ gka -d [imageFolderPath] -p [prefix] # 帧动画生成 - 合图模式
$ gka -d [imageFolderPath] -p [prefix] -s true# 压缩图片
$ gka -t [imageFolderPath]Examples
生成帧动画 · 普通模式
1.示例参数:
- 图片目录:E:\gka-test\img
- 图片名前缀:prefix
2.命令
# gka -d [imageFolderPath] -p [prefix]
$ gka -d E:\gka-test\img -p prefix3.结果:
| Before | After |
|---|---|
|
|
生成帧动画 · 合图模式
1.示例参数:
- 图片目录:E:\gka-test\img
- 图片名前缀:prefix
2.命令
# gka -d [imageFolderPath] -p [prefix] -s true
$ gka -d E:\gka-test\img -p prefix -s true3.结果:
| Before | After |
|---|---|
|
|
图片压缩
1.示例参数:
- 图片目录:E:\gka-test\img
2.命令
# gka -t [imageFolderPath]
$ gka -t E:\gka-test\imgLicense
Log
- v1.0.x 重命名图片文件、 生成 keyframe animation css 动画、自动化合图、自动化图片压缩、效果预览
- v1.1.0 相同帧图片复用