Unprotected access to `window` in thin engine

Offscreen canvas demo does not work either.
https://www.babylonjs.com/demos/offscreen/

See

1 Like

‘bag’ typo not intentional :^)

1 Like

Ok. Found something.
Using AdvancedDynamicTexture with TextBlock leads to calling ThinEngine.getFontOffset(), which uses document.

@RaananW @Evgeni_Popov pls check

The GUI lib is not supported outside of a browser context. GUI elements require the canvas context as well. There is sadly no way around it.

What you can do is override the function that calls this (Control._GetFontOffset) but then you won’t have font support

2 Likes

Then PR is ready to merge.

1 Like