nayeon jeongyeon momo sana jihyo mina dahyun chaeyoung tzuyu
This commit is contained in:
parent
347be60f56
commit
435a6b0075
|
|
@ -1,7 +1,15 @@
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//URL
|
//URL
|
||||||
|
|
||||||
urlParams = new URLSearchParams(window.location.search);
|
urlParams = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Objects
|
//Objects
|
||||||
|
|
||||||
//getKeyByValue code by SO UncleLaz: https://stackoverflow.com/questions/9907419/how-to-get-a-key-in-a-javascript-object-by-its-value
|
//getKeyByValue code by SO UncleLaz: https://stackoverflow.com/questions/9907419/how-to-get-a-key-in-a-javascript-object-by-its-value
|
||||||
|
|
@ -10,6 +18,10 @@
|
||||||
return Object.keys(object).find(key => object[key] === value);
|
return Object.keys(object).find(key => object[key] === value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//RNG
|
//RNG
|
||||||
|
|
||||||
//Random integer from 0 to n
|
//Random integer from 0 to n
|
||||||
|
|
@ -77,6 +89,10 @@
|
||||||
return Math.floor(randomFunction() * (max - min + 1)) + min
|
return Math.floor(randomFunction() * (max - min + 1)) + min
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Arrays
|
//Arrays
|
||||||
|
|
||||||
//Shallow array comparer by SO Tim Down: https://stackoverflow.com/a/10260204
|
//Shallow array comparer by SO Tim Down: https://stackoverflow.com/a/10260204
|
||||||
|
|
@ -158,6 +174,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Checks
|
//Checks
|
||||||
|
|
||||||
//Element exists in the elements object
|
//Element exists in the elements object
|
||||||
|
|
@ -260,6 +280,10 @@
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Math(s)
|
//Math(s)
|
||||||
|
|
||||||
//Base n logarithm from https://stackoverflow.com/a/3019290
|
//Base n logarithm from https://stackoverflow.com/a/3019290
|
||||||
|
|
@ -305,6 +329,10 @@
|
||||||
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Color
|
//Color
|
||||||
|
|
||||||
function rgbStringToUnvalidatedObject(string) { //turns rgb() to {r,g,b} with no bounds checking
|
function rgbStringToUnvalidatedObject(string) { //turns rgb() to {r,g,b} with no bounds checking
|
||||||
|
|
@ -1183,6 +1211,10 @@
|
||||||
return `#${f(0)}${f(8)}${f(4)}`;
|
return `#${f(0)}${f(8)}${f(4)}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Pixels
|
//Pixels
|
||||||
|
|
||||||
function exposedToAir(pixel) {
|
function exposedToAir(pixel) {
|
||||||
|
|
@ -1540,6 +1572,10 @@
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//World
|
//World
|
||||||
|
|
||||||
function breakCircle(x,y,radius,respectHardness=false,changeTemp=false,defaultBreakIntoDust=false) {
|
function breakCircle(x,y,radius,respectHardness=false,changeTemp=false,defaultBreakIntoDust=false) {
|
||||||
|
|
@ -1639,6 +1675,10 @@
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Logic
|
//Logic
|
||||||
|
|
||||||
function xor(c1,c2) {
|
function xor(c1,c2) {
|
||||||
|
|
@ -1651,6 +1691,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//currentPixels operations
|
//currentPixels operations
|
||||||
|
|
||||||
function findInCurrentPixels(x,y) {
|
function findInCurrentPixels(x,y) {
|
||||||
|
|
@ -1710,6 +1754,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Sugar functions
|
//Sugar functions
|
||||||
|
|
||||||
function newElement(name="element_name",color="#FF00FF",otherProps={}) {
|
function newElement(name="element_name",color="#FF00FF",otherProps={}) {
|
||||||
|
|
@ -1722,6 +1770,10 @@
|
||||||
return elements[name];
|
return elements[name];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
//Fixes
|
//Fixes
|
||||||
|
|
||||||
//fix -1-caused ghost pixels
|
//fix -1-caused ghost pixels
|
||||||
|
|
@ -1750,8 +1802,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
libraryLoaded = true;
|
libraryLoaded = true;
|
||||||
|
this.libraryLoaded = true;
|
||||||
|
window.libraryLoaded = true;
|
||||||
|
|
||||||
runAfterLoad(function() {
|
runAfterLoad(function() {
|
||||||
|
if(!libraryLoaded) {
|
||||||
libraryLoaded = true;
|
libraryLoaded = true;
|
||||||
const libraryLoaded = true;
|
this.libraryLoaded = true;
|
||||||
});
|
window.libraryLoaded = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue