I’m trying to create a story/game that involves a textured terrain, so to avoid jagged faces between different textures, I turned to the creation of a MixMaterial. See a PG here. It works just fine
However, when I try to run it locally with BJS 4.1 using the same script as the PG, I get this error at :
TypeError: BABYLON.MixMaterial is not a constructor
Anyone know why? Do I need to get an “addon” script for BJS 4.1 for this functionality?
@Devin_Wright : I’m not a typescript user Devin. I just model then add javascripts to my projects using babylon4.1.js in the script list on my index.html page.
That is why I asked if there was an “addon” script of some kind.
Ahh I see. Where exactly are you getting babylon4.1.js? Are you by chance grabbing it from here?
I think you also will need to include <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script> in your html maybe.
@Devin_Wright : Ok, I seem to have it working now. So TY for your ideas and pointers. Only issue seems to be a little more laggy initially - but then I have no idea of the complexities of what is going on.
My problem is that I can display it on the playground. Then I take the code from the demo and apply it locally. The console prompts that babylon.mixmaterial is undefined