@@ -140,7 +140,8 @@ class ColladaParser {
140140 visualScenes : { } ,
141141 kinematicsModels : { } ,
142142 physicsModels : { } ,
143- kinematicsScenes : { }
143+ kinematicsScenes : { } ,
144+ joints : { }
144145 } ;
145146
146147 this . library = library ;
@@ -157,6 +158,7 @@ class ColladaParser {
157158 this . parseLibrary ( collada , 'library_geometries' , 'geometry' , this . parseGeometry . bind ( this ) ) ;
158159 this . parseLibrary ( collada , 'library_nodes' , 'node' , this . parseNode . bind ( this ) ) ;
159160 this . parseLibrary ( collada , 'library_visual_scenes' , 'visual_scene' , this . parseVisualScene . bind ( this ) ) ;
161+ this . parseLibrary ( collada , 'library_joints' , 'joint' , this . parseLibraryJoint . bind ( this ) ) ;
160162 this . parseLibrary ( collada , 'library_kinematics_models' , 'kinematics_model' , this . parseKinematicsModel . bind ( this ) ) ;
161163 this . parseLibrary ( collada , 'library_physics_models' , 'physics_model' , this . parsePhysicsModel . bind ( this ) ) ;
162164 this . parseLibrary ( collada , 'scene' , 'instance_kinematics_scene' , this . parseKinematicsScene . bind ( this ) ) ;
@@ -1362,6 +1364,12 @@ class ColladaParser {
13621364
13631365 // kinematics
13641366
1367+ parseLibraryJoint ( xml ) {
1368+
1369+ this . library . joints [ xml . getAttribute ( 'id' ) ] = this . parseKinematicsJoint ( xml ) ;
1370+
1371+ }
1372+
13651373 parseKinematicsModel ( xml ) {
13661374
13671375 const data = {
@@ -1404,6 +1412,10 @@ class ColladaParser {
14041412 data . joints [ child . getAttribute ( 'sid' ) ] = this . parseKinematicsJoint ( child ) ;
14051413 break ;
14061414
1415+ case 'instance_joint' :
1416+ data . joints [ child . getAttribute ( 'sid' ) ] = this . library . joints [ parseId ( child . getAttribute ( 'url' ) ) ] ;
1417+ break ;
1418+
14071419 case 'link' :
14081420 data . links . push ( this . parseKinematicsLink ( child ) ) ;
14091421 break ;
0 commit comments