JS代码(代码中包含了sketch.min.js的源码,如果你的网站已经引用了,请删掉下面的6到7行。):
/*
* 鼠标点击特效:canvas点击效果
*/
/* Copyright (C) 2013 Justin Windle sketch.min.js, http://soulwire.co.uk */
var Sketch=function(){
"use strict";function e(e){
return"[object Array]"==Object.prototype.toString.call(e)}function t(e){
return"function"==typeof e}function n(e){
return"number"==typeof e}function o(e){
return"string"==typeof e}function r(e){
return E[e]||String.fromCharCode(e)}function i(e,t,n){
for(var o in t)(n||!e.hasOwnProperty(o))&&(e[o]=t[o]);return e}function u(e,t){
return function(){
e.apply(t,arguments)}}function a(e){
var n={
};for(var o in e)n[o]=t(e[o])?u(e[o],e):e[o];return n}function c(e){
function n(n){
t(n)&&n.apply(e,[].splice.call(arguments,1))}function u(e){
for(_=0;_<J.length;_++)G=J[_],o(G)?O[(e?"add":"remove")+"EventListener"].call(O,G,k,!1):t(G)?k=G:O=G}function c(){
L(T),T=I(c),U||(n(e.setup),U=t(e.setup),n(e.resize)),e.running&&!j&&(e.dt=(B=+new Date)-e.now,e.millis+=e.dt,e.now=B,n(e.update),e.autoclear&&K&&e.clear(),n(e.draw)),j=++j%e.interval}function l(){
O=Y?e.style:e.canvas,D=Y?"px":"",e.fullscreen&&(e.height=w.innerHeight,e.width=w.innerWidth),O.height=e.height+D,O.width=e.width+D,e.retina&&K&&X&&(O.height=e.height*X,O.width=e.width*X,O.style.height=e.height+"px",O.style.width=e.width+"px",e.scale(X,X)),U&&n(e.resize)}function s(e,t){
return N=t.getBoundingClientRect(),e.x=e.pageX-N</