Problems to download example enabling floor meshes


I’m trying out the WebXR and I wanted to test this enabling floor meshes exampleto try it locally (self-hosted), but when you download it is not the real source code. Any idea whats going on?

See Introduction to the Playground - Babylon.js Documentation and check out the download section. The zip file contains the full HTML content as well as the playground code. See
First Steps - Babylon.js Documentation

Dear @JohnK, I had downloaded several other examples and run them locally. Do you mind trying to download it and see the files that are inside? It is not the example and dont have any Babylon script tag. So there is something wrong with he downloaded zip file.

It has been a long time since I downloaded code from the playground (PG). When I did you got a simple file consisting of the PG code wrapped in the template. It now seems that you get the full PG experience but without all the necessary files (or links) to run it. I have raised an issue Zip downloaded from Playground no longer produces a runnable files · Issue #7926 · BabylonJS/Babylon.js · GitHub

1 Like

Just to clarify, this is happening only for this example the other examples are working fine.

There are two issues here. The first is the newly introduced URL structure (/pg/PLAYGROUNDCODE) instead of hascode. use the hashcode ( in this case Babylon.js Playground ) and the index.html will download.

But then you will notice that the async keywork makes it not work. the createScene() call needs to be replaced with:

scene = createScene().then((scene) => {
  engine.runRenderLoop(function () {
    if (scene) {

Thanks @JohnK for the github issue, will be fixed soon.


Please check out this tutorial, is plenty of ( /pg/PLAYGROUNDCODE) links. That’s how I arrive there!

Otherwise, all people referencing to that tutorial might have the same problem.

No one said you did something wrong, I was just explaining the issue. Working on a solution

fixed, make sure to hard refresh the playground for it to work