The native team being on a well deserved break for the next 2 weeks, you might have to be a little patient for the answer but I have no doubt @bghgary @Cedric or @syntheticmagus will answer as soon as they are back.
To load and run new scripts, you can change this loadscript call and add new loadscript calls:
If you want to add new .js scripts, you will have to copy them in the assets folder thanks to this gradle script function:
Or you can add them manually by copying into the assets/scripts folder
Yes and no. The playground running in your browser uses the code in the editor with a little bit more code.
So, you will also to run this script:
Basically, your activity code will look this this:
Thank you @Cedric so much! It worked! One last question: I can’t seem to move around the scene on my emulator by clicking and dragging with my cursor. The scene is just still and I cannot change my point of view. Is there anything I can do to fix this? Thank you again!
User input is not fully supported yet. But you can provide some code to handle it like in this simple function:
Thank you very much! Happy holidays!
@Cedric One very last question, skyboxes still aren’t supported on Babylon Native right? How about textures and materials?
Thank you so much!
Skybox is supported, most of material as well but NME ones.
This PG works in BN for example:
Deterministic lockstep sample | Babylon.js Playground
Ok, thank you @Cedric . I was asking because I hsve tried to load demos such as Babylon.js Playground or https://playground.babylonjs.com/#3I55DK#0 and I could not get them to work, all I got from my emulator was a black screen. If I load the js script of the demo you posted as an example and the script for the playground_runner it should all work with no code changes? Android Studio is giving me this error “GetStringUTFChars received NULL jstring” but this is probably not related to the demo. Thank you so much again.
Can you provide a callstack for the failing
Just curious if the canvas polyfill has been merged yet? I checked last week and it was still passing some checks…and last time I rebuilt I noticed babylon.gui.js was included but not working in the playground
@waverider404 Happy new year!
Nop, it’s not been merged yet. I’ll continue working on it the coming weeks.
Happy new year!
Hi @Cedric . Sorry to revive an old thread but this seemed more relevant than creating a new one.
As you know, we’re using Babylon React Native at present but I’m wanting to do some testing with just Babylon Native and I can see how
experience.js can be replaced or other scripts loaded as you describe above, but I’m confused if and how we can
import other js from there (will that work in the BN context?) and also, our private npm packages have Babylon.js as an external dependency and don’t use the
BABYLON namespace, so how would I integrate these for testing in BN?
We basically have an exported
RenderService class which is instantiated by passing in an
Engine object, then it handles everything else - scene creation etc.