浏览代码

Change colors of spheres and boxes hands

Fernando Serrano 5 年之前
父节点
当前提交
09ba9c4533
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 2 2
      examples/jsm/webxr/XRHandPrimitiveModel.js
  2. 6 6
      examples/webxr_vr_handinput_mesh.html

+ 2 - 2
examples/jsm/webxr/XRHandPrimitiveModel.js

@@ -31,8 +31,8 @@ class XRHandPrimitiveModel {
 
 
 			}
 			}
 
 
-			var jointMaterial = new MeshStandardMaterial( { color: 0x000000, roughness: 0.2, metalness: 0.8 } );
-			var tipMaterial = new MeshStandardMaterial( { color: 0x333333, roughness: 0.2, metalness: 0.8 } );
+			var jointMaterial = new MeshStandardMaterial( { color: 0xffffff, roughness: 1, metalness: 0 } );
+			var tipMaterial = new MeshStandardMaterial( { color: 0x999999, roughness: 1, metalness: 0 } );
 
 
 			const tipIndexes = [
 			const tipIndexes = [
 				XRHand.THUMB_PHALANX_TIP,
 				XRHand.THUMB_PHALANX_TIP,

+ 6 - 6
examples/webxr_vr_handinput_mesh.html

@@ -115,10 +115,10 @@
 				scene.add( hand1 );
 				scene.add( hand1 );
 
 
 				handModels.left = [
 				handModels.left = [
-					handModelFactory.createHandModel( hand1, "oculus", { model: "lowpoly" } ),
-					handModelFactory.createHandModel( hand1, "oculus" ),
+					handModelFactory.createHandModel( hand1, "boxes" ),
 					handModelFactory.createHandModel( hand1, "spheres" ),
 					handModelFactory.createHandModel( hand1, "spheres" ),
-					handModelFactory.createHandModel( hand1, "boxes" )
+					handModelFactory.createHandModel( hand1, "oculus", { model: "lowpoly" } ),
+					handModelFactory.createHandModel( hand1, "oculus" )
 				];
 				];
 
 
 				handModels.left.forEach( model => {
 				handModels.left.forEach( model => {
@@ -154,10 +154,10 @@
 				scene.add( hand2 );
 				scene.add( hand2 );
 
 
 				handModels.right = [
 				handModels.right = [
-					handModelFactory.createHandModel( hand2, "oculus", { model: "lowpoly" } ),
-					handModelFactory.createHandModel( hand2, "oculus" ),
+					handModelFactory.createHandModel( hand2, "boxes" ),
 					handModelFactory.createHandModel( hand2, "spheres" ),
 					handModelFactory.createHandModel( hand2, "spheres" ),
-					handModelFactory.createHandModel( hand2, "boxes" )
+					handModelFactory.createHandModel( hand2, "oculus", { model: "lowpoly" } ),
+					handModelFactory.createHandModel( hand2, "oculus" )
 				];
 				];
 				handModels.right.forEach( model => {
 				handModels.right.forEach( model => {