three实现三维可调参数变形blob效果代码

代码语言:html

所属分类:三维

代码描述:three实现三维可调参数变形blob效果代码

代码标签: three 三维 参数 变形 blob

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

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

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


  
  
<style>
#blob {
  position: relative;
}
#blob canvas {
  width: 1000px;
  margin-top: -7%;
}
@media (max-width: 1200px) {
  #blob canvas {
    margin-top: -10%;
    width: 800px;
  }
}
@media (max-width: 600px) {
  #blob canvas {
    width: 800px;
  }
}

.controls {
  background: #3F4656;
  display: flex;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 20px -1px rgba(18, 22, 33, 0.7);
}
@media (max-width: 1200px) {
  .controls {
    margin-top: -4%;
  }
}
@media (max-width: 600px) {
  .controls {
    flex-direction: column;
  }
}
.controls label {
  color: #CDD9ED;
  font-weight: 500;
  font-size: 14px;
  display: block;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .controls label {
    margin-bottom: 12px;
  }
}
.controls [type=range] {
  width: 160px;
}
@media (max-width: 600px) {
  .controls [type=range] {
    width: 280px;
  }
}
.controls > div:not(:last-child) {
  margin-right: 20px;
}
@media (max-width: 600px) {
  .controls > div:not(:last-child) {
    margin: 0 0 24px 0;
  }
}

.rangeSlider {
  position: relative;
  background: none;
  border: 1px solid #fff;
  border-radius: 6px;
  cursor: pointer;
}
.rangeSlider.rangeSlider__horizontal {
  height: 10px;
  width: 160px;
}
.rangeSlider .rangeSlider__fill {
  border-radius: 7px;
  background: #fff;
  position: absolute;
}
.rangeSlider .rangeSlider__fill:before {
  content: "";
  left: -2px;
  top: -2px;
  bottom: -2px;
  right: -2px;
  border: 2px solid #3F4656;
  border-radius: 6px;
  position: absolute;
}
.rangeSlider .rangeSlider__fill__horizontal {
  height: 100%;
  top: 0;
  left: 0;
}
.rangeSlider .rangeSlider__handle {
  border: 2px solid #3F4656;
  cursor: grab;
  cursor: -webkit-grab;
  display: inline-block;
  width: 22px;
  height: 22px;
  position: absolute;
  background: white;
  border-radius: 50%;
}
.rangeSlider .rangeSlider__handle__horizontal {
  top: -7px;
}

html {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: inherit;
}
*:before, *:after {
  box-sizing: inherit;
}

html,
body {
  overflow: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: "Source Sans Pro", Arial;
  background: #1c1f29;
}
body .dribbble {
  position: fixed;
  display: block;
  right: 20px;
  bottom: 20px;
}
body .dribbble img {
  display: block;
  height: 28px;
}
</style>


  
  
</head>

<body translate="no">
  <div id="blob">
    <canvas></canvas>
</div>

<div class="controls">
    <div>
        <label>Speed</label>
        <input type="range" min="10" max="120" value="13" step="1" name="speed">
    </div>
    <div>
        <label>Spikes</label>
        <input type="range" m.........完整代码请登录后点击上方下载按钮下载查看

网友评论0