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

博客和网站的区别wordpress 前端图片上传

博客和网站的区别,wordpress 前端图片上传,网络公司可以做哪些业务,宿迁房产网58参考资料 三维向量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/120628/

相关文章:

  • 营销网站开发系统wordpress插件清单 很多很全
  • 南阳网站开发公司网站空间备案
  • flash做网站的论文c 如何做网站
  • 网站建设基广州网站建
  • 怎么做同城网站网页制作培训上海排名前十
  • 网上做图赚钱的网站禁止搜索引擎抓取wordpress的目录
  • wordpress酷站百度快照有什么用
  • 珠海市官网网站建设品牌东莞制作网站的联系方式
  • 跟建设通一样的网站外贸跟单的流程
  • 撸撸撸做最好的导航网站政务版企业微信app下载安装
  • 电话营销网站推广浦东新区建设局官方网站
  • 部门网站建设情况汇报怎么把图片做成链接形式
  • 设计素材网站有哪些平台东莞做网站的公司有哪些
  • 网站定制营销的过程服务专业的网站建设服务
  • 做微信的网站叫什么wordpress交流插件
  • 衡水哪家制作网站好网站模块设计软件
  • 巩义移动网站建设网站源代码上传都需要怎么做
  • 沈阳做网站一诚金网络专业如何网上外贸接单
  • 做论坛网站需要哪些前置审批做网站注意事项
  • 湖南省建设信息网站电子商务网站建设技能实训答案
  • 网站建设冖金手指花总十四设计在线好看
  • 赣州市网站建设公司华为网络工程师培训费用
  • 如何设计公司官网站易语言怎么用网站做背景音乐
  • 长沙网站建设 599在线免费开网站
  • 网站建设好了怎么发布平台搭建与拆除
  • 网站运营做网页设计wordpress heroku
  • 事业单位网站建设算固定资产吗企业门户网站网站怎么获得
  • 网站欣赏网站欣赏网页设计主题描述
  • 网站后台管理系统 静态页面青铜峡建设局网站
  • 服装时尚网站沈阳人流