Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip downloaded from Playground no longer produces a runnable files #7926

Closed
BabylonJSGuide opened this issue Mar 27, 2020 · 2 comments
Closed
Assignees
Milestone

Comments

@BabylonJSGuide
Copy link
Contributor

Ref https://forum.babylonjs.com/t/problems-to-download-example-enabling-floor-meshes/9507/

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 all the PG code as well but without all the necessary files (or links) to run it.

From my point of view I would expect most users just want a simple working file(s) as it was before. If the intention is to create the full playground experience on zip download then more explanation is needed in the docs on how to run it and I would make this an option not a default.

@RaananW
Copy link
Member

RaananW commented Mar 27, 2020

A few notes:

  1. the problem is the new /pg/CODE url structure. if you load this with the hashcode it downloads correctly.
  2. Even if downloaded correctly, there is a problem when the async keyword. is used. the createScene() call should be changed to:
scene = createScene().then((scene) => {
  engine.runRenderLoop(function () {
    if (scene) {
      scene.render();
    }
  });
});

Will be fixed.

@BabylonJSGuide
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants