I need help to create a skybox

35 views Asked by At

I have this website project that works but I want to add a skybox, and that doesn't work for me. Here's a code snippet of what's not working:

scene.background = new THREE.CubeTextureLoader()
  .setPath( '../img/' )
    .load( [
        'windows.png',
    'windows.png',
    'windows.png',
    'windows.png',
    'windows.png',
    'windows.png'
    ] );

Does anyone know how I get this to work? The code is copied from threejs.org, I just changed the file paths which I think are correct so it should work but it doesn't. There are no error messages in the console.

0

There are 0 answers