“@babylonjs/core”: “^4.2.1”,
import { WebXRExperienceHelper } from "@babylonjs/core/XR/webXRExperienceHelper";
import {WebXRFeatureName} from "@babylonjs/core/XR/webXRFeaturesManager";
I run the code to initialize XR locally. The code does not throw an exception, but the interface does not see a button similar to glasses (click to enter XR mode)
In the playground., I think the running code is normal, but the playground. loads all the packages
async function xrsetUP(scene,floorMeshes){
console.log('xr setup');
const xr = await scene.createDefaultXRExperienceAsync({
floorMeshes: floorMeshes
});
const featuresManager = xr.baseExperience.featuresManager;
const teleportation = featuresManager.enableFeature(WebXRFeatureName.TELEPORTATION, "stable", {
xrInput: xr.input,
floorMeshes: floorMeshes,
timeToTeleport: 5000,
useMainComponentOnly: true,
});
}