Bumpy images are not displayed.
And when I add to the scene the new sphere, created to put the clouds detached from the already existing one, the black earth is displayed.
I leave you the code below:
var sphere = new THREE.SphereGeometry(
EARTH_RADIUS,
EARTH_SEGMENTS,
EARTH_RINGS
);
var material = new THREE.MeshBasicMaterial({
transparent: true,
opacity: 0.9,
});
THREE.ImageUtils.crossOrigin = "";
(material.map = THREE.ImageUtils.loadTexture("img/earth-large.jpg")),
(material.bumpMap = THREE.ImageUtils.loadTexture("img/bump-large.jpg")), //does not work
(material.bumpScale = 0.005),
(material.specularMap = THREE.ImageUtils.loadTexture("img/large-nz-a.png")) ,//does not work
(material.speculare = new THREE.Color("blue"));
// Create a new mesh with sphere geometry.
var mesh = new THREE.Mesh(sphere, material);
// Add mesh to globe
earth.add(mesh);
scene.add(earth);
//create a new sphere for the overlay clouds
var nuvole = new THREE.Mesh(
new THREE.SphereGeometry(300, 80, 80),
new THREE.MeshPhongMaterial({
map: THREE.ImageUtils.loadTexture("img/clouds-large.jpg"), //does not work
trasparente: true,
})
);
scene.add(nuvole);