Suddenly unable to use BABYLON.MeshBuilder

I’ve been using a local server setup for weeks to work on a project.

Today I am suddenly unable to use any of the BABYLON.MeshBuilder commands. In the Firefox console, I keep getting a too much recursion error.

Admittedly, I am new to this, but I can import models models without a problem. It just seems to be any BABYLON.MeshBuilder command.
The simple SPHERE playground examples work fine online (not locally).
I’ve reset the system with no change.

I’ve made no changes other than the JS file I’m working on.

Any help would be appreciated. I’m kind of lost after an hour of trying.

Can you share some code?

So I went line by replacing code with a script that worked. When I added in code for a material, it would work, which was weird.

So it turns out I left a line at the bottom of the script:

scene.onNewMaterialAddedObservable.add(function(mat){mat.backFaceCulling = false;});

which was throwing up the recursion errors with a missing material. Being NOT a JS coder, this eluded me for quite some time.

On the plus side, I now have the editor and bonehead achievement.

Thanks to all who looked.

I figured it out. Thanks for the reply, though. I was trying to simplify a working script and very new to JS and Babylon. I’m learning really quick though.

1 Like

Glad you figured it out!

Pretty cool you figured it out and let us know :slight_smile: Happy Coding

Thanks. I’m having a blast learning this. I’ll be here a bunch for sure. This forum is nice and friendly and helpful like the Redshift forum (top notch!).