|
var THREE = require('three'); |
|
|
|
var glAvatarSystem = { |
|
|
|
curSkeleton: { |
|
name: null, |
|
scene: null |
|
|
|
|
|
}, |
|
|
|
curVisibilityArray: null, |
|
|
|
curAccessories: { |
|
clothes: { |
|
name: null, |
|
scene: null |
|
|
|
|
|
}, |
|
hair: { |
|
name: null, |
|
scene: null |
|
|
|
|
|
}, |
|
face: { |
|
name: null, |
|
scene: null |
|
}, |
|
instrument: { |
|
name: null, |
|
scene: null |
|
} |
|
}, |
|
|
|
|
|
skeletons: {}, |
|
|
|
accessories: { |
|
clothes: {}, |
|
hair: {}, |
|
face: {}, |
|
instrument: {} |
|
}, |
|
|
|
|
|
|
|
repo: { |
|
skeletons: { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'no-face': { |
|
url: 'models/gltf/saber-mixamo-body-no-face/saber-body-animations.gltf', |
|
|
|
cameraPos: new THREE.Vector3(1.5, 2, 1.5), |
|
center: new THREE.Vector3(0, 0.8, 0), |
|
objectRotation: new THREE.Euler(0, 180, 0), |
|
|
|
skins: { |
|
hair: 'maid', |
|
clothes: 'maid-dress', |
|
face: 'saber' |
|
} |
|
} |
|
|
|
}, |
|
|
|
|
|
clothes: { |
|
'maid-dress': 'models/gltf/saber-dress-mixamo/saber-dress.gltf', |
|
'suit': 'models/gltf/saber-suit/saber-suit.gltf' |
|
}, |
|
hair: { |
|
'maid': 'models/gltf/saber-maid-hair-mixamo/saber-maid-hair.gltf', |
|
'lily': 'models/gltf/saber-lily-hair-sub-skeleton/saber-lily-hair-sub-skeleton.gltf' |
|
}, |
|
|
|
face: { |
|
'saber': 'models/gltf/saber-face/saber-face.gltf', |
|
'eriri': 'models/gltf/saber-face/eriri-face-test.gltf' |
|
}, |
|
|
|
|
|
instrument: { |
|
|
|
} |
|
}, |
|
|
|
isLoaded: function (type, key) { |
|
return key in this.accessories[type]; |
|
} |
|
}; |
|
|
|
export { glAvatarSystem }; |