three实现三维图片折叠波浪弯曲效果代码

代码语言:html

所属分类:三维

代码描述:three实现三维图片折叠波浪弯曲效果代码

代码标签: three 三维 图片 折叠 波浪 弯曲

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

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

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

  
  
<style>
html {
  height: 100%;
}

html,
body {
  min-height: 100%;
  background-color: #1d1f20;
  color: #fff;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

div {
  height: 100vh;
  width: 100vw;
}
</style>


  
</head>

<body translate="no">
    
    
<script type="importmap">
  {
    "imports": {      
      "three": "//repo.bfw.wiki/bfwrepo/js/module/three/build/168/three.module.js",
      "three/addons/": "//repo.bfw.wiki/bfwrepo/js/module/three/examples/168/jsm/"
    }
  }
</script>

<div id="threejs-container"></div>
  
      <script type="module">
import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";

function init() {
  const container = document.getElementById("threejs-container");

  const scene = new THREE.Scene();
  const camera = new THREE.PerspectiveCamera(
  30,
  container.clientWidth / container.clientHeight,
  1,
  5000);

  const renderer = new THREE.WebGLRenderer();
  renderer.setSize(container.clientWidth, container.clientHeight);
  container.appendChild(renderer.domElement);

  // Load the image texture
  const textureLoader = new THREE.TextureLoader();
  const texture = textureLoader.load("//repo.bfw.wiki/bfwrepo/i.........完整代码请登录后点击上方下载按钮下载查看

网友评论0