var canvas=document.getElementById("demo"); var cxt=canvas.getContext("2d"); var flag=0; canvas.onmousedown=function(evt){ evt=window.event?window.event:evt; var startX=evt.pageX-this.offsetLeft; var startY=evt.pageY-this.offsetTop; cxt.beginPath();
/*! * @license TweenJS * Visit http://createjs.com/ for documentation, updates and examples. * * Copyright (c) 2011-2015 gskinner.com, inc. * * Distributed under the terms of the MIT license. * http://www.opensource.org/licenses/mit-license.html * *
俄罗斯方块 [removed] var TETRIS_ROWS = 20; var TETRIS_COLS = 14; var CELL_SIZE = 24; // 没方块是0 var NO_BLOCK = 0; var tetris_canvas; var tetris_ctx; // 记录当前积分 var curScore = 0; // 记录当前速度 var curSpeed = 1; // 记录曾经的最高积分 var maxScore = 0; var curScoreEle
HTML5圆形波浪加载动画特效是一款原生html5 css3 canvas波浪滚动上升加载动画,圆形加载容器效果。 var wave = (function () { var ctx; var waveImage; var canvasWidth; var canvasHeight; var needAnimate = false; function init (callback) { var wave = document.getElementById(wave); var canvas