p5实现三维螺旋弹簧旋转动画效果代码

代码语言:html

所属分类:三维

代码描述:p5实现三维螺旋弹簧旋转动画效果代码

代码标签: p5 三维 螺旋 弹簧 旋转 动画

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

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

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


  
  
<style>
html,
body {
  height: 100%;
  margin: 0;
  background-color: #152340;
}

canvas {
  width: 100%;
  height: 100%;
}

.button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  color: #152340;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  font-size: 8px;
  font-weight:bold;
  text-transform: uppercase;
  border-radius: 10px;
  transition: all 0.4s ease;
}

.button:hover {
  background-color: rgba(255, 255, 255, 1);
}
</style>

  
  
</head>

<body translate="no">
  <button class="button" id="Button">New Helix</button>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.10.0.js"></script>
      <script >
let radius = 70;
let heightPerTurn = 50;
let numTurns = 10;
let .........完整代码请登录后点击上方下载按钮下载查看

网友评论0