Playground fails for no reason

Hi everyone,

Sorry for bugging you with this but does the second playground fail for you as well?

Works: Babylon.js Playground
Crashes: https://playground.babylonjs.com/#DYZI0H#1

If it does crash for you too, does it complain about the missing uv declaration? If so, this does not make any sense. I am looking at the diff.

The code parts highlighted in red are the differences… No way this error should occur.

Best wishes
Joe


Oh, I think I can reproduce:

  • go to the first playground
  • search: const mix1 = new BABYLON.Texture("textures/mixMap.png", scene); (L23)
  • replace:
    const mix1 = new BABYLON.Texture("textures/mixMap.png", scene);
    const mix2 = new BABYLON.Texture("textures/mixMap.png", scene);
    const mix3 = new BABYLON.Texture("textures/mixMap.png", scene);
    const mix4 = new BABYLON.Texture("textures/mixMap.png", scene);
    const mixes = [mix1,mix2,mix3,mix4];

This crashes the working one for me. From then on, the playground is broken, i.e. deleting the extra lines, does not fix it.

In the second PG, you assign mix to the albedoTexture property of the material, but mix is undefined. It means no uv shader variable is generated, hence the error. If you replace it with mix1, for example, it will work.

Please tar and feather me :face_with_crossed_out_eyes:

4 Likes

We all have our slow monday :smiley:

1 Like