Skip to content
/ wipe Public
forked from leiroc/wipe

Wipe是一款基于HTML5 canvas的移动端,涂抹,自动播放涂抹轨迹,刮刮乐的插件。(The movement of the wiper is a based on HTML 5 canvas, daub, automatic playback daub trajectory, scratch music plug-in.)

Notifications You must be signed in to change notification settings

uthpfss/wipe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

wipe

Wipe是一款基于HTML5 canvas的移动端,涂抹,自动播放涂抹轨迹,刮刮乐的插件。可以轻松实现,涂抹,记录涂抹轨迹自动播放。

#1 使用说明

###html

<script src="../src/canvas.js"></script> <script src="../src/wipe.js"></script> 其中canvas.js是CanvasRenderingContext2D.prototype.扩展库。方便链式操作。 ###css #wipe { margin: 10px auto; width: 300px; height: 430px; background: url(img/girl.jpg) no-repeat; background-size: 100% 100%; } canvas { opacity: 0.9; }

css其实只是指定canvas后面的世界,和canvas的大小; ###js var wipe = new Wipe({ el: '#wipe', fg: '#ccc', size: 50, debug: false, autoWipe: false, data: null, onswiping: function (percent) { //do something 涂抹回调函数 } })

#2 演示 就是这么简单,开始玩起来吧! ###1、默认 ###2、自动涂抹,需要生成轨迹 ###3、涂抹图片

###轨迹生成方法: 打开debug,autoWipe=false,然后会在控制台输出数据轨迹,copy下来,放入 data中即可!

About

Wipe是一款基于HTML5 canvas的移动端,涂抹,自动播放涂抹轨迹,刮刮乐的插件。(The movement of the wiper is a based on HTML 5 canvas, daub, automatic playback daub trajectory, scratch music plug-in.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.9%
  • HTML 32.1%