three实现三维空间六边形镜面镜子运动折射效果代码

代码语言:html

所属分类:三维

代码描述:three实现三维空间六边形镜面镜子运动折射效果代码

代码标签: three 三维 镜面 镜子

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

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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
  margin: 0;
}

canvas {
  vertical-align: bottom;
}

.ly_container {
  position: relative;
  width: 100%;
}

.ly_bg {
  width: 100%;
  height: 100vh;
}
</style>

  



</head>

<body >
  <div class="ly_container">
  <div id="webgl-container" class="ly_bg"></div>
</div>

<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/three.123.js"></script>
      <script >
class App {
  constructor() {
    this.container = document.querySelector('#webgl-container');

    this.containerW = this.container.offsetWidth;
    this.containerH = this.container.offsetHeight;

    this.mouseX = 0;
    this.mouseY = 0;
    this.windowHalfX = this.containerW / 2;
    this.wind.........完整代码请登录后点击上方下载按钮下载查看

网友评论0