当前位置: 首页 > news >正文

怎样用dede搭建网站wordpress教育培训

怎样用dede搭建网站,wordpress教育培训,抚州做网站,买了域名怎么用参考资料 三维向量Vector3与模型位置…克隆.clone()和复制.copy() 知识点 注:基于Three.jsv0.155.0 三维向量Vector3与模型位置欧拉Euler与角度属性.rotation模型材质颜色(Color对象)模型材质父类Material:透明、面属性模型材质和几何体属性克隆.clo…

参考资料

  • 三维向量Vector3与模型位置
  • 克隆.clone()和复制.copy()

知识点

注:基于Three.jsv0.155.0

  • 三维向量Vector3与模型位置
  • 欧拉Euler与角度属性.rotation
  • 模型材质颜色(Color对象)
  • 模型材质父类Material:透明、面属性
  • 模型材质和几何体属性
  • 克隆.clone()和复制.copy()

代码实现

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Three.js</title>
</head><body></body><!-- 具体路径配置,你根据自己文件目录设置,我的是课件中源码形式 --><script type="importmap">{"imports": {"three": "./js/three.module.js","three/addons/": "../three.js/examples/jsm/"}}</script><script type="module">import * as THREE from 'three';import { OrbitControls } from 'three/addons/controls/OrbitControls.js';const width = 800const height = 500// 场景const scene = new THREE.Scene();// 几何体const geometry = new THREE.BoxGeometry(100, 100, 100);// 材质 const material = new THREE.MeshBasicMaterial({color:0x0000ff,});// 网格模型:物体const mesh = new THREE.Mesh(geometry, material);// 位置属性mesh.position.set(0, 0, 0);// mesh.position.x = 100;// mesh.scale.set(2, 2, 2);// mesh.scale.x = 2;// mesh.translateOnAxis(new THREE.Vector3(1, 0, 1), 100);// mesh.translateX(100);scene.add(mesh);// 角度属性// mesh.rotation.x = Math.PI / 4;// mesh.rotation.set(0, 0, Math.PI / 4);// mesh.rotateX(Math.PI / 4);console.log('🚀 ~ file: 3.1三维向量Vector3与模型位置.html:46 ~ mesh.rolation:', mesh.rotation)// 材料颜色// mesh.material.color.set('red');// mesh.material.color.set('#ff0000');// mesh.material.color.set(0xff0000);mesh.material.color.r = 1;// 材料透明度mesh.material.opacity = 0.8;mesh.material.transparent = true; // 是否透明// 材料面属性// mesh.material.side = THREE.FrontSide; // 正面可见mesh.material.side = THREE.DoubleSide; // 两面可见console.log('🚀 ~ file: 3.1三维向量Vector3与模型位置.html:66 ~ mesh.material.side:', mesh.material.side) // 2console.log('🚀 ~ file: 3.1三维向量Vector3与模型位置.html:63 ~ mesh.material:', mesh.material)console.log('🚀 ~ file: 3.1三维向量Vector3与模型位置.html:89 ~ mesh.geometry:', mesh.geometry)// 克隆、复制const mesh2 = mesh.clone();mesh2.position.set(200, 0, 0);mesh2.material = mesh.material.clone();mesh2.material.color.set(0xff0000);mesh2.position.copy(mesh.position);mesh2.position.y += 150;scene.add(mesh2);// 坐标系const axes = new THREE.AxesHelper(200);scene.add(axes);// 相机const camera = new THREE.PerspectiveCamera(75, width/height, 0.1, 1000);camera.position.set(200, 200, 200);camera.lookAt(scene.position);// 渲染器const renderer = new THREE.WebGLRenderer();renderer.setSize(width, height);renderer.render(scene, camera);document.body.appendChild(renderer.domElement);// 控制器const controls = new OrbitControls(camera, renderer.domElement);controls.addEventListener('change', () => {renderer.render(scene, camera);});// 渲染循环function render() {mesh.rotateY(0.01);// mesh旋转动画// 同步mesh2和mesh的姿态角度一样,不管mesh姿态角度怎么变化,mesh2始终保持同步mesh2.rotation.copy(mesh.rotation);renderer.render(scene, camera);requestAnimationFrame(render);}render();</script>
</html>
http://www.yayakq.cn/news/884538/

相关文章:

  • 手游源码网站长兴网站建设公司
  • 360网站优化工业企业网络推广方案
  • 建设银行金牛支行网站做有奖竞猜网站违法吗
  • 昌平县城做网站欧美专业牙科医院网站网页源码
  • 免费移动网站模板下载安装东莞美容网站建设
  • 手机网站排行榜镇平县建设局网站
  • 进一步加强网站内容建设龙岩任做网站的哪几个比较好
  • 抚州做网站价格多少做虚拟货币交易网站
  • 英迈思做的网站怎么样建设网站宽度最好是多少
  • 嘉兴市城乡规划建设管理网站外贸网站建设便宜
  • 网站ui设计规范企业培训网站模板
  • 建筑公司网站常用长尾词建app需要多少钱
  • 学校网站下载seo线上培训班
  • sns电商网站济南高端网站建设公司
  • 地方网站改版方案做网站什么笔记本好用
  • 做网站如何找项目批量建wordpress
  • 德商网站建设网页设计员的工作内容
  • 巴青网站制作浙江省建设协会网站首页
  • 免费漫画网站小白学做网站买什么书
  • 宿州网站建设优化甲醇网络销售怎么找客源
  • 莘县做网站推广静态网页html模板
  • 建设网站需要分析什么网页设计模板网站免费
  • 电子商务网站设计是什么网站大全网站免费
  • 个人快速建站怎么做网页app
  • 网上做网站接活怎么样网站做cnzz流量统计
  • 东莞网站建设哪个平台好企业网站排版规则
  • 个人网站什么好跨境电商怎么注册
  • 常州建设网站公司网站下载中心网站开发
  • 网站优化软件招一个程序员可以做网站吗
  • 学网站开发怎么样网站安全狗卸载卸载不掉