p5实现泡泡排列动画效果代码
代码语言:html
所属分类:粒子
代码描述:p5实现泡泡排列动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> canvas { position: fixed; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); max-width: 80vmin; max-height: 80vmin; } </style> </head> <body translate="no" > <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.js"></script> <script> function setup () { createCanvas(600, 600); background(21); } let time = 0; const xT = 20; const yT = 20; function draw () { time += 0.007; fill(21); rect(0, 0, 600, 600); strokeWeight(1); //fill('rgba(0,0,0,0)'); for(let x.........完整代码请登录后点击上方下载按钮下载查看
网友评论0