Any working AR example available on PlayGround?

I found VR PlayGround examples on the document page, but when I try to open it on mobile (iPhone 13), it does not show anything.

I watched this conference on YouTube introducing AR, WebXR, and all, but it was mainly for Babylon React Native.

Are there more and working examples of WebXR and VR for Babylon.js (not Babylon React Native)?

I did find GitHub - BabylonJS/BabylonReactNativeSample for BRN :smiley: if anyone did not know :stuck_out_tongue:

but getting an error when running npm run ios

Thanks for the super helpful Github Page and the conference on YouTube :smiley:

cc @RaananW and @srzerbetto for the Native Sample

There is always the docs page - WebXR Augmented Reality Features | Babylon.js Documentation
for web samples
Not sure what happened with the native app, I hope @srzerbetto can help (cc @bghgary )

1 Like

@DOEHOONLEE , can you share some more information about your setup? What is the version of your Xcode? Also, what is your node version? Can you try running it with node 16?

1 Like

I cloned from GitHub - BabylonJS/BabylonReactNativeSample

running the following commands

npm install

cd ios

pod install

cd ..

npm run ios

and using node version 16.16.0

Not every example seems to be working as far as I know.

For example, in this PlayGround, all I see is just white screen

Or perhaps, iPhone is not compatible… yet?

Yeah, it is not. No WebXR on iOS. Write a later to Apple and be ignored like the rest of us :smirk:

You wrote a letter to Apple and got ignored? :frowning:

I got google model viewer to work on my iPhone. Isn’t this webXR as well?

no, that was a joke. But if you want you can write them a letter and be ignored.

model viewer doesn’t support AR using WebXR on iOS:

They might have a polyfill or something similar. And they do support loading the model and displaying it, of course.

@DOEHOONLEE , I’ve been trying to repro your IOS error but I was not able to. I saw some people refencing it as a node version problem, but I tried running the github sample repo with node 16.16, and 16.17 and they were all successful. I’m not sure what might be the cause for it.

I plan to update the sample repo to use react-native version 0.69 at some point this week. Maybe you can try it again than?

1 Like

Writing that letter asking for WebXR support be like:

3 Likes

Could the problem be coming from cocoapods pod or xCode ?

I plan to update the sample repo to use react-native version 0.69 at some point this week. Maybe you can try it again than?

→ sure :smiley:

Hmm… Is this different from WebXR? The model is loaded, I can move it around, re-scale it, and floors or walls are detected. This is on Safari.

I will be very happy to test it. What url are you using?

Do you mean the url to the github project?

No, I mean a URL i can open on an iPhone to see model viewer working like that?

Oh, sorry. My bad. I got too obsessed with the URL.createObjectURL thingy lol

  1. go to Google Model Viewer

  1. select a model to load on right Select Model

  1. once a model is loaded, click on DEPLOY MOBILE

  1. then turn on a camera on iPhone and go to the URL from the QR Code

This is a mobile application, not a website. This is not using webxr, but using “AR Quick Look”, which is preinstalled on your iphone. WebXR samples are not working on iOS devices

Hi @DOEHOONLEE , sorry for the late reply.

I’ve added a branch named “react-native-0-69” to the BabylonReactNativeSample repo. If you continues to have issues with you React Native project can you give it a try?

There is only one issue currently with that branch. If you are using a M1 mac you must manually exclude arm64 from the iOS Simulator architectures (this is required because babylon react native npm package does not have arm64 simulator binaries yet), to force the simulator to run under Rosetta.