更新记录
1.0.2(2023-01-16)
下载此版本
修复动态url不刷新的BUG
1.0.1(2023-01-13)
下载此版本
添加播放完成事件
1.0.0(2023-01-13)
下载此版本
基础功能
查看更多
平台兼容性
uni-app
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
√ |
√ |
√ |
√ |
- |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
√ |
√ |
√ |
√ |
√ |
√ |
- |
√ |
√ |
√ |
√ |
其他
zs-canvas-animation
注意事项
图片命名格式未${i}.png,i从0开始。
然后使用TexturePacker等工具打包成图集,允许裁剪,不允许旋转。导出和json和png必须同一个目录下
使用方法
<zs-canvas-animation ref="animationRef" url="https://xxxxx" :width="750" :height="750" :fps="20" :loop="false" @onLoop="onLoop"></zs-canvas-animation>
参数 |
说明 |
url |
文件路径,不带格式。如https://oss.xxx.com/mp-weixin/test/1 ,对应资源为1.png和1.json |
width |
cavans宽度单位rpx |
height |
cavans高度单位rpx |
fps |
帧数默认1秒20帧 |
loop |
是否循环播放 默认true |
方法 |
说明 |
animationRef.play() |
开始播放 |
animationRef.stop() |
停止播放 |
animationRef.next() |
下一帧 |
animationRef.to(i) |
到指定帧 |