An open API service indexing awesome lists of open source software.

https://github.com/tidev/ti.es6

ES6 wrapper for the Titanium API
https://github.com/tidev/ti.es6

Last synced: about 1 month ago
JSON representation

ES6 wrapper for the Titanium API

Awesome Lists containing this project

README

        



ti.es6


ES6 wrapper for the Titanium API

### Usage
###### tiapp.xml
```XML
...

...
ti.es6
...

...
```

#### Example
```JS
import { Window, Label, View, Animation, _2DMatrix } from './Titanium/UI';

let win = new Window({
title: 'ES6',
layout: 'vertical',
backgroundColor: 'gray'
}),
lbl = new Label({
color: 'white',
font: {
fontSize: '32'
},
text: 'ES6!'
}),
view = new View({
backgroundColor: 'red',
width: 100,
height: 100
}),
matrix = new _2DMatrix({
rotate: 90
}),
animation = new Animation({
transform: matrix,
duration: 3000
});

win.addEventListener('postlayout', async () => {
await view.animate(animation);
view.backgroundColor = 'orange';
alert('DONE ANIMATION!');
});

win.add([lbl, view]);
win.open();
```
##### NOTE
You can also specify sub-modules like so:
```JS
import _Titanium from './Titanium';

const { UI } = _Titanium;
const { Window, Label, View, Animation, _2DMatrix } = UI;
```

#### Author
Gary Mathews