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

酒类网站该怎么做wordpress批量删除文章的插件

酒类网站该怎么做,wordpress批量删除文章的插件,服装品牌凡客,官方网站建设合同本文 我们来说法向 法向 又叫 法向量 就是 我们一个三维物体 顶点垂直于面 的方向 向量 他的作用 用来做光反射 根据光照的方向 根据面进行反射 我们上文写的这个代码 import ./style.css import * as THREE from three; import { OrbitControls } from …本文 我们来说法向 法向 又叫 法向量 就是 我们一个三维物体 顶点垂直于面 的方向 向量 他的作用 用来做光反射 根据光照的方向 根据面进行反射 我们上文写的这个代码 import ./style.css import * as THREE from three; import { OrbitControls } from three/examples/jsm/controls/OrbitControls.js;//创建相机 const camera new THREE.PerspectiveCamera(45, //视角 视角越大 能看到的范围就越大window.innerWidth / window.innerHeight,//相机的宽高比 一般和画布一样大最好0.1, //近平面 相机能看到最近的距离1000 //远平面 相机能看到最远的距离 ); const scene new THREE.Scene(); let uvTexture new THREE.TextureLoader().load(/textUv.jpg);const planeGeometry new THREE .PlaneGeometry(1, 1); console.log(planeGeometry); const planeMaterial new THREE.MeshBasicMaterial({map: uvTexture }) const planeMesh new THREE.Mesh(planeGeometry, planeMaterial); scene.add(planeMesh);const geometry new THREE.BufferGeometry(); console.log(geometry); // 创建顶点数据 const vertices new Float32Array([-1.0 ,-1.0 ,0.0,1.0 ,-1.0, 0.0,1.0 ,1.0 ,0.0,-1.0 ,1.0, 0.0 ]) geometry.setAttribute(position, new THREE.BufferAttribute(vertices, 3)); const indices new Uint16Array([0 ,1 ,2, 0, 3, 2]); const material new THREE.MeshBasicMaterial({map: uvTexture,side: THREE.DoubleSide }) const uv new Float32Array([0, 0, 1, 0, 1, 1, 0, 1 ]) geometry.setAttribute(uv, new THREE.BufferAttribute(uv, 2)); geometry.setIndex(new THREE.BufferAttribute(indices, 1)); const cube new THREE.Mesh(geometry, material); cube.position.x - 3 scene.add(cube)//c创建一个canvas容器 并追加到 body上 const renderer new THREE.WebGLRenderer(0); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement);//设置相机位置 这里 我们设置Z轴 大家可以试试 S Y 和 Z 都是可以的 camera.position.z 5; //设置相机默认看向哪里 三个 0 代表 默认看向原点 camera.lookAt(0, 0, 0); //将内容渲染到元素上 renderer.render(scene, camera); const controls new OrbitControls(camera, renderer.domElement);function animate() {controls.update();requestAnimationFrame(animate);/*cube.rotation.x 0.01;cube.rotation.y 0.01;*/renderer.render(scene, camera); } animate();运行起来 然后打开控制台 会发现 我们通过 PlaneGeometry 创建的几何体 它是自带法向量的 但我们自己创建的这个平面 它是没有的 我们将代码更改如下 import ./style.css import * as THREE from three; import { OrbitControls } from three/examples/jsm/controls/OrbitControls.js; import { RGBELoader } from three/examples/jsm/loaders/RGBELoader.js;//创建相机 const camera new THREE.PerspectiveCamera(45, //视角 视角越大 能看到的范围就越大window.innerWidth / window.innerHeight,//相机的宽高比 一般和画布一样大最好0.1, //近平面 相机能看到最近的距离1000 //远平面 相机能看到最远的距离 ); const scene new THREE.Scene(); let uvTexture new THREE.TextureLoader().load(/textUv.jpg);const planeGeometry new THREE .PlaneGeometry(1, 1); console.log(planeGeometry); const planeMaterial new THREE.MeshBasicMaterial({map: uvTexture,side: THREE.DoubleSide }) const planeMesh new THREE.Mesh(planeGeometry, planeMaterial); scene.add(planeMesh);const geometry new THREE.BufferGeometry(); console.log(geometry); // 创建顶点数据 const vertices new Float32Array([-1.0 ,-1.0 ,0.0,1.0 ,-1.0, 0.0,1.0 ,1.0 ,0.0,-1.0 ,1.0, 0.0 ]) geometry.setAttribute(position, new THREE.BufferAttribute(vertices, 3)); const indices new Uint16Array([0 ,1 ,2, 0, 3, 2]); const material new THREE.MeshBasicMaterial({map: uvTexture,side: THREE.DoubleSide }) const uv new Float32Array([0, 0, 1, 0, 1, 1, 0, 1 ]) geometry.setAttribute(uv, new THREE.BufferAttribute(uv, 2)); geometry.setIndex(new THREE.BufferAttribute(indices, 1)); const cube new THREE.Mesh(geometry, material); cube.position.x - 3 scene.add(cube)//c创建一个canvas容器 并追加到 body上 const renderer new THREE.WebGLRenderer(0); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement);//设置相机位置 这里 我们设置Z轴 大家可以试试 S Y 和 Z 都是可以的 camera.position.z 5; //设置相机默认看向哪里 三个 0 代表 默认看向原点 camera.lookAt(0, 0, 0); //将内容渲染到元素上 renderer.render(scene, camera); const controls new OrbitControls(camera, renderer.domElement);let rgbeloader new RGBELoader(); rgbeloader.load(/xhdr/Alex_Hart-Snow_Pano_2k.hdr,(texture) {scene.background texture;texture.mapping THREE.EquirectangularReflectionMapping;planeMaterial.envMap texture;material.envMap texture; })function animate() {controls.update();requestAnimationFrame(animate);/*cube.rotation.x 0.01;cube.rotation.y 0.01;*/renderer.render(scene, camera); } animate();这里 我们 RGBELoader引入环境贴图 然后 将我们两个材质都设置 envMap 为当前场景贴图 但明显 我们用PlaneGeometry创建的 有法向的几何体就可以反光 但我们自己写的这个几何体 并没有反射的一个效果 这边 问题就出在 我们自己创建的没有法向向量 这里 我们将代码改成这样 const geometry new THREE.BufferGeometry(); // 创建顶点数据 const vertices new Float32Array([-1.0 ,-1.0 ,0.0,1.0 ,-1.0, 0.0,1.0 ,1.0 ,0.0,-1.0 ,1.0, 0.0 ]) geometry.setAttribute(position, new THREE.BufferAttribute(vertices, 3)); const indices new Uint16Array([0 ,1 ,2, 0, 3, 2]); const material new THREE.MeshBasicMaterial({map: uvTexture,side: THREE.DoubleSide }) const uv new Float32Array([0, 0, 1, 0, 1, 1, 0, 1 ]) geometry.setAttribute(uv, new THREE.BufferAttribute(uv, 2)); geometry.computeVertexNormals(); geometry.setIndex(new THREE.BufferAttribute(indices, 1)); console.log(geometry); const cube new THREE.Mesh(geometry, material); cube.position.x - 3 scene.add(cube)因为执行顺序的问题 换了一些代码的位置 主要还是 用几何体对象执行了 computeVertexNormals 这样 我们在运行代码 我们自己创建的这个几何体 它就有法向向量了 我们两个板就都有效果了 但好像只出来了一半 没事 除了computeVertexNormals 我们还可以自己去定义 normal的值 参考代码如下 const geometry new THREE.BufferGeometry(); // 创建顶点数据 const vertices new Float32Array([-1.0 ,-1.0 ,0.0,1.0 ,-1.0, 0.0,1.0 ,1.0 ,0.0,-1.0 ,1.0, 0.0 ]) geometry.setAttribute(position, new THREE.BufferAttribute(vertices, 3)); const indices new Uint16Array([0 ,1 ,2, 0, 3, 2]); const material new THREE.MeshBasicMaterial({map: uvTexture,side: THREE.DoubleSide }) const uv new Float32Array([0, 0, 1, 0, 1, 1, 0, 1 ]) geometry.setAttribute(uv, new THREE.BufferAttribute(uv, 2)); const normals new Float32Array([0, 0, 1,0, 0, 1,0, 0, 1,0, 0, 1 ]) geometry.setAttribute(normal, new THREE.BufferAttribute(normals, 3)); geometry.setIndex(new THREE.BufferAttribute(indices, 1)); console.log(geometry); const cube new THREE.Mesh(geometry, material); cube.position.x - 3 scene.add(cube)这里 我们定义了一个数组 normals 对应四个角 我们都是 x和y都不管 面对x y的两个方向 反射不需要 就设置 z 就可以了 因为z是面对我们的方向 只要我们相机看得到这个反射效果就好了 然后将数组写入 normal 属性 运行结果如下 然后 为了我们能够更方便的调试 法向量 我们可以这样做 首先 我们需要在代码中导入 //导入顶点法向量辅助器 import { VertexNormalsHelper } from three/examples/jsm/helpers/VertexNormalsHelper.js;然后 我们可以随便找个地方这样写 const helper new VertexNormalsHelper(cube, 8.2, 0xff0000); scene.add(helper);接受三个参数 第一个 你要看哪个几何体的法向量就给他传进去 第二个 辅助线的长度 第三个 辅助线的颜色 运行之后 我们的效果就出来了 x y 都没有 只有y轴一条真线 它能够帮助我们更直观的看到法向量效果
http://www.pierceye.com/news/252400/

相关文章:

  • 新浪推网站蜘蛛网站长工作职责
  • 百度网站排名关键词整站优化将wordpress部署
  • 做的ASP网站手机微站和网站数据同步
  • 爱站网长尾关键词挖掘工具营销类型网站怎么建设
  • 泉州seo网站推广在线查企业
  • 东营房地产网站建设wordpress文章关键字替换
  • 网站制作哪里好薇网站建设中最重要的环节是
  • 中山做营销型网站石家庄招投标公共服务平台官网
  • 修改wordpress的站点地址WordPress全屏图
  • 购物网站建设源码wordpress如何更改页脚背景颜色
  • 大型网站开发技术注册网站代码
  • 网站建设管理报告网站建设专家北京注安
  • 免费网站生成软件网站备案中的网站名称
  • 桐庐做网站手机里编辑 Wordpress
  • 外网怎么进入萧山网站优化
  • 做资源下载网站好吗婚恋网站建设公司排名
  • 网站后台管理系统管理员登录wordpress页面模板下载地址
  • 网站用户体验网络科技公司网站制作
  • seo中文全称是什么360搜索怎么做网站自然优化
  • 青岛网站建设技术外包文本资料分享网站 建设
  • 做好网站建设工作wordpress转发微信缩略图
  • 马鞍山网站开发流程设计师免费资源导航
  • 成功的网站不仅仅是优化排视频网站建设应该注意什么
  • 如何制作网站和软件查询关键词密度网站的网址有哪些
  • 网站服务器查询平台贵阳网站改版
  • 怎样查看网站总浏览量寿县有做网站开发的吗
  • 东莞网站建设价格价格网建企业
  • 做播放器电影网站需要多少钱6网络工程师证
  • dw怎么做网站标题图标网站建设进度表 免费下载
  • 西安哪些做网站的公司好做电子商务网站的意义