canvas圈形复制美
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { background-color: hotpink; margin: 0; padding: 0; overflow: hidden; } </style> </head> <body translate="no"> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/p5.js"></script> <script > /* * JUMPY SLINKY * Anim made with p5 - Enjoy! * * #032 - #100DaysOfCode * By ilithya | 2020 * https://www.ilithya.rocks/ * https://twitter.com/ilithya_net */ const bgColor = 'hotpink'; const inkColor = '#fffffd'; // white const darkInkColor = '#191919'; // black function setup() { createCanvas(windowWidth, windowHeight); background(bgColor); stroke(inkColor); strokeWeight(1); noFill(); } let t = 0; let isDown = true; const drawSpring = () => { background(bgColor); const cW = 100; const c = cW*2; const w = width-c; const h = height+c; tr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0