It compiles, starts, runs, but it it returns Undefined…
You have to return a napi::value, not a string.
Like in this xmlhttprequest :
I’ve changed it to Napi::Value, the code on the git is not updated yet…
Updated the code in the git, for some reason it doesn’t work, it gives true as isUndefined.
You didn’t define getBuilding for the JS engine only setBuilding.
so getBuilding is undefined.
I don’t use getBuilding in Javascript, only in Java… Should I define it in javascript too ?
Can you put a breakpoint in setbuilding to be sure it’s called before calling getbuilding?
Also, can you try to store the value using a native c++ type (std::string?) instead of a napi value.
You are right… apparently I was capturing the touch event in java (so setBuilding wasn not called at all), also conversion to std::string (on the java side) made it stop crashing, everything now works properly.
Thank you very much.
Can you please refer me to the proper usage of CreateGroundFromHeightMap in Native as it keeps failing.
Can you please provide the error or a PG? Many features of babylonjs are not supported yet.
Can you provide your .js script ? I’ll test it on linux.
Do you know the request url that’s failing?
This is the URL http://192.168.0.10/3d/assets/images/02.jpg … Which is correct, tested in chrome on the device, it loads the proper image. Tried both as PNG/JPG, with the same result. Below is the image.
The function createImageBitmap
is not implemented yet in BabylonNative. I’ve added an issue:
Thank you, I will also take a peak and see if I can get it working…
The function looks like LoadTexture but returns a uint8array.
A good starting point can be BabylonNative/TestUtils.h at f32e02dde3476e443173443ce422a7e8dc806279 · BabylonJS/BabylonNative · GitHub
Feel free to provide a PR:) I’ll be happy to review it
Do you have any idea why this is failing ?
Also line 141180 of babylon.max.js
PS : I’ve sent you an invite to the new repo… It makes it easier to find files when we have the same file structure.