uil 1.0.1 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/build/uil.js +7028 -4199
- package/build/uil.min.js +6 -4
- package/build/uil.module.js +7190 -2764
- package/package.json +52 -54
- package/src/Uil.js +0 -21
- package/src/core/Gui.js +0 -505
- package/src/core/Proto.js +0 -409
- package/src/core/Tools.js +0 -379
- package/src/core/add.js +0 -90
- package/src/polyfills.js +0 -85
- package/src/proto/Bool.js +0 -82
- package/src/proto/Button.js +0 -217
- package/src/proto/Circular.js +0 -198
- package/src/proto/Color.js +0 -369
- package/src/proto/Fps.js +0 -254
- package/src/proto/Group.js +0 -256
- package/src/proto/Joystick.js +0 -267
- package/src/proto/Knob.js +0 -143
- package/src/proto/List.js +0 -377
- package/src/proto/Numeric.js +0 -250
- package/src/proto/Slide.js +0 -261
- package/src/proto/TextInput.js +0 -91
- package/src/proto/Title.js +0 -52
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<p align="center"><a href="http://lo-th.github.io/uil/"><img src="http://lo-th.github.io/uil/examples/assets/uil.jpg"/></a><br>UIL v4.0.2</p>
|
|
2
|
+
|
|
3
|
+
uil.js is a lightweight ui for javascript with a complete 3d display support.<br>
|
|
4
|
+
totally customizable, only 6 events, auto resize<br>
|
|
5
|
+
[**Main example**](http://lo-th.github.io/uil/index.html)
|
|
6
|
+
|
|
7
|
+
**1 - init engine**
|
|
8
|
+
```sh
|
|
9
|
+
var ui = new UIL.Gui( { w:300 } )
|
|
10
|
+
```
|
|
11
|
+
**2 - add value**
|
|
12
|
+
```sh
|
|
13
|
+
ui.add('title', { name:'Title'})
|
|
14
|
+
ui.add('bool', { name:'Bool' })
|
|
15
|
+
ui.add('color', { name:'Color', type:'rgba', value:[0,1,1,1]})
|
|
16
|
+
ui.add('slide', { name:'Slide', value:50})
|
|
17
|
+
let myList = ui.add('list', { name:'List', list:['i1', 'i2', ...]})
|
|
18
|
+
```
|
|
19
|
+
**3 - add value with object reference**
|
|
20
|
+
```sh
|
|
21
|
+
const obj = {
|
|
22
|
+
name:'welcome to uil',
|
|
23
|
+
value: 2,
|
|
24
|
+
slider: 30,
|
|
25
|
+
vector: { x:10, y:-30 }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
ui.add( obj, 'string', { type:'string' })
|
|
29
|
+
ui.add( obj, 'value', { type:'number', min:0, max:10, precision:2, step:0.01 })
|
|
30
|
+
ui.add( obj, 'slider', { type:'slide' })
|
|
31
|
+
ui.add( obj, 'vector', { type:'number' })
|
|
32
|
+
```
|
|
33
|
+
**4 - callback return the value**
|
|
34
|
+
```sh
|
|
35
|
+
ui.add('number', { name:'Vector4', value:[0,0,0,0] }).onChange( function(v){ debug.innerHTML = v; } )
|
|
36
|
+
```
|
|
37
|
+
**5 - you can reset all value**
|
|
38
|
+
```sh
|
|
39
|
+
ui.clear();
|
|
40
|
+
```
|
|
41
|
+
**6 - other examples**
|
|
42
|
+
|
|
43
|
+
[**uil module**](http://lo-th.github.io/uil/examples/index_module.html)
|
|
44
|
+
|
|
45
|
+
[**uil listen**](http://lo-th.github.io/uil/examples/uil_listen.html)
|
|
46
|
+
|
|
47
|
+
[**uil color**](http://lo-th.github.io/uil/examples/uil_color.html)
|
|
48
|
+
|
|
49
|
+
[**uil stresstest**](http://lo-th.github.io/uil/examples/uil_stresstest.html)
|
|
50
|
+
|
|
51
|
+
[**uil group**](http://lo-th.github.io/uil/examples/uil_group.html)
|
|
52
|
+
|
|
53
|
+
[**uil to canvas**](http://lo-th.github.io/uil/examples/uil_to_canvas.html)
|
|
54
|
+
|
|
55
|
+
[**uil to three**](http://lo-th.github.io/uil/examples/uil_3d.html)
|
|
56
|
+
|
|
57
|
+
[**uil to three 2**](http://lo-th.github.io/uil/examples/uil_3d_2.html)
|
|
58
|
+
|
|
59
|
+
**7 - uil is on npm**
|
|
60
|
+
```sh
|
|
61
|
+
npm i uil
|