TODOS:
- Image scaling mode: fit, cover, manual
- Image positioning
- Image padding
- Multiple images
- Multiple borderImages
- Horizontal scroll and scrollbar
- Optional scrollbar
- Optional content scroll
| /* Properties are nothing more but a complex event handlers */ | |
| GUI.properties.myProperty = { | |
| /* Order of appliance when set in group */ | |
| order: 3, | |
| /* Rendering order to determine wheter it should be drawn before or after other properties */ |
TODOS:
| /* | |
| What I would like to have is a way to build an element out of components. | |
| Components can duplicate and order can be easily set. | |
| */ | |
| ".content button": [ | |
| ["image", "button.png", 0, 0], | |
| ["sprite", "flames", "center", "center"], |
| /* Paste that into console (F12) and hit enter */ | |
| setInterval(function() { | |
| $("button[value=INCREASE]").click() | |
| }, 5000); |
| /* Paste that into console (F12) and hit enter */ | |
| window.clicker = setInterval(function() { | |
| $("button[value=INCREASE]").click() | |
| }, 5000); |
| var client = new WebSocket("ws://IP:1337"); | |
| var last = Date.now(); | |
| client.addEventListener("message", function(event) { | |
| var delta = Date.now() - last; | |
| console.log("Time since last message ", delta, "ms"); |
| function isPortTaken(port, fn) { | |
| var net = require('net') | |
| var tester = net.createServer() | |
| .once('error', function(err) { | |
| return fn(err); | |
| }) | |
| .once('listening', function() { | |
| /* You can reach absolute boundaries of game loop using events API. */ | |
| var app = playground({ | |
| }); | |
| app.on("step", function() { | |
| stats.begin(); | |
| var app = playground({ | |
| ready() { | |
| this.loaded = true; | |
| /* Call resize manually if you need to */ | |
| this.resize(); | |
| }, |
| { | |
| translation: function(tx, ty) { | |
| return [ | |
| 1, 0, 0, | |
| 0, 1, 0, | |
| tx, ty, 1, | |
| ]; | |
| }, | |
| rotation: function(angleInRadians) { |