canvas-animation-loader使您可以硬件加速画布动画。
它将一个将图标类导出为静态SVG的javascript文件转换,动画的每一帧都有一个面板。 这使您可以使用CSS的带有step()参数的transformX translateX()转换在GPU上运行动画。
安装
npm install --save-dev canvas-animation-loader
用法
首先创建一个JavaScript文件,该文件导出动画图标类:
export default class SearchIcon {
constructor ( duration , width , height ) {
// configure your renderer to produce an animation of the given size
// whe
评论0
最新资源