forked from BabylonJS/BabylonNative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial source with no submodules or build
- Loading branch information
Showing
79 changed files
with
180,208 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to | ||
agree to a Contributor License Agreement (CLA) declaring that you have the right to, | ||
and actually do, grant us the rights to use your contribution. For details, visit | ||
https://cla.microsoft.com. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need | ||
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the | ||
instructions provided by the bot. You will only need to do this once across all repositories using our CLA. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
## MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,62 @@ | ||
# BabylonNative | ||
# Babylon Native | ||
|
||
Build cross-platform native applications with the power of the Babylon.js JavaScript framework. | ||
|
||
See [this blog entry](https://medium.com/@babylonjs/babylon-native-821f1694fffc) for more details. | ||
|
||
*This project is under heavy development. Not all intended platforms are currently implemented. **DO NOT** use in production code.* | ||
|
||
## Getting Started | ||
|
||
*Coming soon...* | ||
|
||
## Development Notes | ||
|
||
### glslang and SPIRV-Cross | ||
|
||
In order to compile the WebGL GLSL shader to the required bits for the target platform, this project utilizes [glslang](https://github.com/KhronosGroup/glslang) and [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross). See [ShaderCompiler.h](./Engine/ShaderCompiler.h) and its corresponding implementation for details. | ||
|
||
### arcana.cpp | ||
|
||
This project makes substantial use of the utilities contained within the [arcana.cpp](https://github.com/microsoft/arcana.cpp) project, especially the support for asynchronous task execution and thread synchronization. | ||
|
||
### N-API | ||
|
||
This project uses a subset of [node-addon-api](https://github.com/nodejs/node-addon-api) and the JavaScript part of [N-API](https://github.com/nodejs/node/blob/master/src/js_native_api.h) to target either V8 or Chakra. See [this thread](https://github.com/nodejs/abi-stable-node/issues/354) for some context. There is also [work](https://github.com/nodejs/node-addon-api/issues/399) needed to factor out the JavaScript part of node-addon-api. | ||
|
||
The code is located [here](./Source/Napi). Some small modifications were made to avoid node dependencies and improve performance. The Chakra version [js_native_api_chakra.cc](./Source/Napi/js_native_api_chakra.cc) came from [node_api_jsrt.cc](https://github.com/nodejs/node-chakracore/blob/master/src/node_api_jsrt.cc) and was modified to target Chakra directly. We will work on submitting these changes to the public version. | ||
|
||
### bgfx | ||
|
||
This project uses [bgfx](https://github.com/bkaradzic/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](#glslang-and-SPIRV-Cross) and generates the shader header that bgfx expects. See [BgfxEngine.cpp](./Source/Engine/BgfxEngine.cpp) for implementation details. | ||
|
||
### base-n | ||
|
||
This project uses [base-n](https://github.com/azawadzki/base-n) to implement base64 decoding for parsing data URLs. | ||
|
||
### curl | ||
|
||
This project uses [curl](https://curl.haxx.se/) (or, more accurately, [libcurl](https://curl.haxx.se/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. | ||
|
||
### Updating Babylon.js | ||
|
||
To update the Babylon.js version: | ||
|
||
* The Babylon.js repo exists as a submodule in the [Modules/Babylon.js](Modules/Babylon.js) directory pointing to the [native](https://github.com/BabylonJS/Babylon.js/tree/native) branch. | ||
* If desired, merge in changes from other Babylon.js branches, including from the master branch. | ||
* This may require making changes to `src/Engine/babylon.nativeEngine.ts` to adapt to breaking changes in `src/Engine/babylon.engine.ts`. | ||
* Follow the [Babylon.js contribution documentation](http://doc.babylonjs.com/how_to/how_to_start) instructions to install prerequisites and do your first full build. | ||
* Run `UpdateBabylon.cmd core loaders`. | ||
|
||
## Contributing | ||
|
||
Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests. | ||
|
||
## Reporting Security Issues | ||
|
||
Security issues and bugs should be reported privately, via email, to the Microsoft Security | ||
Response Center (MSRC) at [[email protected]](mailto:[email protected]). 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](https://technet.microsoft.com/en-us/security/dn606155) key, can be found in | ||
the [Security TechCenter](https://technet.microsoft.com/en-us/security/default). |
Oops, something went wrong.