xxxxxxxxxx
463
var DTcount = 0;
// various random splash texts
var splashTexts = [
"nothing here yet!",
"null",
"undefined",
"NaN",
"the void consumes",
"hgrregbrbrblr",
"bite people",
"gender is yeah",
"urbanization waits for no one",
"I HAVE NO BONES",
"NEUROS states that",
"I hate irrational numbers",
"sine functions my beloved",
"GORP",
"be a creature",
"you fungal peice of shit",
"THERE ARE CREATURES IN MY HEAD",
"<I>M<I>",
"[filtered]",
"you'll never see this splash text, weird",
"BITE PEOPLE",
"love yourself",
":3",
"AI art sucks >:P",
"look mom! I'm not human!",
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"no TERFs allowed",
"be more cringe",
"ehehe",
"am creature",
"mario wants YOUR kidneys",
"for managed democracy!",
"play Rain World",
"play corru.observer",
"wawawawawawawawaw",
"Five Pebbles is a catboy",
"WHEEEEEEEEEEEEEEEEEEE",
"I really think I'm funny",
"time is existentially terrifying",
"I'm just OOGLY GOO",
"I like cheese",
"I love Britain",
"thats a bit silly innit",
"slugcat",
"I am the superior organism",
"valstraxes are objectively really cool",
"DESTROY THEM WITH LASERS",
"railguns are cool",
"space is terrifying :D",
":D",
"ono",
":P",
">:P",
">:)",
"free Palestine!",
"human rights for all!",
"are my neighbors velociraptors?",
"THE BEES",
"goblin mode",
"creature mode",
"creature coded",
"the void is really empty",
"pirates are pretty cool",
"not enough sea monsters ):",
"ultrakill deez nuts",
"totally not randomly generated",
"[REDACTED]",
"skin",
"ourple",
"FREEMAN YOU FOOL",
"not a catboy",
"YOU'LL NEVER CATCH M-",
"be edgy",
"professional exister",
"fed",
"not a fed",
"hi",
"NUH UH",
"selling your data",
"MWAHAHA",
"so silly",
"get silly",
"get crispy",
"this simulation kinda sucks",
"SYSTEMS UNSTABLE",
"please standby",
"technical difficulties",
"operation will be done in 489d 12h 37m 12s",
"17",
"FREEZEDOWN, EVACUATE IMMEDIATELY",
"::incoherent::",
"the cake is real",
"Isn't it iron pick?",
"dinky the oiter",
"el mimir",
"greg's technology is sadistic",
"",
"E G O // V A L K Y R I E",
"le fishe au chocolate",
"THERES SO MANY RATS",
"the frogs put the chemicals in the water",
"dihidrogen monoxide is my favorite drink",
"can't scrape this! (please)",
"freedom!",
"Velzie's fondness for repetition is truly sickening",
"I think I am going to vomit",
"THIS FLESH COMPUTER FAILS ME ONECE MORE",
"sending you to the pear wiggler",
"they do not call me the gorpler",
"do not the goop",
"are you aware that your computer is on",
"the creature feature",
"not Gorbino's Quest",
"get bricks",
"soda makes you see faster",
"hello Gordon!",
"400 workplace accidents today",
"purchase doohickeys",
"steal.",
"vegetals",
"HGHGUHHUHHRGH",
"NOT THE FUNKUS",
"[UNDEFINED]",
"WOMP WOMP",
"donuts",
"the ocean is pretty cool",
"fish",
"FISH",
"funny words",
"I can type",
"*explodes cutely*",
"look Gordon, ropes!",
"greg",
"WHATS UP GAMERS",
"don't get flobbed",
"frutiger aero",
"explosion.wav",
"STOP IT",
"crunch wrap supreme",
"Black Mesa owns Wikipedia",
"sip-u-lacrum",
"that's #CrayCray"
]
splashTexts[splashTexts.length] = `there is a 1 in ${ splashTexts.length + 1 } chance of you seeing this`
var font
var buttonsLoaded = false;
var buttons = []
// button functions
function newButton(
name,
displayText,
textsize,
X,
Y,
W,
H,
Col1,
Col2,
ColP1,
ColP2,
bWidth,
func,
alx,
aly,
pad
) {
// Col inputs should be arrays or color()s
buttons[buttons.length] = [];
buttons[buttons.length - 1][0] = true;
buttons[buttons.length - 1][1] = name;
buttons[buttons.length - 1][2] = displayText ?? "";
buttons[buttons.length - 1][3] = textsize ?? 10;
buttons[buttons.length - 1][4] = X ?? 50;
buttons[buttons.length - 1][5] = Y ?? 50;
buttons[buttons.length - 1][6] = W ?? 50;
buttons[buttons.length - 1][7] = H ?? 50;
buttons[buttons.length - 1][8] = Col1 ?? color(255);
buttons[buttons.length - 1][9] = Col2 ?? color(0);
buttons[buttons.length - 1][10] = ColP1 ?? color(255);
buttons[buttons.length - 1][11] = ColP2 ?? color(0);
buttons[buttons.length - 1][12] = bWidth ?? 1;
buttons[buttons.length - 1][13] = func ?? function () {};
buttons[buttons.length - 1][14] = alx ?? CENTER;
buttons[buttons.length - 1][15] = aly ?? CENTER;
buttons[buttons.length - 1][16] = pad ?? 0;
}
function removeButton(name) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
for (let a = i; a < buttons.length; a++) {
buttons[a] = buttons[a + 1];
}
buttons.length = buttons.length - 1;
break;
}
}
}
function setButtonAlign(name, alx, aly) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][14] = aly;
buttons[i][15] = alx;
}
}
}
function toggleButton(name) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][0] = !buttons[i][0];
}
}
}
function setButtonEnabled(name, value) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][0] = value;
}
}
}
function setButtonPos(name, X, Y) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][4] = X;
buttons[i][5] = Y;
}
}
}
function setButtonSize(name, W, H) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][6] = W;
buttons[i][7] = H;
}
}
}
function setButtonColors(name, Col1, Col2, ColP1, ColP2) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][8] = Col1;
buttons[i][9] = Col2;
buttons[i][10] = ColP1;
buttons[i][11] = ColP2;
}
}
}
function setButtonText(name, Text, Size) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][2] = Text;
buttons[i][3] = Size ?? buttons[i][3];
}
}
}
function setButtonBorder(name, b) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][12] = b;
}
}
}
function setButtonPadding(name, p) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][16] = p;
}
}
}
function setButtonFunction(name, func) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][13] = func;
}
}
}
function runButton(name) {
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][1] == name) {
buttons[i][13]();
}
}
}
function clearButtons() {
buttons = [];
}
function preload(){
font = loadFont("/MPLUS1p-Medium.ttf")
}
let splashText
function setup() {
createCanvas(windowWidth, windowHeight);
splashText = splashTexts[ round(random(0, splashTexts.length - 1)) ]
newButton("wasteof button","wasteof.money",20,borderPadding + 10, borderPadding + 50, 200, 40, [158, 0, 255], [10,0,10],[158,0,255],[10,0,10], 3, function() {
window.open("https://wasteof.money/users/mef")
})
newButton("tumblr button","tumblr",20,borderPadding + 10, borderPadding + 100, 200, 40, [158, 0, 255], [10,0,10],[158,0,255],[10,0,10], 3, function() {
window.open("https://www.tumblr.com/voidcreatureinthevoid")
})
newButton("pixilart button","pixilart",20,borderPadding + 10, borderPadding + 150, 200, 40, [158, 0, 255], [10,0,10],[158,0,255],[10,0,10], 3, function() {
window.open("https://www.pixilart.com/7vector")
})
}
// button and mouse input handling
function mouseReleased() {
pressed = false;
for (let i = 0; i < buttons.length; i++) {
if (
buttons[i][0] &&
mouseX > buttons[i][4] &&
mouseX < buttons[i][4] + buttons[i][6] &&
mouseY > buttons[i][5] &&
mouseY < buttons[i][5] + buttons[i][7] &&
!pressed
) {
buttons[i][13]();
pressed = true;
}
}
}
// auto resize
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
var lineSpacing = 70
var lineSpeed = 10
let borderPadding = 55
function draw() {
background(10,0,10);
DTcount += round(deltaTime/1000,3)
textFont(font)
cursor(ARROW)
// grid background
stroke(100,0,250)
strokeWeight(2)
for(let i = 0; i < ceil( max(windowWidth,windowHeight) / lineSpacing ) + 1; i++){
let pos = round( (i*lineSpacing) + (DTcount*lineSpeed)%lineSpacing,1) + 0.5
line(0, pos - 3, windowWidth, pos - 3)
line(pos - 18, 0, pos - 18, windowHeight)
}
// main background
fill(10,0,10)
stroke(158,0,255)
strokeWeight(3)
rect(borderPadding-0.5,borderPadding-0.5,windowWidth - (2*borderPadding), windowHeight - (2*borderPadding))
fill(158,0,255)
rect(borderPadding,borderPadding, 160, 40)
noFill()
stroke(10,0,10)
triangle( borderPadding + 20, borderPadding + 29,
borderPadding + 10, borderPadding + 11,
borderPadding + 30, borderPadding + 11)
triangle( borderPadding + 27, borderPadding + 30,
borderPadding + 47, borderPadding + 30,
borderPadding + 37, borderPadding + 12)
fill(10,0,10)
noStroke()
textAlign(CENTER,CENTER)
textSize(25)
text("7vector",borderPadding+55, borderPadding + 2, 100,30)
fill(158,0,255)
textAlign(LEFT,TOP)
text(splashText,borderPadding+170, borderPadding + 3)
// button drawing code
for (let i = 0; i < buttons.length; i++) {
if (buttons[i][0]) {
let Hover =
mouseX > buttons[i][4] &&
mouseX < buttons[i][4] + buttons[i][6] &&
mouseY > buttons[i][5] &&
mouseY < buttons[i][5] + buttons[i][7];
strokeWeight(buttons[i][12]);
textAlign(buttons[i][14], buttons[i][15]);
if (!Hover) {
stroke(buttons[i][8]);
fill(buttons[i][9]);
rect(
buttons[i][4] + 0.5,
buttons[i][5] + 0.5,
buttons[i][6],
buttons[i][7]
);
noStroke();
fill(buttons[i][8]);
textSize(buttons[i][3]);
text(
buttons[i][2],
buttons[i][4] + 0.5 + buttons[i][16],
buttons[i][5] + 0.5 + buttons[i][16] - buttons[i][3]/10,
buttons[i][6] - buttons[i][16] * 2,
buttons[i][7] - buttons[i][16] * 2
);
} else if (Hover) {
stroke(buttons[i][10]);
fill(buttons[i][10]);
rect(
buttons[i][4] + 0.5,
buttons[i][5] + 0.5,
buttons[i][6],
buttons[i][7]
);
noStroke();
fill(buttons[i][11]);
textSize(buttons[i][3]);
text(
buttons[i][2],
buttons[i][4] + 0.5 + buttons[i][16],
buttons[i][5] + 0.5 + buttons[i][16] - buttons[i][3]/10,
buttons[i][6] - buttons[i][16] * 2,
buttons[i][7] - buttons[i][16] * 2
);
cursor(HAND);
}
}
}
if(windowWidth < 800 || windowHeight < 600){
textAlign(CENTER,CENTER)
fill(255,0,0)
noStroke()
textSize(30)
text("[ WINDOW TOO SMALL ]", windowWidth/2, windowHeight/2)
}
}