Answer the question
In order to leave comments, you need to log in
Darken background (picture) in three.js?
Just started learning three.js.
uploaded to the site CubeTextureLoader - 6 images of space.
const loaderBG = new THREE.CubeTextureLoader();
const texture = loaderBG.load([
'./assets/nebula_bg/nebula-xneg.png',
'./assets/nebula_bg/nebula-xpos.png',
'./assets/nebula_bg/nebula-yneg.png',
'./assets/nebula_bg/nebula-ypos.png',
'./assets/nebula_bg/nebula-zneg.png',
'./assets/nebula_bg/nebula-zpos.png',
]);
scene.background = texture;
texture.fog = new THREE.Fog(0x000000, 1, 1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question