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

wap网站建设教程小程序营销

wap网站建设教程,小程序营销,高端品牌车有哪些,雷山网站建设由于ply文件是第三方提供的#xff0c;threejs无法用绝路路径的方式显示ply 所以想通过webapi把ply通过url地址的方式给threejs 1.webapi部分 /// summary/// 获取PLY文件/// /summary/// returns/returns[HttpPost(Name GetPlythreejs无法用绝路路径的方式显示ply 所以想通过webapi把ply通过url地址的方式给threejs  1.webapi部分 /// summary/// 获取PLY文件/// /summary/// returns/returns[HttpPost(Name GetPly)]public async TaskIActionResult GetPly(GlueFileModel gfm){ string fileExt Path.GetExtension(gfm.PlyFile); //绝对路径的ply文件 例如D:\test\test.ply//获取文件的ContentTypevar provider new FileExtensionContentTypeProvider();//var memi provider.Mappings[fileExt];var memi application/octet-stream;var fileBytes System.IO.File.ReadAllBytes(gpm.PlyFile);string fileName Path.GetFileName(gpm.PlyFile);return File(fileBytes, memi, fileName);} 2.Vue部分取得ply文件 let pa { No: , PlyFile: D:/test/test.ply }//let pa { No: , PlyFile: GluePlyResultFile.value }let plyUrl await axios.post(global_const.WEBAPI Python/GetPly, pa, { responseType: blob }).then(function (response) {console.log(response);plyUrl window.URL.createObjectURL(new Blob([response.data]));return plyUrl//response.data;}).catch(function (error) {//ElMessage.error(cmd 命令执行异常 error)console.log(error);}); 3.threejs中load ply方法  //let s ../src/assets/ply/Result.plylet s plyUrl;loader.load(s,function (geometry) {console.log(loader.load );console.log(geometry);geometry.computeVertexNormals();const pos geometry.attributes.position;const count 10;// pos.count;const colorsArr [];for (let i 0; i count; i) {const percent i / count; //点索引值相对所有点数量的百分比//根据顶点位置顺序大小设置颜色渐变// 红色分量从0到1变化蓝色分量从1到0变化colorsArr.push(percent, 0, 1 - percent); //蓝色到红色渐变色}//类型数组创建顶点颜色color数据//const colors new Float32Array(colorsArr);// 设置几何体attributes属性的颜色color属性//geometry.attributes.color new THREE.BufferAttribute(colors, 3);// color vertices based on vertex positionsconst colors geometry.getAttribute(position).array.slice();console.log(colors,colors)for (let i 0, l colors.length; i l; i) {if (colors[i] 0) colors[i] 0.5;else colors[i] 0;}geometry.setAttribute(color, new THREE.BufferAttribute(colors, 3, false));const material2 new THREE.PointsMaterial({ size: 0.01, vertexColors: true });//THREE.VertexColors//const material.vertexColors true;let mesh2 new THREE.Points(geometry, material2);mesh2.position.x 1;//0;mesh2.position.y 2;//-1;mesh2.position.z 3;//0;mesh2.scale.multiplyScalar(0.4);mesh2.castShadow true;mesh2.receiveShadow true;scene.add(mesh2);scene.background new THREE.Color(0x52645b);console.log(loader.load OK);},function (xhr) {//console.log((xhr.loaded / xhr.total) * 100 % loaded);},function (err) {console.error(err);});
http://www.w-s-a.com/news/406067/

相关文章:

  • 保定网站seo哪家公司好wordpress教程视频下载
  • 网站开发 哪些文档网站海外推广方法
  • 广西建设局网站首页如何做条形码网站怎么搞
  • 琼海建设网站wordpress 商城站下载地址
  • 网站需要多大数据库divider wordpress
  • 兰州北京网站建设网络广告推广网站
  • 宁晋网站建设森网站建设
  • 网站没有收录原因trel域名
  • 建设门户网站的目的和需求台州专业网站建设方案
  • 苏州网站建设系统方案成都行业网站设计
  • wordpress多说读者墙seo分析师招聘
  • 视频网站开发计划书wordpress文件详情
  • 重庆付费网站推广电商网站 开发周期
  • thinkcmf 做企业网站视频播放类网站建设费用
  • vps网站助手大学选修课网站建设
  • 南浦电商网站建设北京海淀社保网站
  • 传奇网站模板怎么做的吗大连警方最新通告
  • 成都私人做公司网站的北京网站建设需要多少钱
  • 魔客吧是什麼程序做的网站代理厦门网站设计公司
  • 90设计手机站东营网站推广
  • 哪家购物网站建设好专门做水生植物销售网站
  • php医院网站开发兼职app开发网上app开发
  • 接任务做兼职的的网站衡阳手机网站设计
  • 徐州经济开发区网站佛山百度关键词seo外包
  • 肃宁网站建设有限责任公司法人承担什么责任
  • 珠海斗门建设局网站如何免费做网站
  • 自助外贸网站建设可直接打开网站的网页
  • 江苏城嘉建设工程有限公司网站潍坊网站定制公司
  • 四川省住房和城乡建设厅新网站宜昌建设厅网站
  • 建设网站一般流程建设开发网站