p5实现水流流下波动动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现水流流下波动动画效果代码

代码标签: p5 水流 流下 波动 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  


  
  
</head>

<body >
  
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.7.0.js"></script>
      <script >
let count;
let xOff = 123;
function setup() {
  createCanvas(windowWidth, windowHeight);
  count = width;
  background("#023047");
}

function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}

function draw() {
  clear();
  background("#023047");

  let a = 0.0;
  let inc = PI / 50.0;
  noStroke();
  fill("#925e92");

  circle(120, 120, 0.25 * ((frameCount * 2) % windowHeight));
  stro.........完整代码请登录后点击上方下载按钮下载查看

网友评论0