@@ -10,13 +10,6 @@ import {
1010	XRHandMeshModel 
1111}  from  './XRHandMeshModel.js' ; 
1212
13- import  { 
14- 	fetchProfile 
15- }  from  '../libs/motion-controllers.module.js' ; 
16- 
17- const  DEFAULT_PROFILES_PATH  =  'https://cdn.jsdelivr.net/npm/@webxr-input-profiles/[email protected] /dist/profiles' ; 18- const  DEFAULT_PROFILE  =  'generic-hand' ; 
19- 
2013class  XRHandModel  extends  Object3D  { 
2114
2215	constructor (  controller  )  { 
@@ -49,18 +42,19 @@ class XRHandModelFactory {
4942
5043	constructor ( )  { 
5144
52- 		this . path  =  '' ; 
45+ 		this . path  =  null ; 
5346
5447	} 
5548
5649	setPath (  path  )  { 
5750
5851		this . path  =  path ; 
52+ 
5953		return  this ; 
6054
6155	} 
6256
63- 	createHandModel (  controller ,  profile ,   options  )  { 
57+ 	createHandModel (  controller ,  profile  )  { 
6458
6559		const  handModel  =  new  XRHandModel (  controller  ) ; 
6660
@@ -70,7 +64,6 @@ class XRHandModelFactory {
7064
7165			if  (  xrInputSource . hand  &&  !  handModel . motionController  )  { 
7266
73- 				handModel . visible  =  true ; 
7467				handModel . xrInputSource  =  xrInputSource ; 
7568
7669				// @todo  Detect profile if not provided 
@@ -82,17 +75,9 @@ class XRHandModelFactory {
8275
8376					handModel . motionController  =  new  XRHandPrimitiveModel (  handModel ,  controller ,  this . path ,  xrInputSource . handedness ,  {  primitive : 'box'  }  ) ; 
8477
85- 				}  else  if  (  profile  ===  'oculus'  )  { 
86- 
87- 					fetchProfile (  xrInputSource ,  DEFAULT_PROFILES_PATH ,  DEFAULT_PROFILE  ) . then (  (  {  profile,  assetPath }  )  =>  { 
88- 
89- 						handModel . motionController  =  new  XRHandMeshModel (  handModel ,  controller ,  assetPath  ) ; 
90- 
91- 					}  ) . catch (  (  err  )  =>  { 
92- 
93- 						console . warn (  err  ) ; 
78+ 				}  else  if  (  profile  ===  'mesh'  )  { 
9479
95- 					}  ) ; 
80+ 					handModel . motionController   =   new   XRHandMeshModel (   handModel ,   controller ,   this . path ,   xrInputSource . handedness  ) ; 
9681
9782				} 
9883
0 commit comments