Babylon.js Playground: Samples broken following ES Modules migration

I haven’t checked everything yet, but it seems some official samples have stopped working.

There are likely more, but here are the ones I’ve found so far.

Among the samples on https://doc.babylonjs.com/addons/htmlMesh, the following produce runtime errors:

https://playground.babylonjs.com/#HVHYJC#5

https://playground.babylonjs.com/#B17TC7#112

On https://doc.babylonjs.com/setup/support/webGL2/, the following produces a runtime error:

https://playground.babylonjs.com/#QDAZ80#3

I’ll fix that asap!!

1 Like

All fixed! Should be live in less than 10minutes

Thanks a ton @cx20 !

1 Like

I think there are other samples that aren’t working yet, but I’m feeling sleepy, so I’ll stop here for today.

https://doc.babylonjs.com/toolsAndResources/utilities/Frame/

https://playground.babylonjs.com/#ZGVYNB
https://playground.babylonjs.com/#ZGVYNB#1
https://playground.babylonjs.com/#ZGVYNB#2

https://doc.babylonjs.com/toolsAndResources/utilities/InnerMeshPoints/

https://playground.babylonjs.com/#2K3T61#8
https://playground.babylonjs.com/#2K3T61#2
https://playground.babylonjs.com/#2K3T61#7

https://doc.babylonjs.com/toolsAndResources/utilities/Line2D/

https://playground.babylonjs.com/#FA2H7X#3
https://playground.babylonjs.com/#FA2H7X#4
https://playground.babylonjs.com/#FA2H7X#5
https://playground.babylonjs.com/#FA2H7X#6
https://playground.babylonjs.com/#9MYFC2
https://playground.babylonjs.com/#9MYFC2#1
https://playground.babylonjs.com/#0RIS0M
https://playground.babylonjs.com/#0RIS0M#1
https://playground.babylonjs.com/#0RIS0M#2
https://playground.babylonjs.com/#0RIS0M#3
https://playground.babylonjs.com/#S7HM64
https://playground.babylonjs.com/#S7HM64#1
https://playground.babylonjs.com/#S7HM64#2
https://playground.babylonjs.com/#S7HM64#3
https://playground.babylonjs.com/#FA2H7X#18

cc @knervous
Here the issue: the PG does not accept anymore undeclared variables where before it was ok.

Do you know how to turn that behavior back on?

I will take a look asap latest tomorrow morning and will have something put together, thanks for the ping!

2 Likes

Got a PR up to address all of these cases I think. JS really can be the wild west sometimes. Should cover all the cases from these links you posted here which cover undeclared variables and this access.

2 Likes

Thanks mate! you rock!

1 Like