Hi i’m trying to create a simple code, were the Moon is revolving around the Earth. I know that there is an example but i don’t know why it doesn’t work. my problem is that everything works perfectly until i apply the texture on the planet. when i write map: earthtex, the sphere appears black, otherwise is appears with color 0x00aaff
var terraGeometry = new THREE.SphereGeometry(8,20,20);
var earthtex = new THREE.TextureLoader().load("earth_atmos_2048.jpg");
var terraMaterial = new THREE.MeshPhongMaterial({
color: 0x00aaff,
wireframe: false,
map: earthtex
});
var terra = new THREE.Mesh(terraGeometry,terraMaterial);