the list describes what the default experience does under the hood. And it does initialize a base experience helper, amond other things (as you also found out yourself). It does also state that:
To check if the default experience helper initialized correctly, make sure the baseExperience variable was created:
I can change the text thou if you find it confusing
It says it’s equivalent, but first of all, there is no WebXRDefaultExperienceHelper class. Assuming it meant WebXRExperienceHelper.CreateAsync, it’s still not actually equivalent because it returns a WebXRExperienceHelper and not a WebXRDefaultExperience.
And yeah, that line after that is also confusing, because “default experience helper” is not a thing. I guess it might just be an ambiguous phrase, because if it said “default experience’s helper” it would be easy to follow that there is a default experience which has a helper field.
It is the main entry to XR (well, the default one), and is the one returned when you use either one of those functions that you mentioned.
Internally, it has an instance of the webxr experience helper. it adds a few other important features on top (pointer selection, teleportation, ui and more).
The default experience is actually a helper as well Due to historical reasons and backwards compatibility its name has not been changed, but all in all - it is a helper. This is why the documentation was written this way.
I have no problem changing the variable name in the doc I changed the variable name in the documentation (thanks for that) , but eventually - it is the developer’s decision what they name their vars and other members. The important part is understanding the API and the structure. And I do hope this part was clear.
Ok, so it looks like my problem with the API docs is that CreateAsync in WebXRExperienceHelper - Babylon.js Documentation says it returns a WebXRExperienceHelper, but it actually returns a WebXRDefaultExperience.
The CreateAsync of the Default Experience returns default experience (as in your playground). The Experience helper’s CreateAsync returns a basic experience helper:
Ok cool, I see there’s another class that snuck in there. Last nitpick, the new code doesn’t work in a copy/paste sense because the WebXRExperienceHelper doesn’t have the BABYLON. prefix. Unless you already have some preference on that, it would help the newbies coming upon this article.
Yeah, this is a decision we have to make when writing the documentation - do we always use the Babylon namespace, or just use the classes. People using imports / es66 will argue that they can’t copy-paste too because of the babylon namespace.
We always provide playground examples with the code so you don’t need to work hard to see an example. this is a trade-off between providing a 100% working code (in the playground) to providing a clean code that can be used by all.