Ngui profile

This is a GUI layout display engine and cross-platform GUI application development framework, based on NodeJS/OpenGL. It is also the first mobile Android/iOS integration NodeJS front-end GUI project, so JavaScript has become a true front-end all-in-one language.

The goal of Ngui: Developing GUI applications on this basis can have the performance and experience of Native applications with the simplicity and speed of Developing WEB applications.

  • For now, it only supports iOS and Android. AndroidTV is not included because TV apps are very different from mobile apps

  • From here Go API Index can Go to API Documents Index

Simple Examples

This is a simple screen display of Hello World! The program

import { GUIApplication, Text } from 'ngui'
new GUIApplication().start(
	<Text>hello world!</Text>
)
Copy the code

You can get more detailed Examples

Start Usage

If you have never used Ngui before you can start from here and build your Ngui application step by step.

Install ngui-tools

First you need to install the toolkit provided by Ngui

  • Install nGUI-Tools using nodeJS NPM

  • Open Terminal and run the following command:

# shell
$ sudo npm install -g ngui-tools

Copy the code
  • Running nGUI-tools relies on NodeJS and PYTHon2.7

  • It does not run on Windows, but only on MAC or Linux

Create new project

Create a new Ngui project using the following shell command:

# shell
$ mkdir myproject
$ cd myproject
$ ngui init
Copy the code

Build project

This step compresses and packages the javascript code and resource files in the project. If this is a new project, skip this step and go to the next step

# shell
$ ngui build
Copy the code

Export project

This step exports the Xcode or Android Studio project, because you will eventually distribute the application as an.APk or.IPA

# shell
# export xcode ios project
$ ngui export ios
# export android studio project
$ ngui export android
Copy the code

After exporting the project, you can then open it using Xcode and Android Studio

Ngui test http server

Ngui-tools provides a test HTTP server that you don’t need to reinstall every time you modify js or JSX code

To start it, execute the following code:

# shell
$ ngui
Copy the code

Downloads

  • Examples demo Android APK Install package

  • Project Source code from Github