How do I load a CubeTexture in the threejs editor?

Hi I noticed a new feature in the threejs editor “CubeTexture” for the background. I have attached an image.

But I can not seem to get this to work. What am I doing wrong? Is there a special type of image I should be using?

Thanks as always!!

Works as expected:
изображение
Just assigned 6 images (3 for positive (P), 3 for negative (N) planes/sides/axes)

1 Like

Thanks for the reply. That is strange it does not work for me at all. The moment I try to load an image my background turns black and none of the images show up.

What image format did you use?

*.jpg, took it from three.js distributive: examples\textures\cube\Bridge2\

You can use any image format you usually use for (LDR) textures so jpg, png or gif. Besides, RGBE textures (HDR) are supported, too.

1 Like

Load texture works perfectly with all those format types. It’s just the CubeTexture that doesn’t seem to work at all for me. Perhaps it’s a MacOS issue…

Nope, I’ve developed this feature on an iMac :wink:

Damn just me then! Could be the macbook pro 16in. I seem to keep seeing isolated issues just on that model

@makman Are you using images with height equal to width, for example 512x512?

Also consider to clear the site data after a new release. Otherwise the editor uses outdated locally cached resources:

I think that was it. I wasn’t using square images!

1 Like

Thank god my random testing image also wasn’t square :sweat_smile:

Three.js editor is cool, but I dont think it’s a commercial product (yet!), so some errors might go unnoticed under the radar.
When something unexpected happens, make sure to check the browser console. I think it logged a warning tex2D:incorrect texture size or something like that.

Thanks again!!

Is that their goal you think?

Without a cloud-backend it won’t be possible to do so. And because of the amount of possible data and the respective outgoing data-transfer, this will be an expensive undertaking. AFAIK, the idea is to keep the editor straightforward.

1 Like

Honestly Im not really sure what is the goal for the editor, or even what is it meant to be used for. I remember there was a thread about it somewhere, but I lost it :zipper_mouth_face: