Skip to content

Conversation

@ryantrem
Copy link
Member

This is the initial implementation of the Inspector v2 umd package. We need this for a few reasons:

  1. There was one ask on the forum already for being able to use Inspector directly in a web page without bundling the code. The only solution we have for this right now is umd as we don't have bundled esm packages, and using packages with thousands of loose files directly in a page via esm is impractical due to the huge import map configuration that would be needed.
  2. Right now the versioning strategy used in Playground and Sandbox are based on umd bundles.
  3. We need umd for back compat.

The inspector v2 js bundle has a -v2 in the name, so it will not conflict with Inspector v2 when deployed to the Babylon CDN.

After this change goes in, I will have to update the pipeline to have the extra steps for publishing Inspector v2 as babylonjs-inspector@preview (basically the same as what has already been done with @babylonjs/inspector@preview).

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 28, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/testResults/

@deltakosh deltakosh enabled auto-merge (squash) October 28, 2025 21:22
@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Building or testing the sandbox has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 29, 2025

Building or testing the playground has failed.

If the tests failed, results can be found here:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/testResults/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17357/merge/

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17357/merge/?snapshot=refs/pull/17357/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Oct 31, 2025

@deltakosh deltakosh merged commit 140ec09 into BabylonJS:master Oct 31, 2025
21 of 22 checks passed
@ryantrem ryantrem mentioned this pull request Oct 31, 2025
ryantrem added a commit that referenced this pull request Nov 3, 2025
This is a follow up to my initial umd package PR:
#17357

In the initial PR, the path I went was to redirect `inspector` to
`inspector-v2` in the context of the Inspector v2 build, since they
ultimately are the same package with different versions (v2 having the
`-prefix` suffix). This was simpler, but it turns out doesn't work with
the way we publish umd bundles to our cdn. For that, we need unique
entries in the package mappings, so now I've added a separate entry for
inspector-v2. This gets used by the prepareSnapshot script to determine
what gets copied to the cdn. The way I set it up is the inspector v2
bundle gets copied to the inspector directory, but with a new unique
name (babylon.inspector-v2.bundle.js). I tested the snapshot copy
locally, but in the process I noticed that we were copying
webpack.config.js files to the cdn (because they match the *.js glob).
For example: https://cdn.babylonjs.com/webpack.config.js. @docEdub - we
should probably try to figure out how to remove all these
webpack.config.js files from the cdn.

For now I'm making this PR draft so that I can verify the snapshot cdn
functionality before merging, and also I don't want to touch any cdn
publishing related stuff on a Friday afternoon. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants