rui.js
v0.0.1
Published
UI library for WebGL/Browser.
Downloads
1
Readme
RUI.js
UI library for WebGL/Browser.
RUI.js defines a DOM-like UI hierachy structure which can be rendered by using WebGL. Some basic UI widgets are provided for preview.
For layout,a seperated layout engine solves the flex-box-model layout for the entire UI tree. DIV-like flow layouting and flex are supported currently.
This project is still under pre-alpha stage
Quick Start
Run sample project.
//clone repo
git clone [email protected]:soyemi/RUI.js.git
npm install
//build lib
npm run build
//run sample
npm run build-sample
npm start
Usage
<canvas id="ruisample"></canvas>
import { RUISampleWidget } from "./RUISampleWidget";
let canvas = <HTMLCanvasElement>document.getElementById('ruisample');
//load font
RUIInitContext({
fontPath :'./resources/firacode.ttf'
});
//create RUIObject
let sample = new RUISampleWidget();
//Setup for DOMCanvas
let ruicanvas = new RUIDOMCanvas(canvas,sample);
more details : sample
License
MIT