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 https://www.babylonjs-playground.com/#J62R3F#1 and copying and pasting the code from #11W1Y5#4 you get https://www.babylonjs-playground.com/#J62R3F#4 , which as far as I can see is the same code, and works??
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
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, https://www.babylonjs-playground.com/#3RTT8P#9 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.
Greeeeeaaaat news!
From what I checked ( btw I have a long long list with pgs ) they seem to work, at least for javascript. With typescript I’m stil having the issue with redirect to https://www.babylonjs-playground.com/ (ts version). All pgs (ts version) from my list redirect to base_url
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 http://www.babylonjs-playground.com/ts.html#ABCDE#xx redirect to http://www.babylonjs-playground.com/#ABCDE#xx which may or may not exist and hence the redirect to the default.