hit2501

Babylon on Android, ios and PC apps.

15 posts in this topic

Hi.

I would like to know how can I do to use Babylon to make Android apps (Android Studio), ios apps and PC apps (Visual Studio).

Where can I start??

Thanks.

Share this post


Link to post
Share on other sites

This is based on web browsers....

Simplest thing is to make an Android/iOS ap that is just a web browser without the address bar etc. This is what a lot of people do. For a PC app I do not understand since every PC has a web browser... you just make a website.

Share this post


Link to post
Share on other sites

To use Babylon in a native Andoird or iOS app, you will need some kind of a container like Cordova/Phonegap or Cocoon.js - https://www.ludei.com/cocoonjs/

If you want to use Babylon.js in a native desktop app, you could try :

But I never tested any of those, this is just general information I can provide :-)

Share this post


Link to post
Share on other sites

Hi,

 

 Deltakosh and I have been spending a lot of time to garantee that Babylon.js runs fine on all platforms including mobile one: compatibility with the GPU of our shaders, performance and support for touch. It will run perfectly fine.

 

 You just need to embed it into a web view. To do that, you've got several options:

 

 1 - Build the native app using the web view yourself

 2 - Use Visual Studio 2015 to build a UWP app using web technologies

 3 - Use Cordova

 4 - Very interesting option you should have a look to: Manifold.js : http://manifoldjs.com/ It's an open source framework that will generate for you all mobiles projects based on your web sites: iOS, Android, Windows, Firefox OS.

 

 

Bye,

 

David

eps likes this

Share this post


Link to post
Share on other sites
On 10/16/2015 at 2:39 PM, davrous said:

Hi,

 Deltakosh and I have been spending a lot of time to garantee that Babylon.js runs fine on all platforms including mobile one: compatibility with the GPU of our shaders, performance and support for touch. It will run perfectly fine.

 You just need to embed it into a web view. To do that, you've got several options:

 

 1 - Build the native app using the web view yourself

 2 - Use Visual Studio 2015 to build a UWP app using web technologies

 3 - Use Cordova

 4 - Very interesting option you should have a look to: Manifold.js : http://manifoldjs.com/ It's an open source framework that will generate for you all mobiles projects based on your web sites: iOS, Android, Windows, Firefox OS.

Bye,

David

Hi David,

 

That is really interesting! :)  I use Basic4Android (www.b4x.com) to develop Android Apps - it works really well and have been looking to use Babylonjs to create a game.  To join the two together I've used a Webview and this works but I have a slight issue when trying to process the input from a VirtualJoystick (not Camera) - does anyone have experience of this?  Basically the VirtualJoystick intercepts PointerDown events and also part of the onPointerMove Events but it seems to lose focus of the onPointerMove Event and then you have to remove your finger from the screen and then reapply it to the screen and re-swipe or move..

 

This doesn't seem correct - can anyone give any help about trying to track down if the issue is with the Webview or with Babylonjs...  I'm using version 2.4 of Babylonjs.

 

Cheers!

 

Share this post


Link to post
Share on other sites

This is a very old thread.  I know that VirtualJoystick has been rewritten in either 2.5 or 3.0, probably 3.0.  Probably going to be hard to find someone track down problems that may no-longer exist in the latest implementation

Share this post


Link to post
Share on other sites

Cheers - I'm using the latest implementation (should have said) - it just seemed that 'Android' issues were being discussed - I wondered if anyone had succesfully used the VirtualJoystick in this way with Android and Webviews..  I've asked on my Android Forum - but I guess that they'd say "we don't know babylonjs ask there..." etc.. :) 

Share this post


Link to post
Share on other sites

Hello,

Yes, I've fixed a couple of bugs in 3.0 with VirtualJoystick. I still need to plan some time one day to refactor it to use UI elements inside the Babylon.js rendering canvas rather than adding a transparent canvas on top of it. 

For Android, which Pointer Events polyfill are you using? Hand.js or jQuery PEP? 

David 

Share this post


Link to post
Share on other sites
On 4/13/2017 at 11:31 AM, davrous said:

Hello,

Yes, I've fixed a couple of bugs in 3.0 with VirtualJoystick. I still need to plan some time one day to refactor it to use UI elements inside the Babylon.js rendering canvas rather than adding a transparent canvas on top of it. 

For Android, which Pointer Events polyfill are you using? Hand.js or jQuery PEP? 

David 

Hi David,

Sorry - we've been away over Easter, so I've not had a chance to respond earlier.

Many thanks for taking the time to respond, it's really appreciated.

I must admit I'm not entirely sure how the events are being handled..  I thought it was hand.js as I was referencing this, but I removed the reference to this library and the code still executed correctly - then I thought I'd read somewhere that VirtualJoystick (or perhaps VirtualJoystickCamera?) had been rewritten at some point to take advantage of PEP anyway...  I need to investigate a little more, although I have been investigating other control options as well, but the VirtualJoystick seemed to work so well.  I may well try V3 BabylonJS to see if there are improvements, but I'm not convinced that it isn't something to do with the ChromeClient that I'm using.  I need to improve my understanding in this area.

Merci!

Phil

Share this post


Link to post
Share on other sites

Quick update, I switched to PEP and retried my App - way better! :)

 

and it can detect multiple touch events :)

 

Fantastic! :)  Another hurdle cleared - just need to tweak the sensitivity and I will be well on my way.

 

Share this post


Link to post
Share on other sites
9 minutes ago, V!nc3r said:

Except mistake on my part, I don't see a tutorial about "packaging" a BJS application : http://doc.babylonjs.com/tutorials, this could be a great addition if someone is motivated :)

Do you mean how to package a BJS application using Basic4Android?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.