浏览代码

Examples: Improved webxr_xr_haptics.

Mr.doob 2 年之前
父节点
当前提交
e0a631f1a5
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 二进制
      examples/screenshots/webxr_xr_haptics.jpg
  2. 3 3
      examples/webxr_xr_haptics.html

二进制
examples/screenshots/webxr_xr_haptics.jpg


+ 3 - 3
examples/webxr_xr_haptics.html

@@ -117,9 +117,9 @@
 
 
 					const intensity = ( i + 1 ) / BOXES;
 					const intensity = ( i + 1 ) / BOXES;
 					const w = 0.1;
 					const w = 0.1;
-					const h = 0.1;
-					const minH = 1;
-					const geometry = new THREE.BoxGeometry( w, h * i + minH, w );
+					const h = 0.05 * i + 0.5;
+					const geometry = new THREE.BoxGeometry( w, h, w );
+					geometry.translate( 0, h / 2, 0 );
 					const material = new THREE.MeshStandardMaterial( {
 					const material = new THREE.MeshStandardMaterial( {
 						color: new THREE.Color( intensity, 0.1, 0.1 ),
 						color: new THREE.Color( intensity, 0.1, 0.1 ),
 						roughness: 0.7,
 						roughness: 0.7,