three实现定制车床几何形状效果代码
代码语言:html
所属分类:三维
代码描述:three实现定制车床几何形状效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
overflow: hidden;
margin: 0;
text-align: center;
}
</style>
</head>
<body translate="no">
<script async src="https://ga.jspm.io/npm:es-module-shims@1.5.1/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.172.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.172.0/examples/jsm/"
}
}
</script>
Select thickness:<br><input id="thickness" type="range" min="1" max="100" value="50">
<script type="module">
// https://discourse.threejs.org/t/trying-to-add-thickness-to-a-custom-lathe-geometry/77274
import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
// general setup, boring, skip to the next comment
console.clear( );
var scene = new THREE.Scene();
scene.background = new THREE.Color( 'gainsboro' );
var camera = new THREE.PerspectiveCamera( 30, innerWidth/inne.........完整代码请登录后点击上方下载按钮下载查看
网友评论0