请人做网站需要多少钱,肉菜配送网站建设,flash 网站欣赏,建设银行的网站为什么这么卡程序示例精选 Html网页threejs显示obj,ply三维图像实例 如需安装运行环境或远程调试#xff0c;见文章底部个人QQ名片#xff0c;由专业技术人员远程协助#xff01; 前言
这篇博客针对《Html网页threejs显示obj,ply三维图像实例》编写代码#xff0c;代码整洁#xff0… 程序示例精选 Html网页threejs显示obj,ply三维图像实例 如需安装运行环境或远程调试见文章底部个人QQ名片由专业技术人员远程协助 前言
这篇博客针对《Html网页threejs显示obj,ply三维图像实例》编写代码代码整洁规则易读。 学习与应用推荐首选。 运行结果 文章目录
一、所需工具软件 二、使用步骤 1. 主要代码 2. 运行结果 三、在线协助
一、所需工具软件 1. VS2019, Qt 2. C
二、使用步骤
代码如下示例 !DOCTYPE html
html langenheadtitlethree.js webgl - loaders - OBJ MTL loader/titlemeta charsetutf-8meta nameviewport contentwidthdevice-width, user-scalableno, minimum-scale1.0, maximum-scale1.0stylebody {font-family: Monospace;background-color: #000;color: #fff;margin: 0px;overflow: hidden;}#info {color: #fff;position: absolute;top: 10px;width: 100%;text-align: center;z-index: 100;display:block;}#info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer }/style/headbodydiv idinfoa hrefhttp://threejs.org target_blankthree.js/a - OBJMTLLoader test/divscript srcjs/three.min.js/scriptscript srcjs/MTLLoader.js/scriptscript srcjs/OBJMTLLoader.js/scriptscriptvar container, stats;var camera, scene, renderer;var mouseX 0, mouseY 0;init();animate();function init() {container document.createElement( div );document.body.appendChild( container );camera new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 2000 );camera.position.z 1.5; //̹40// scenescene new THREE.Scene();var ambien new THREE.AmbientLight( 0x444444 );
THREE.DirectionalLight( 0xffeedd );directionalLight.position.set( 0, 0, 1 ).normalize();scene.add( directionalLight );// modelvar onProgress function ( xhr ) {if ( xhr.lengthComputable ) {var percentComplete xhr.loaded / xhr.total * 100;console.log( Math.round(percentComplete, 2) % downloaded );}};var onError function ( xhr ) {};var loader new THREE.OBJMTLLoader();loader.load(js/LQ.obj, js/LQ.mtl, function (object) {object.position.y -0.4; // 0 ̹tank -0.6 LQscene.add(object);var start new Date().getTime(), delta;}, onProgress, onError );//function onWindowResize() {windowHalfX window.innerWidth / 2;windowHalfY window.innerHeight / 2;camera.aspect window.innerWidth / window.innerHeight;camera.updateProjectionMatrix();renderer.setSize( window.innerWidth, window.innerHeight );}//function animate() {requestAnimationFrame( animate );render();}/script/body
/html
运行结果 三、在线协助
如需安装运行环境或远程调试见文章底部个人 QQ 名片由专业技术人员远程协助 1远程安装运行环境代码调试 2Visual Studio, Qt, C, Python编程语言入门指导 3界面美化 4软件制作 5云服务器申请 6网站制作 当前文章连接https://blog.csdn.net/alicema1111/article/details/132666851 个人博客主页https://blog.csdn.net/alicema1111?typeblog 博主所有文章点这里https://blog.csdn.net/alicema1111?typeblog
博主推荐 Python人脸识别考勤打卡系统 https://blog.csdn.net/alicema1111/article/details/133434445 Python果树水果识别https://blog.csdn.net/alicema1111/article/details/130862842 PythonYolov8Deepsort入口人流量统计https://blog.csdn.net/alicema1111/article/details/130454430 PythonQt人脸识别门禁管理系统https://blog.csdn.net/alicema1111/article/details/130353433 PythonQt指纹录入识别考勤系统https://blog.csdn.net/alicema1111/article/details/129338432 Python Yolov5火焰烟雾识别源码分享https://blog.csdn.net/alicema1111/article/details/128420453 PythonYolov8路面桥梁墙体裂缝识别https://blog.csdn.net/alicema1111/article/details/133434445