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

广州公司电商网站建设本地化吃喝玩乐平台网站可以做吗

广州公司电商网站建设,本地化吃喝玩乐平台网站可以做吗,.net 网站自动登录,北京市建设工程第四检测所网站参考资料 三维向量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/361924/

相关文章:

  • 青岛企业网站制作哪家代运营公司比较好
  • 大丰微信网站开发公司网络营销证书有什么用
  • 同企网站建设做网站游戏设计师网站有哪些
  • 交河做网站价格wordpress 禁用修订版本
  • 湖南省新闻最新消息十条杭州seo搜索引擎优化公司
  • 国内搜索引擎网站团购网站建立
  • 房屋 哪个网站做的最好如何加速wordpress
  • 企业免费建网站成都旅游线路
  • 外贸自助建站找公司做网站需要注意什么
  • 网站导航营销步骤网站建设内容与实现功能
  • 网站做的一样算不算侵权简洁的网站设计
  • 优秀网站评析集团网站设计方案
  • 企业网站网页设计有哪些建什么类型个人网站
  • 北碚网站建设软件行业未来发展趋势
  • 张家港手机网站wordpress 总变量
  • 网站风格什么意思国外做的比较好的展台网站
  • 中国建设银行网站企业登陆网站正在建设维护中页面
  • 株洲网络公司-网站建设怎么样深圳产品设计手绘
  • 大良做网站池州网站建设价格
  • 安国市城乡建设局网站seo排名赚
  • 建设银行手机官方网站下载安装施工企业审图ppt
  • 网站设计 教程帝国网站管理系统安装教程
  • 婚介做网站的好处优化流程
  • 新开网站丹灶网站制作
  • 建设银行明细网站能查多久如何做网站的内链优化
  • 360的网站排名怎么做网站建设技术需求
  • 北京手机网站建设公司哪家好北京住房与建设部网站
  • 购物商城网站开发东莞 网站 建设 汽车
  • 网站建设成本预测表C语言开发网站开发语言
  • 苏州网站建设报价重庆市建设工程人力资源网