0.0.1 • Published 6 years ago

rui.js v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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.

image


This project is still under pre-alpha stage

Quick Start

Run sample project.

//clone repo
git clone git@github.com: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