Added Startup IIFE to take care of the creation of a new project

It includes the old _createButton and _newPixel functions and a few private methods to divide the huge newPixel function into smaller chunks depending on their purpose. Those chunks could probably be part of other IIFEs, but we'll think about that in the future.
Fixed Input bug that caused the on function to pass an array of arguments instead of single arguments. Removed data_asdfgasd.hbs
This commit is contained in:
unsettledgames
2021-07-15 18:33:19 +02:00
parent 7c80e8f342
commit dcf896954f
11 changed files with 281 additions and 273 deletions

View File

@ -7,7 +7,7 @@ class Input {
function (e) {
// e = event
//this = element clicked
functionCallback(e, this, args);
functionCallback(e, ...args);
//if you need to access the event or this variable, you need to add them
//when you define the callback, but you cant use the word this, eg:
//on('click', menuButton, function (e, button) {});
@ -20,7 +20,7 @@ class Input {
//loop through children and add onClick listener
for (var i = 0; i < children.length; i++) {
on(event, children[i], functionCallback, args);
on(event, children[i], functionCallback, ...args);
}
}
}