URL syntax for Sandbox?

Hi there!

I’d like to learn which variables are available for URLs that load a glTF in the sandbox. I searched the help docs, but couldn’t find info about this.

For example:

https://sandbox.babylonjs.com/?kiosk=false&assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/e3a4ce73bc361ef1a4597a74d5bff5e3d70a3b7a/Models/CarConcept/glTF/CarConcept.gltf&cameraPosition=2,1.5,0&autoRotate=true
  • kiosk=
  • assetURL=
  • cameraPosition=
  • autoRotate=
  • etc.

Are there more arguments? What are the rules?

1 Like

The sandbox URL options are parsed and assigned at packages/tools/sandbox/src/sandbox.tsx:164.

3 Likes

I suggest adding it to the tutorial

1 Like

A tutorial would be helpful! It’s not clear from the code what the rules for each argument are.

I’d like to enable the Khronos PBR Neutral tonemapper, but it doesn’t seem to be a URL option?

There is something called set3DCommerceMode but I can’t see whether it actually does anything.

cc @bghgary

It’s not documented right now because it’s not intended to be a public feature yet. That said, it’s generally useful, so we probably should document it and make it public.

We don’t currently have a way to specify the tone mapper. We talked about making the 3dcommerce mode use the PBR Neutral tone mapper. Maybe now is a good time to do it. Let me see what I can do.

Add tone mapping parameter to sandbox by bghgary · Pull Request #15945 · BabylonJS/Babylon.js

Once this is merged, I’ll add some docs.

1 Like

This is great, thanks Gary!

1 Like

We now have two choices for Khronos PBR Neutral tone mapping.

https://sandbox.babylonjs.com/?asset=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/e3a4ce73bc361ef1a4597a74d5bff5e3d70a3b7a/Models/CarConcept/glTF/CarConcept.gltf&cameraPosition=2,1.5,0&autoRotate=true&toneMapping=KHR_PBR_Neutral

Or

https://3dcommerce.babylonjs.com/?asset=https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/e3a4ce73bc361ef1a4597a74d5bff5e3d70a3b7a/Models/CarConcept/glTF/CarConcept.gltf&cameraPosition=2,1.5,0&autoRotate=true

2 Likes