Some playgrounds not working after last update?

As the title say. Some pgs not working. I suspect the last upgrade on pg side, but not sure:
and few more…
different ‘strange’ errors
Please check,, - from example section

few fixed examples fix some examples by Bulisor · Pull Request #1654 · BabylonJS/Documentation · GitHub
aaand looks like ts version of pg is not working too. At least the examples are not working, even if I’m on typescript, when I click on an example it moves to js.
And the same for ts pgs.
This redirect to

Some interesting issues and some further observations

Plenty of TS PGs do work (found from Playground menu in docs searching for public static, eg

Behaves as if this PG cannot be found so reverts to basic scene in javascript

Behaves as if this PG cannot be found so reverts to basic scene in typescript as ts.html indicates

Remove the comment on the first line of this (without deleting line) and you get a new error delayCreateScene is not a function and delete the first two lines and you get unexpected token: identifier
However using this PG as a starting point and copying and pasting the code from #11W1Y5#4 you get , which as far as I can see is the same code, and works??

1 Like

Will have a look ASAP!

thanks a lot guys for the repros!

Hi MarianG,

A fix is to declare createScene or delayCreateScene functions as varibles like so:

var createScene = function () { … };

Was your script successfully working with previous playground version ?

Hi @noalak and welcome to the forum. Well spotted on the difference between #11W1Y5#4 and #J62R3F#4 I had been looking at it for ages and never spotted the obvious.

Me too :joy:
Most of the fixes i did for few examples was to simple add ‘var’ to few variables, but I completly forgot for createScene.
Looks like the compiler is more restrictive and carefull with the sintax, which is good, but maybe need the errors to be more specific, I don’t know.

Yes @noalak. All of them worked in the previous. One of them is the ‘racing pg’ of Mackey, and it is recent.

Agree. Seems that there is now a strict mode applied to the playgrounds. In this PG, for example, gives the error assignment to undeclared variable pivotAt, the addition of var to lines 46 and 47 gets it working again.

@PatrickRyan @Deltakosh Strict mode is all well and good if applied from the start, applying it now will mean hundreds of PG will now have the potential to fail.

Yeah, the two MeshWriter PGs that github and NPM refer to now fail for missing ‘var’ statements.

I will fix them but it will take a while to straighten everything out. I cannot, for example, update the PG pointers in NPM unless I turn a new rev. That will be this weekend.

we will make sure to fix all of that so there will be NO backward issues :slight_smile: @noalak

1 Like

Ok I think I fixed everything
Please ping me if you find not working PGs

1 Like

Greeeeeaaaat news!
From what I checked ( btw I have a long long list with pgs :yum: ) they seem to work, at least for javascript. With typescript I’m stil having the issue with redirect to (ts version). All pgs (ts version) from my list redirect to base_url :frowning:

few examples:
// racing car - mackey- unitytool

// clipping object

// animated butons

// export only a specific mesh as glb/gltf

Yep let see if @noalak can have a look to the redirect for TS

Turns out I was wrong. On closer inspection, like the one above, there is no ts.html in the url, and were probably the ones written to test the new playground. The existing ones that have the form redirect to which may or may not exist and hence the redirect to the default.