Build cross-platform native applications with the power of the Babylon.js JavaScript framework.
See this blog entry for more details.
This project is under heavy development. Not all intended platforms are currently implemented. DO NOT use in production code.
- CMake 3.12 or higher
- Python 3.x
- Visual Studio 2017 or 2019
- Clone this repo.
- Update the submodules.
C:\BabylonNative>git submodule update --init --recursive
- Create a new directory for the build files, e.g.
Build
at the root of the repo.C:\BabylonNative>mkdir Build
- Change your working directory to the new directory.
C:\BabylonNative>cd Build
- Run CMake from the new directory and point to the root of the repo.
C:\BabylonNative\Build>cmake ..
- Open the generated solution
BabylonNative.sln
.C:\BabylonNative\Build>start BabylonNative.sln
- Once the solution opens, right click the TestApp project, click "Set as StartUp Project" and click the play button at the top to run the test app which should render a box
Planned but not yet implemented
In order to compile the WebGL GLSL shader to the required bits for the target platform, this project utilizes glslang and SPIRV-Cross. See ShaderCompiler.h and its corresponding implementation for details.
This project makes substantial use of the utilities contained within the arcana.cpp project, especially the support for asynchronous task execution and thread synchronization.
This project uses a subset of node-addon-api and the JavaScript part of N-API to target either V8 or Chakra. See this thread for some context. There is also work needed to factor out the JavaScript part of node-addon-api.
The code is located here. Some small modifications were made to avoid node dependencies and improve performance. The Chakra version js_native_api_chakra.cc came from node_api_jsrt.cc and was modified to target Chakra directly. We will work on submitting these changes to the public version.
This project uses bgfx for the cross-platform rendering abstraction. It does not use the shader abstraction of bgfx, but instead compiles the WebGL GLSL shader at runtime and generates the shader header that bgfx expects. See NativeEngine.cpp for implementation details.
This project uses base-n to implement base64 decoding for parsing data URLs.
This project uses curl (or, more accurately, libcurl) as the backend for the provided implementation of XMLHttpRequest. At present, only a "golden path" is supported, but additional features will be added as they are required.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.