BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
22.75k stars 3.39k forks source link

Viewer alpha initial checkin #15241

Closed ryantrem closed 1 day ago

ryantrem commented 3 days ago

This is an initial very minimal subset of the new Viewer package. @CedricGuillemet and I got this far together in a side repo, and I'm mostly just bringing over the code. This is just enough to satisfy one specific use case we have in mind, but is not specific to that use case (it is just the min subset that supports that use case).

Included in this PR:

There are many TODOs in the code for things that are not complete, either because we don't need them for our initial use case, or because we're trying to keep the code minimal for the initial checkin.

In later PRs, we'll address the TODOs and also add a React test app.

This is what the Viewer looks like in the current test app:

image

bjsplat commented 3 days ago

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 commented 3 days ago

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

bjsplat commented 3 days ago

Snapshot stored with reference name: refs/pull/15241/merge

Test environment: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/15241/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/15241/merge https://gui.babylonjs.com/?snapshot=refs/pull/15241/merge https://nme.babylonjs.com/?snapshot=refs/pull/15241/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/15241/merge#BCU1XR#0

bjsplat commented 3 days ago

WebGL2 visualization test reporter:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/testResults/webgl2playwright/index.html

bjsplat commented 3 days ago

Visualization tests for WebGPU (Experimental)

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/testResults/webgpuplaywright/index.html

CedricGuillemet commented 2 days ago

With Node 20, I run npm install in bjs root, then npm run start in viewer-alpha folder. I get these errors :

image

Running npm install in viewer-alpha doesn't change. What am I missing?

bjsplat commented 2 days ago

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 commented 2 days ago

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

bjsplat commented 2 days ago

Snapshot stored with reference name: refs/pull/15241/merge

Test environment: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15241/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/15241/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/15241/merge https://gui.babylonjs.com/?snapshot=refs/pull/15241/merge https://nme.babylonjs.com/?snapshot=refs/pull/15241/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/15241/merge#BCU1XR#0

bjsplat commented 2 days ago

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

CedricGuillemet commented 2 days ago

With Node 20, I run npm install in bjs root, then npm run start in viewer-alpha folder. I get these errors :

image

Running npm install in viewer-alpha doesn't change. What am I missing?

npm run build before npm run start fixes it

bjsplat commented 2 days ago

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

bjsplat commented 1 day ago

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

ryantrem commented 1 day ago

With Node 20, I run npm install in bjs root, then npm run start in viewer-alpha folder. I get these errors :

image

Running npm install in viewer-alpha doesn't change. What am I missing?

This was due to not having project references for core and loaders. Without those references, you would need to manually build core and loaders first. Now the project references are there so it will work as expected even with a clean repo.

CedricGuillemet commented 1 day ago

With Node 20, I run npm install in bjs root, then npm run start in viewer-alpha folder. I get these errors : image Running npm install in viewer-alpha doesn't change. What am I missing?

This was due to not having project references for core and loaders. Without those references, you would need to manually build core and loaders first. Now the project references are there so it will work as expected even with a clean repo.

Tested and all good on my side!!

bjsplat commented 1 day ago

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