标签:ota camera func cloc 循环 ext element 实例化 color
首先,引入js文件:
<script type="text/javascript" src="./path/to/OrbitControls.js"></script>
然后,实例化:
//实例化 orbitcontrols orbitcontrols = new THREE.OrbitControls(camera,renderer.domElement); orbitcontrols.target = new THREE.Vector3(0, 0, 0); orbitcontrols.autoRotate = false; clock = new THREE.Clock();
最后,循环渲染:
//实时渲染 function Loop(){ delta = clock.getDelta(); orbitcontrols.update(delta); renderer.render(scene,camera); requestAnimationFrame(Loop); }
1
three.js 使用OrbitControls.js自由视角观察
标签:ota camera func cloc 循环 ext element 实例化 color
原文地址:https://www.cnblogs.com/Skate0rDie/p/10281460.html