sphere = {
var texture = new THREE.Texture(image);
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.needsUpdate = true;
var atexture = new THREE.Texture(imap);
atexture.wrapS = THREE.RepeatWrapping;
atexture.wrapT = THREE.RepeatWrapping;
atexture.needsUpdate = true;
var geometry = new THREE.SphereGeometry(radius, radius * 2.6, radius * 2);
var material = new THREE.MeshBasicMaterial({
wireframe: true,
map: texture,
alphaMap: atexture,
combine: 1
});
var sphere = new THREE.Mesh(geometry, material);
if (threedee) {
sphere.geometry.vertices = sphere.geometry.vertices.map(avertex);
sphere.geometry.computeVertexNormals();
sphere.geometry.normalsNeedUpdate = true;
sphere.geometry.verticesNeedUpdate = true;
}
return sphere;
}