Coder Social home page Coder Social logo

zloop1982 / babylonnative Goto Github PK

View Code? Open in Web Editor NEW

This project forked from babylonjs/babylonnative

0.0 1.0 0.0 35.14 MB

Build cross-platform native applications with the power of the Babylon.js JavaScript framework

License: MIT License

C 0.14% C++ 6.93% JavaScript 92.12% CMake 0.39% Java 0.34% Swift 0.04% Objective-C 0.01% Objective-C++ 0.03%

babylonnative's Introduction

Build Status

Babylon Native

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.

Getting Started

Windows

Prerequisites

Build

  • 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.

    NOTE: If you get the CMake error No preprocessor test for "Intel", update your Visual Studio to 16.3 or higher.

    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

Android / iOS / MacOS

Planned but not yet implemented

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 and SPIRV-Cross. See ShaderCompiler.h and its corresponding implementation for details.

arcana.cpp

This project makes substantial use of the utilities contained within the arcana.cpp project, especially the support for asynchronous task execution and thread synchronization.

N-API

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.

bgfx

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.

base-n

This project uses base-n to implement base64 decoding for parsing data URLs.

curl

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.

Contributing

Please read 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]. 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.

babylonnative's People

Contributors

bghgary avatar cedricguillemet avatar syntheticmagus avatar trevordev avatar zloop1982 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.