Some PGs are broken

Hello,

Some of the PGs in the documentation are broken as variable declarations are missing (var), this usually happens to the camera but for others as well. Some examples:

https://playground.babylonjs.com/?inspectorv2=true#H1LRZ3#98

https://playground.babylonjs.com/?inspectorv2=true#FA2H7X#3

https://playground.babylonjs.com/?inspectorv2=true#ZGVYNB#2

I don’t think these were broken before.

All 3 of them work on my side, or am I missing something ? :thinking:

That’s interesting. They don’t work on my end. Using Linux and Firefox:

same with this one:

https://playground.babylonjs.com/?inspectorv2=true#AYJTKB

lines 5 and 36, had to declare the variables each to make the PG work

It’s weird that we don’t have the same (I’m Linux + Google Chrome)
It seems that you are being forced to strict mode while I’m not.

After a quick search on the forum I could find this topic from 2019 where strict mode was an issue but @Deltakosh had it fixed since he wanted retrocompatibility, and enabling strict mode would be breaking a lot of PGs. Maybe a recent change had the strict mode enabled for some of us ?

First post, first link (#98):

Windows, Firefox: 147.0.1


FYI, works in Chrome

@knervous anything that changed with the new playground ?

I’ve noticed that for a few months at least. Without proper variable declaration, the PGs don’t work in Firefox while they work in Chrome.

This might be the same root cause as this issue

We chatted with @sebavan and we will fix the PG in the doc as keeping the strict mode is a nice feature

working on it now

1 Like

Just clarifying that the demos posted above are some examples as there are broken PGs in other parts of documentation.

These are all the others in GreasedLines ,but I wonder if there is an easier way to fix the documentation other than hunting them down manually:

https://playground.babylonjs.com/?inspectorv2=true#FJRQ8N#149
https://playground.babylonjs.com/?inspectorv2=true#H1LRZ3#233

https://playground.babylonjs.com/?inspectorv2=true#H1LRZ3#123

It is a pain but we want to keep the strict on as it promotes better code hygiene (which apparently we lacked in the past)

1 Like

I fixed that 3 too

2 Likes