Change dome texture

Hi , i am traying to change the texture of a dome but it is not working , any help ?

dome = new BABYLON.PhotoDome(“testdome”,img1.jpg ,{resolution: 512,size: 1000},scene);
var mat = new BABYLON.StandardMaterial(“mat”, scene);
var texture = new BABYLON.Texture(“img2.jpg”, scene);
mat.diffuseTexture = texture;
dome.material = mat;


Can you repro in the playground?

yes , thanks ! Babylon.js Playground

sorry i dont see difference ?

no answer ? please it is important ! Thanks

As @Devin_Wright highlights there is no material on the photoDome but only a photoTexture property you can swap on demand:

dome.photoTexture = new BABYLON.Texture(actual, scene, false, false);

1 Like