|
5883 | 5883 | new THREE.GLTFLoader().load('model.glb', object => { |
5884 | 5884 | avatarModel = object.scene; |
5885 | 5885 |
|
5886 | | - rig = new Rig(avatarModel, { |
5887 | | - boneMappings: { |
5888 | | - /* Hips: 'J_Bip_C_Hips', |
5889 | | - Spine: 'J_Bip_C_Spine', |
5890 | | - Chest: 'J_Bip_C_UpperChest', |
5891 | | - Neck: 'J_Bip_C_Neck', |
5892 | | - Head: 'J_Bip_C_Head', |
5893 | | - Eye_L: 'J_Adj_L_FaceEyeSet', |
5894 | | - Eye_R: 'J_Adj_R_FaceEyeSet', |
5895 | | -
|
5896 | | - Left_shoulder: 'J_Bip_L_Shoulder', |
5897 | | - Left_arm: 'J_Bip_L_UpperArm', |
5898 | | - Left_elbow: 'J_Bip_L_LowerArm', |
5899 | | - Left_wrist: 'J_Bip_L_Hand', |
5900 | | - Left_leg: 'J_Bip_L_UpperLeg', |
5901 | | - Left_knee: 'J_Bip_L_LowerLeg', |
5902 | | - Left_ankle: 'J_Bip_L_Foot', |
5903 | | -
|
5904 | | - Right_shoulder: 'J_Bip_R_Shoulder', |
5905 | | - Right_arm: 'J_Bip_R_UpperArm', |
5906 | | - Right_elbow: 'J_Bip_R_LowerArm', |
5907 | | - Right_wrist: 'J_Bip_R_Hand', |
5908 | | - Right_leg: 'J_Bip_R_UpperLeg', |
5909 | | - Right_knee: 'J_Bip_R_LowerLeg', |
5910 | | - Right_ankle: 'J_Bip_R_Foot', */ |
5911 | | - |
5912 | | - /* Hips: 'Hips', |
5913 | | - Spine: 'Spine', |
5914 | | - Chest: 'Chest', |
5915 | | - Neck: 'Neck', |
5916 | | - Head: 'Head', |
5917 | | - Eye_L: 'Eye_L', |
5918 | | - Eye_R: 'Eye_R', |
5919 | | -
|
5920 | | - Left_shoulder: 'Left_shoulder', |
5921 | | - Left_arm: 'Left_arm', |
5922 | | - Left_elbow: 'Left_elbow', |
5923 | | - Left_wrist: 'Left_wrist', |
5924 | | - Left_leg: 'Left_leg', |
5925 | | - Left_knee: 'Left_knee', |
5926 | | - Left_ankle: 'Left_ankle', |
5927 | | -
|
5928 | | - Right_shoulder: 'Right_shoulder', |
5929 | | - Right_arm: 'Right_arm', |
5930 | | - Right_elbow: 'Right_elbow', |
5931 | | - Right_wrist: 'Right_wrist', |
5932 | | - Right_leg: 'Right_leg', |
5933 | | - Right_knee: 'Right_knee', |
5934 | | - Right_ankle: 'Right_ankle', */ |
5935 | | - }, |
5936 | | - }); |
| 5886 | + // debugger; |
| 5887 | + |
| 5888 | + /* model.traverse(o => { |
| 5889 | + if (o.isSkinnedMesh) { |
| 5890 | + if (!window.skeleton) { |
| 5891 | + window.skeleton = o.skeleton; |
| 5892 | + } |
| 5893 | +
|
| 5894 | + // o.bind(skeleton); |
| 5895 | + } |
| 5896 | + }); */ |
| 5897 | + |
| 5898 | + rig = new Rig(avatarModel); |
| 5899 | + |
| 5900 | + avatarModel.visible = false; |
5937 | 5901 |
|
5938 | 5902 | scene.add(avatarModel); |
5939 | 5903 | }); |
|
0 commit comments