提交 5684921e 编写于 作者: W WestLangley

Tentatively added VertexTangentsHelper

上级 3be67bd5
......@@ -17,9 +17,12 @@
import { GLTFLoader } from './jsm/loaders/GLTFLoader.js';
//import { BufferGeometryUtils } from './jsm/utils/BufferGeometryUtils.js';
var scene, renderer;
var camera, light;
var vnh;
//var vth;
init();
animate();
......@@ -59,6 +62,8 @@
var mesh = gltf.scene.children[ 0 ];
//BufferGeometryUtils.computeTangents( mesh.geometry ); // generates bad data due to degenerate UVs
var group = new THREE.Group();
group.scale.multiplyScalar( 50 );
scene.add( group );
......@@ -71,6 +76,9 @@
vnh = new THREE.VertexNormalsHelper( mesh, 5 );
scene.add( vnh );
//vth = new THREE.VertexTangentsHelper( mesh, 5 );
//scene.add( vth );
scene.add( new THREE.BoxHelper( mesh ) );
var wireframe = new THREE.WireframeGeometry( mesh.geometry );
......@@ -127,6 +135,7 @@
light.position.z = Math.cos( time * 1.3 ) * 300;
if ( vnh ) vnh.update();
//if ( vth ) vth.update();
renderer.render( scene, camera );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册