p5实现可调参数的线条圈圈摆动动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现可调参数的线条圈圈摆动动画效果代码

代码标签: p5 参数 线条 圈圈 摆动 动画

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

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

<head>
  <meta charset="UTF-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <style>
    body {
      margin: 0;
      font-family: 'Arial', sans-serif;
      background: linear-gradient(45deg, #121212, #3a3a3a);
      color: white;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100vh;
      overflow: hidden;
    }

    h1 {
      margin: 0 0 10px;
      font-size: 2rem;
      background: -webkit-linear-gradient(#ff6ec7, #32aaff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    canvas {
      display: block;
      margin: 0 auto;
      border-radius: 10px;
      box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
    }

    .controls {
      margin-top: 10px;
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }

    input[type="range"] {
      appearance: none;
      width: 150px;
      height: 5px;
      background: #666;
      border-radius: 5px;
      outline: none;
      cursor: pointer;
    }

    input[type="range"]::-webkit-slider-thumb {
      appearance: none;
      width: 15px;
      height: 15px;
      background: #ff6ec7;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 0 5px #ff6ec7;
    }

    button {
      padding: 10px 20px;
      background: #32aaff;
      border: none;
      border-radius: 5px;
      color: white;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0