当前位置: 首页 > news >正文

抄袭别人网站设计可以在哪个网站接单

抄袭别人网站,设计可以在哪个网站接单,加强网站建设考察交流,网站设计建设一般多少钱今天要为大家带来一款html5 canvas实现的图片玻璃碎片特效。图片以玻璃碎片的形式出现到界面中#xff0c;然后似玻璃被打碎的效果渐消息。效果图如下#xff1a;实现代码#xff1a;html代码#xff1a;js代码#xff1a;// canvas settingsvar imageWidth 768,imageHei…今天要为大家带来一款html5 canvas实现的图片玻璃碎片特效。图片以玻璃碎片的形式出现到界面中然后似玻璃被打碎的效果渐消息。效果图如下实现代码html代码js代码// canvas settingsvar imageWidth 768,imageHeight 485;var vertices [],indices,boxes [];var image,fragments [],container document.getElementById(container);window.onload function () {image document.getElementById(src_img);triangulate();makeBoxes();makeFragments();};function triangulate() {var x,y,dx imageWidth / 8,dy imageHeight / 8,offset 0.5;for (var i 0; i imageWidth; i dx) {for (var j 0; j imageHeight; j dy) {if (i (i ! imageWidth)) x i randomRange(-dx * offset, dx * offset);else x i;if (j (j ! imageHeight)) y j randomRange(-dy * offset, dy * offset);else y j;vertices.push([x, y]);}}indices Delaunay.triangulate(vertices);}function makeBoxes() {var p0, p1, p2,xMin, xMax,yMin, yMax;for (var i 0; i indices.length; i 3) {p0 vertices[indices[i 0]];p1 vertices[indices[i 1]];p2 vertices[indices[i 2]];xMin Math.min(p0[0], p1[0], p2[0]);xMax Math.max(p0[0], p1[0], p2[0]);yMin Math.min(p0[1], p1[1], p2[1]);yMax Math.max(p0[1], p1[1], p2[1]);boxes.push({x: xMin,y: yMin,w: xMax - xMin,h: yMax - yMin});}}function makeFragments() {var p0, p1, p2,box,fragment;TweenMax.set(container, { perspective: 500 });var tl0 new TimelineMax({ repeat: -1 });for (var i 0; i indices.length; i 3) {p0 vertices[indices[i 0]];p1 vertices[indices[i 1]];p2 vertices[indices[i 2]];box boxes[i / 3];fragment new Fragment(p0, p1, p2, box);var rx randomRange(30, 60) * ((i % 2) ? 1 : -1);var ry randomRange(30, 60) * ((i % 2) ? -1 : 1);var tl1 new TimelineMax();TweenMax.set(fragment.canvas, {y: box.y - 1000});tl1.to(fragment.canvas, randomRange(0.9, 1.1), {y: box.y,ease: Back.easeOut});tl1.to(fragment.canvas, 0.5, {z: -100,ease: Cubic.easeIn,delay: 0.4});tl1.to(fragment.canvas, randomRange(1, 1.2), {rotationX: rx,rotationY: ry,z: 250,alpha: 0,ease: Cubic.easeOut});tl0.insert(tl1);fragments.push(fragment);container.appendChild(fragment.canvas);}}function randomRange(min, max) {return min (max - min) * Math.random();}Fragment function (v0, v1, v2, box) {this.v0 v0;this.v1 v1;this.v2 v2;this.box box;this.canvas document.createElement(canvas);this.canvas.width this.box.w;this.canvas.height this.box.h;this.canvas.style.width this.box.w px;this.canvas.style.height this.box.h px;this.ctx this.canvas.getContext(2d);TweenMax.set(this.canvas, {x: this.box.x,y: this.box.y});this.ctx.translate(-this.box.x, -this.box.y);this.ctx.beginPath();this.ctx.moveTo(this.v0[0], this.v0[1]);this.ctx.lineTo(this.v1[0], this.v1[1]);this.ctx.lineTo(this.v2[0], this.v2[1]);this.ctx.closePath();this.ctx.clip();this.ctx.drawImage(image, 0, 0);}; // sourceURLpen.js
http://www.huolong8.cn/news/47318/

相关文章:

  • 哪类网站赚钱 优帮云潍坊做网站的网络公司
  • 做网站需要icp经营许可证网站建设的来源
  • 网站设计学习机构怎么做照片网站
  • 网站能不能自己做wordpress插件路径
  • 百度用户服务中心人工24小时电话深圳seo优化外包公司
  • 做同城购物网站做导航网站赚钱
  • php网站识别手机优秀网站设计平台
  • 公司企业网站设计尺寸参考消息电子版官网
  • 腾讯微信山东区建站推广中心wordpress安装好之后怎么用
  • 营销型网站的价格中英文切换网站
  • wordpress content widgetsseowhy
  • txt做网站如何加图片北京装饰公司十大排名
  • seo站内优化培训wordpress免登录支付
  • 外贸做的亚马逊网站是哪个北京网页制作公司
  • 莆田有哪几家做网站设计的晋江网站建设联系电话
  • 终身免费网站建设加强企业网站建设的通知
  • 镇平做网站wordpress+高性能
  • 广州网站建设大公司排名查看邮箱注册的网站
  • 福永响应式网站建设软件开发的步骤
  • 网站开发期末作品代码和数据库运行好大全阿里做外贸是哪个网站
  • 好看动漫网替代网站tk网站免费
  • seo优化网站推广专员招聘如何开网站赚钱
  • 网站标题栏怎么修改模板网会员
  • 崇信县门户网站wordpress 顶部栏
  • 网站开始怎么做的版式设计
  • 集团企业网站建设方案策划书自己制作app需要什么
  • 咋么做网站线上购买链接
  • 外接硬盘做创建立网站吴忠市住房和城乡建设厅网站
  • wordpress站点信息修改版权网站应用系统设计方案
  • 国内专门做情侣的网站商城福州电商网站设计