three打造三维鱼骨随鼠标游动躲避障碍物效果代码

代码语言:html

所属分类:三维

代码描述:three打造三维鱼骨随鼠标游动躲避障碍物效果代码

代码标签: 鱼骨 鼠标 游动 躲避 障碍物 效果

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

<html lang="en"><head>

  <meta charset="UTF-8">

  <link href="https://fonts.googleapis.com/css?family=Allerta+Stencil" rel="stylesheet">

  
  
  
<style>
#ocean {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(#045c7c, #0d324e);
}
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

#overlay {
  background: white;
  font-family: "Allerta Stencil", sans-serif;
  font-size: 1em;
  opacity: 0.75;
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
  top: 0;
  left: 0;
}

#settings {
  margin-top: 50px;
  font-size: 2.8em;
}
#parameter {
  margin-top: 50px;
  font-size: 1.1em;
}

#holder {
  width: 40%;
  margin-left: auto;
  margin-right: auto;
}

#parameter {
  width: 100%;
  margin-top: 20px;
  text-align: center;
}

#settings {
  text-align: center;
}

.slidecontainer {
  width: 100%;
}

.slider:hover {
  opacity: 0.85;
}

.slider {
  -webkit-appearance: none;
  margin-top: 30px;
  width: 100%;
  height: 2px;
  border-radius: 5px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.25;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  margin-left: 0px;
  height: 45px;
  border-radius: 100%;
  width: 45px;
  border: solid black 6px;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  display: inline-block;
  margin-left: 0px;
  height: 50px;
  border-radius: 100%;
  width: 50px;
  border: solid black 4px;
  cursor: pointer;
}

#button {
  margin-top: 40px;
  width: 100%;
  background-color: white;
  color: black;
  border: 3px solid #555555;
  font-size: 1.75em;
  font-family: "Allerta Stencil", sans-serif;
}

#button:hover {
  background-color: #555555;
  color: white;
}
</style>


</head>

<body>
  <div id="ocean" class="ocean"></div>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.109.js"></script>
      <script>
let mousePos = { x: 0, y: 0 };
HEIGHT = window.innerHeight,
WIDTH.........完整代码请登录后点击上方下载按钮下载查看

网友评论0