xxxxxxxxxx
85
let c;
let img;
var col1 = {
r: 255,
g: 0,
b: 0
}
var col2 = {
r: 255,
g: 255,
b: 255
}
var spot1 = {
x: 100,
y: 100
}
var spot2 = {
x: 100,
y: 100
}
var input;
var button;
var font;
function preload() {
font = loadFont('Metal-Up-Your-Ear.ttf');
img = loadImage('p5vikinggenerator.png');
}
var DRYArray = ['the valiant', 'the gutsy', 'the rebel', 'the fearless', 'the feared', 'the mighty', 'the wicked', 'the brillish', 'the undead', 'the forgotten', 'the brawny', 'the burly', 'the stoutish', 'the wayward', 'the toughened', 'the traveled', 'the boldish', 'the intrepid', 'the grand', 'the worthy', 'the abominable', 'the magnanimous', 'the considerate', 'the gritty', 'the almighty', 'the trickster,', 'the warrior, sir', 'the general, sir', 'the footsman, sir', 'the woodsman, sir', 'the pirate, sir', 'the wizard, sir', 'the redoubtable', 'the terrible', 'the iminent', 'the brave', 'the ripped', 'the brilliant', 'the dreaded', 'the nightmare, sir', 'the monster,',];
var ROTArray = ['proudhide', 'molt-tongue', 'dragon-strode', 'goodthorn', 'battle-talon', 'burncrest', 'broodscab', 'redroar', 'fire-chaser', 'rumblescream', 'bearfist', 'doom-helm', 'shiver-bow', 'night-heart', 'sharp-break', 'dawnbringer', 'man-thing', 'slow-burn', 'galigantis', 'battle-cat', 'thyperion', 'rockshade', 'metal-might', 'sword-fin', 'blackheart', 'throttle-horse', 'stonethrow', 'dark-sun', 'firemoon', 'skullhead', 'eyeless-one', 'dawnless-one', 'kraton', 'mumron', 'gnasher', 'slasher', 'ghost-ship', 'reaperfist', 'heavy-foot', 'swift-hand', 'broodish-one', 'sleepless-one', 'doggish', 'beastlord', 'dark-father', 'high-lord', 'white-whale', 'mighty-axe', 'acid-spit', 'tumbleclaw', 'lightfoot', 'heavyheart', 'time-thief',]
function setup() {
img = loadImage('p5vikinggenerator.png');
c = createCanvas (540, 540)
background(0)
noLoop();
}
function draw() {
image(img, 0, 0);
var randomOne = random(DRYArray);
var randomTwo = random(ROTArray);
var helloWorldMessage1 = randomOne
var helloWorldMessage2 = randomTwo
fill(255)
textFont(font);
textAlign(CENTER);
textSize(20);
text(helloWorldMessage1, 270, 100);
textSize(60);
text(helloWorldMessage2, 270, 150);
}
function keyTyped() {
if(key === '7')
saveCanvas(c, 'mySketch', 'png');
}