gsap实现彩色点状线条屏保动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现彩色点状线条屏保动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html, body { margin:0; padding:0; width:100%; height:100%; background:#000; } </style> </head> <body translate="no"> <canvas></canvas> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/gsap.3.12.2.js"></script> <script > const c = document.querySelector('canvas') const ctx = c.getContext('2d') let cw = c.width = innerWidth let ch = c.height = innerHeight const ticks = Array(200) const dur = 4 for (let i=0; i<ticks.length; i++){ ticks[i] = { x1:0, x2:0, y1:0, y2:0, lineWidth: 60, angle: i / ticks.length * Ma.........完整代码请登录后点击上方下载按钮下载查看
网友评论0