Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup() {
- createCanvas(400, 400);
- frameRate(60);
- }
- var progress = 0;
- var introFramesPassed = 0;
- var pulseFramesPassed = 0;
- var introSpeed = 1;
- var keyPressable = false;
- var totalXoff = 0;
- var totalYoff = 0;
- {
- var stoneTextureUnfiltered = [0,0,112,112,112,0,1,112,112,112,1,1,112,112,112,1,0,112,112,112,2,1,100,100,100,3,1,108,108,108,4,1,112,112,112,5,1,112,112,112,6,0,108,108,108,7,0,108,108,108,8,0,108,108,108,9,0,108,108,108,10,0,108,108,108,11,0,108,108,108,12,0,108,108,108,13,0,112,112,112,13,1,108,108,108,14,1,108,108,108,15,0,112,112,112,15,1,112,112,112,14,0,112,112,112,7,1,112,112,112,6,1,112,112,112,4,0,108,108,108,3,0,112,112,112,2,0,112,112,112,5,0,108,108,108,8,1,112,112,112,9,1,112,112,112,10,1,115,115,115,11,1,115,115,115,12,1,115,115,115,15,2,112,112,112,15,3,100,100,100,15,4,100,100,100,15,5,112,112,112,15,6,112,112,112,15,7,100,100,100,15,8,100,100,100,15,9,112,112,112,15,10,112,112,112,15,11,112,112,112,15,12,112,112,112,15,13,112,112,112,15,14,112,112,112,15,15,112,112,112,14,15,112,112,112,13,15,112,112,112,12,15,112,112,112,11,15,112,112,112,10,15,112,112,112,9,15,112,112,112,8,15,112,112,112,7,15,112,112,112,6,15,112,112,112,6,14,108,108,108,5,14,108,108,108,4,14,100,100,100,3,14,100,100,100,3,15,112,112,112,2,15,112,112,112,1,15,112,112,112,0,15,112,112,112,4,15,108,108,108,5,15,112,112,112,7,14,108,108,108,7,13,115,115,115,8,12,115,115,115,8,11,108,108,108,9,8,115,115,115,9,6,108,108,108,9,5,112,112,112,9,4,108,108,108,9,3,100,100,100,8,3,100,100,100,7,3,108,108,108,7,4,112,112,112,7,5,112,112,112,7,6,115,115,115,7,7,108,108,108,7,8,108,108,108,7,9,115,115,115,7,10,115,115,115,7,11,115,115,115,7,12,115,115,115,8,14,108,108,108,8,13,115,115,115,8,10,115,115,115,8,9,108,108,108,8,8,108,108,108,8,7,100,100,100,8,6,115,115,115,8,5,100,100,100,8,4,108,108,108,9,7,115,115,115,9,9,112,112,112,9,10,115,115,115,9,11,115,115,115,9,12,115,115,115,10,14,108,108,108,9,13,115,115,115,9,14,108,108,108,10,13,112,112,112,10,12,115,115,115,10,11,115,115,115,10,10,115,115,115,10,9,115,115,115,10,8,115,115,115,10,7,108,108,108,10,6,108,108,108,10,5,112,112,112,10,4,108,108,108,10,3,108,108,108,11,3,115,115,115,12,3,108,108,108,13,3,112,112,112,14,3,108,108,108,14,4,108,108,108,14,5,108,108,108,14,6,108,108,108,14,7,108,108,108,14,8,100,100,100,14,9,108,108,108,14,10,108,108,108,14,11,108,108,108,14,12,112,112,112,14,13,112,112,112,14,14,112,112,112,13,14,112,112,112,12,14,108,108,108,11,14,100,100,100,11,13,112,112,112,12,13,108,108,108,13,13,108,108,108,13,12,108,108,108,12,12,112,112,112,12,11,108,108,108,11,12,112,112,112,11,11,108,108,108,13,11,108,108,108,13,10,108,108,108,12,10,108,108,108,11,10,108,108,108,11,9,112,112,112,12,9,108,108,108,13,9,112,112,112,13,8,100,100,100,12,8,100,100,100,11,8,108,108,108,11,7,108,108,108,12,7,112,112,112,13,7,112,112,112,13,6,112,112,112,12,6,112,112,112,11,6,115,115,115,11,5,112,112,112,12,5,108,108,108,13,5,108,108,108,13,4,108,108,108,12,4,108,108,108,11,4,108,108,108,14,2,108,108,108,13,2,112,112,112,12,2,115,115,115,11,2,112,112,112,10,2,112,112,112,9,2,108,108,108,8,2,100,100,100,7,2,115,115,115,6,2,108,108,108,5,2,115,115,115,4,2,115,115,115,3,2,115,115,115,2,2,115,115,115,1,2,112,112,112,0,2,112,112,112,0,3,112,112,112,0,4,112,112,112,0,5,112,112,112,0,6,112,112,112,0,7,100,100,100,0,8,112,112,112,0,9,112,112,112,1,9,115,115,115,1,10,108,108,108,1,11,108,108,108,1,12,108,108,108,1,13,100,100,100,1,14,112,112,112,0,14,112,112,112,0,13,112,112,112,0,12,112,112,112,0,11,112,112,112,0,10,112,112,112,1,7,115,115,115,1,6,108,108,108,1,5,100,100,100,1,4,100,100,100,1,3,100,100,100,2,3,100,100,100,3,3,108,108,108,4,3,108,108,108,5,3,115,115,115,6,3,115,115,115,6,4,112,112,112,5,4,112,112,112,4,4,112,112,112,3,4,112,112,112,2,4,112,112,112,2,10,100,100,100,2,9,112,112,112,1,8,115,115,115,2,7,112,112,112,3,6,115,115,115,3,5,112,112,112,2,5,112,112,112,2,6,108,108,108,2,8,108,108,108,2,11,115,115,115,2,12,108,108,108,2,13,100,100,100,2,14,112,112,112,3,13,108,108,108,3,12,115,115,115,3,11,108,108,108,3,10,112,112,112,3,9,112,112,112,3,8,112,112,112,3,7,112,112,112,5,5,115,115,115,5,6,115,115,115,4,6,115,115,115,4,7,108,108,108,4,8,112,112,112,4,10,112,112,112,4,11,108,108,108,4,12,115,115,115,6,13,112,112,112,6,12,108,108,108,6,11,108,108,108,5,11,108,108,108,5,10,112,112,112,6,10,112,112,112,6,9,100,100,100,5,9,115,115,115,5,8,108,108,108,5,7,115,115,115,6,6,115,115,115,6,5,112,112,112,6,7,108,108,108,6,8,115,115,115,5,12,108,108,108,5,13,108,108,108,4,13,108,108,108,4,9,108,108,108,4,5,115,115,115,-1,7,112,112,112,-1,8,112,112,112];
- var characterEyesClosedUnfiltered = [0,0,100,0,100,1,1,100,0,100,1,0,100,0,100,0,1,100,0,100,0,2,100,0,100,0,3,100,0,100,0,4,100,0,100,0,5,100,0,100,0,6,100,0,100,0,7,100,0,100,0,8,100,0,100,0,9,100,0,100,0,10,100,0,100,0,11,100,0,100,0,12,100,0,100,0,13,100,0,100,0,14,100,0,100,0,15,100,0,100,1,15,100,0,100,1,14,100,0,100,1,13,100,0,100,1,12,100,0,100,1,11,100,0,100,1,10,100,0,100,1,9,100,0,100,1,8,100,0,100,1,7,100,0,100,1,6,100,0,100,1,5,100,0,100,1,4,100,0,100,1,3,100,0,100,1,2,100,0,100,2,14,100,0,100,3,14,100,0,100,4,14,100,0,100,5,15,100,0,100,6,14,100,0,100,7,14,100,0,100,8,14,100,0,100,9,14,100,0,100,10,14,100,0,100,11,14,100,0,100,12,14,100,0,100,13,14,100,0,100,14,14,100,0,100,15,14,100,0,100,15,15,100,0,100,14,15,100,0,100,12,15,100,0,100,11,15,100,0,100,10,15,100,0,100,9,15,100,0,100,8,15,100,0,100,7,15,100,0,100,6,15,100,0,100,5,14,100,0,100,4,15,100,0,100,3,15,100,0,100,2,15,100,0,100,13,15,100,0,100,2,0,200,0,200,2,1,200,0,200,3,1,200,0,200,3,0,200,0,200,4,0,200,0,200,5,0,200,0,200,6,0,200,0,200,7,0,200,0,200,8,0,200,0,200,9,0,200,0,200,10,0,200,0,200,11,0,200,0,200,12,0,200,0,200,13,0,200,0,200,14,0,200,0,200,15,0,200,0,200,15,1,200,0,200,14,1,200,0,200,13,1,200,0,200,12,1,200,0,200,11,1,200,0,200,10,1,200,0,200,9,1,200,0,200,8,1,200,0,200,7,1,200,0,200,6,1,200,0,200,5,1,200,0,200,5,2,200,0,200,4,2,200,0,200,3,2,200,0,200,4,1,200,0,200,2,2,200,0,200,2,3,200,0,200,2,4,200,0,200,2,5,200,0,200,2,6,200,0,200,2,7,200,0,200,2,8,200,0,200,2,9,200,0,200,2,10,200,0,200,2,11,200,0,200,2,12,200,0,200,2,13,200,0,200,3,13,200,0,200,3,12,200,0,200,3,11,200,0,200,3,10,200,0,200,3,9,200,0,200,3,8,200,0,200,3,7,200,0,200,3,6,200,0,200,3,5,200,0,200,4,4,200,0,200,4,3,200,0,200,3,3,200,0,200,3,4,200,0,200,4,5,200,0,200,4,6,200,0,200,4,7,200,0,200,4,8,200,0,200,4,9,200,0,200,4,10,200,0,200,4,11,200,0,200,4,12,200,0,200,4,13,200,0,200,5,13,200,0,200,5,12,200,0,200,5,11,200,0,200,5,10,200,0,200,5,9,200,0,200,5,8,200,0,200,5,7,200,0,200,5,6,200,0,200,5,5,200,0,200,5,4,200,0,200,5,3,200,0,200,6,2,200,0,200,6,3,200,0,200,6,4,200,0,200,6,5,200,0,200,6,6,200,0,200,6,7,200,0,200,6,8,200,0,200,6,9,200,0,200,6,10,200,0,200,6,11,200,0,200,6,12,200,0,200,6,13,200,0,200,7,13,200,0,200,7,12,200,0,200,7,11,200,0,200,7,10,200,0,200,7,8,200,0,200,7,6,200,0,200,7,5,200,0,200,7,3,200,0,200,7,2,200,0,200,7,4,200,0,200,7,7,200,0,200,7,9,200,0,200,8,13,200,0,200,8,12,200,0,200,8,11,200,0,200,8,10,200,0,200,8,9,200,0,200,8,8,200,0,200,8,7,200,0,200,8,6,200,0,200,8,5,200,0,200,8,4,200,0,200,8,3,200,0,200,8,2,200,0,200,9,2,200,0,200,9,3,200,0,200,9,4,200,0,200,9,5,0,0,0,9,6,200,0,200,9,7,200,0,200,9,8,200,0,200,9,9,200,0,200,9,10,200,0,200,9,11,200,0,200,9,12,200,0,200,9,13,200,0,200,10,13,200,0,200,10,12,200,0,200,10,11,200,0,200,10,10,200,0,200,10,9,200,0,200,10,8,200,0,200,10,7,200,0,200,10,6,200,0,200,10,5,0,0,0,10,4,200,0,200,10,3,200,0,200,10,2,200,0,200,11,2,200,0,200,11,3,200,0,200,11,4,200,0,200,11,5,0,0,0,11,6,200,0,200,11,7,200,0,200,11,8,200,0,200,11,9,200,0,200,11,10,200,0,200,11,11,200,0,200,11,12,200,0,200,11,13,200,0,200,12,13,200,0,200,12,12,200,0,200,12,11,200,0,200,12,10,200,0,200,12,9,200,0,200,12,8,200,0,200,12,7,200,0,200,12,6,200,0,200,12,5,0,0,0,12,4,200,0,200,12,3,200,0,200,13,3,200,0,200,13,2,200,0,200,12,2,200,0,200,13,4,200,0,200,13,5,0,0,0,13,6,200,0,200,13,7,200,0,200,13,8,200,0,200,13,9,200,0,200,13,10,200,0,200,13,11,200,0,200,13,12,200,0,200,13,13,200,0,200,14,13,200,0,200,14,12,200,0,200,14,11,200,0,200,14,10,200,0,200,14,9,200,0,200,14,8,200,0,200,14,7,200,0,200,14,6,200,0,200,14,5,200,0,200,14,4,200,0,200,14,3,200,0,200,14,2,200,0,200,15,2,200,0,200,15,3,200,0,200,15,4,200,0,200,15,5,200,0,200,15,6,200,0,200,15,7,200,0,200,15,8,200,0,200,15,11,200,0,200,15,10,200,0,200,15,9,200,0,200,15,12,200,0,200,15,13,200,0,200];
- var characterEyesHalfOpenUnfiltered = [0,0,100,0,100,1,1,100,0,100,1,0,100,0,100,0,1,100,0,100,0,2,100,0,100,0,3,100,0,100,0,4,100,0,100,0,5,100,0,100,0,6,100,0,100,0,7,100,0,100,0,8,100,0,100,0,9,100,0,100,0,10,100,0,100,0,11,100,0,100,0,12,100,0,100,0,13,100,0,100,0,14,100,0,100,0,15,100,0,100,1,15,100,0,100,1,14,100,0,100,1,13,100,0,100,1,12,100,0,100,1,11,100,0,100,1,10,100,0,100,1,9,100,0,100,1,8,100,0,100,1,7,100,0,100,1,6,100,0,100,1,5,100,0,100,1,4,100,0,100,1,3,100,0,100,1,2,100,0,100,2,14,100,0,100,3,14,100,0,100,4,14,100,0,100,5,15,100,0,100,6,14,100,0,100,7,14,100,0,100,8,14,100,0,100,9,14,100,0,100,10,14,100,0,100,11,14,100,0,100,12,14,100,0,100,13,14,100,0,100,14,14,100,0,100,15,14,100,0,100,15,15,100,0,100,14,15,100,0,100,12,15,100,0,100,11,15,100,0,100,10,15,100,0,100,9,15,100,0,100,8,15,100,0,100,7,15,100,0,100,6,15,100,0,100,5,14,100,0,100,4,15,100,0,100,3,15,100,0,100,2,15,100,0,100,13,15,100,0,100,2,0,200,0,200,2,1,200,0,200,3,1,200,0,200,3,0,200,0,200,4,0,200,0,200,5,0,200,0,200,6,0,200,0,200,7,0,200,0,200,8,0,200,0,200,9,0,200,0,200,10,0,200,0,200,11,0,200,0,200,12,0,200,0,200,13,0,200,0,200,14,0,200,0,200,15,0,200,0,200,15,1,200,0,200,14,1,200,0,200,13,1,200,0,200,12,1,200,0,200,11,1,200,0,200,10,1,200,0,200,9,1,200,0,200,8,1,200,0,200,7,1,200,0,200,6,1,200,0,200,5,1,200,0,200,5,2,200,0,200,4,2,200,0,200,3,2,200,0,200,4,1,200,0,200,2,2,200,0,200,2,3,200,0,200,2,4,200,0,200,2,5,200,0,200,2,6,200,0,200,2,7,200,0,200,2,8,200,0,200,2,9,200,0,200,2,10,200,0,200,2,11,200,0,200,2,12,200,0,200,2,13,200,0,200,3,13,200,0,200,3,12,200,0,200,3,11,200,0,200,3,10,200,0,200,3,9,200,0,200,3,8,200,0,200,3,7,200,0,200,3,6,200,0,200,3,5,200,0,200,4,4,200,0,200,4,3,200,0,200,3,3,200,0,200,3,4,200,0,200,4,5,200,0,200,4,6,200,0,200,4,7,200,0,200,4,8,200,0,200,4,9,200,0,200,4,10,200,0,200,4,11,200,0,200,4,12,200,0,200,4,13,200,0,200,5,13,200,0,200,5,12,200,0,200,5,11,200,0,200,5,10,200,0,200,5,9,200,0,200,5,8,200,0,200,5,7,200,0,200,5,6,200,0,200,5,5,200,0,200,5,4,200,0,200,5,3,200,0,200,6,2,200,0,200,6,3,200,0,200,6,4,200,0,200,6,5,200,0,200,6,6,200,0,200,6,7,200,0,200,6,8,200,0,200,6,9,200,0,200,6,10,200,0,200,6,11,200,0,200,6,12,200,0,200,6,13,200,0,200,7,13,200,0,200,7,12,200,0,200,7,11,200,0,200,7,10,200,0,200,7,8,200,0,200,7,6,200,0,200,7,5,200,0,200,7,3,200,0,200,7,2,200,0,200,7,4,200,0,200,7,7,200,0,200,7,9,200,0,200,8,13,200,0,200,8,12,200,0,200,8,11,200,0,200,8,10,200,0,200,8,9,200,0,200,8,8,200,0,200,8,7,200,0,200,8,6,200,0,200,8,5,200,0,200,8,4,200,0,200,8,3,200,0,200,8,2,200,0,200,9,2,200,0,200,9,3,200,0,200,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,200,0,200,9,8,200,0,200,9,9,200,0,200,9,10,200,0,200,9,11,200,0,200,9,12,200,0,200,9,13,200,0,200,10,13,200,0,200,10,12,200,0,200,10,11,200,0,200,10,10,200,0,200,10,9,200,0,200,10,8,200,0,200,10,7,200,0,200,10,6,0,0,0,10,5,255,255,255,10,4,0,0,0,10,3,200,0,200,10,2,200,0,200,11,2,200,0,200,11,3,200,0,200,11,4,0,0,0,11,5,0,0,0,11,6,0,0,0,11,7,200,0,200,11,8,200,0,200,11,9,200,0,200,11,10,200,0,200,11,11,200,0,200,11,12,200,0,200,11,13,200,0,200,12,13,200,0,200,12,12,200,0,200,12,11,200,0,200,12,10,200,0,200,12,9,200,0,200,12,8,200,0,200,12,7,200,0,200,12,6,0,0,0,12,5,255,255,255,12,4,0,0,0,12,3,200,0,200,13,3,200,0,200,13,2,200,0,200,12,2,200,0,200,13,4,0,0,0,13,5,0,0,0,13,6,0,0,0,13,7,200,0,200,13,8,200,0,200,13,9,200,0,200,13,10,200,0,200,13,11,200,0,200,13,12,200,0,200,13,13,200,0,200,14,13,200,0,200,14,12,200,0,200,14,11,200,0,200,14,10,200,0,200,14,9,200,0,200,14,8,200,0,200,14,7,200,0,200,14,6,200,0,200,14,5,200,0,200,14,4,200,0,200,14,3,200,0,200,14,2,200,0,200,15,2,200,0,200,15,3,200,0,200,15,4,200,0,200,15,5,200,0,200,15,6,200,0,200,15,7,200,0,200,15,8,200,0,200,15,11,200,0,200,15,10,200,0,200,15,9,200,0,200,15,12,200,0,200,15,13,200,0,200];
- var characterEyesWideOpenUnfiltered = [0,0,100,0,100,1,1,100,0,100,1,0,100,0,100,0,1,100,0,100,0,2,100,0,100,0,3,100,0,100,0,4,100,0,100,0,5,100,0,100,0,6,100,0,100,0,7,100,0,100,0,8,100,0,100,0,9,100,0,100,0,10,100,0,100,0,11,100,0,100,0,12,100,0,100,0,13,100,0,100,0,14,100,0,100,0,15,100,0,100,1,15,100,0,100,1,14,100,0,100,1,13,100,0,100,1,12,100,0,100,1,11,100,0,100,1,10,100,0,100,1,9,100,0,100,1,8,100,0,100,1,7,100,0,100,1,6,100,0,100,1,5,100,0,100,1,4,100,0,100,1,3,100,0,100,1,2,100,0,100,2,14,100,0,100,3,14,100,0,100,4,14,100,0,100,5,15,100,0,100,6,14,100,0,100,7,14,100,0,100,8,14,100,0,100,9,14,100,0,100,10,14,100,0,100,11,14,100,0,100,12,14,100,0,100,13,14,100,0,100,14,14,100,0,100,15,14,100,0,100,15,15,100,0,100,14,15,100,0,100,12,15,100,0,100,11,15,100,0,100,10,15,100,0,100,9,15,100,0,100,8,15,100,0,100,7,15,100,0,100,6,15,100,0,100,5,14,100,0,100,4,15,100,0,100,3,15,100,0,100,2,15,100,0,100,13,15,100,0,100,2,0,200,0,200,2,1,200,0,200,3,1,200,0,200,3,0,200,0,200,4,0,200,0,200,5,0,200,0,200,6,0,200,0,200,7,0,200,0,200,8,0,200,0,200,9,0,200,0,200,10,0,200,0,200,11,0,200,0,200,12,0,200,0,200,13,0,200,0,200,14,0,200,0,200,15,0,200,0,200,15,1,200,0,200,14,1,200,0,200,13,1,200,0,200,12,1,200,0,200,11,1,200,0,200,10,1,200,0,200,9,1,200,0,200,8,1,200,0,200,7,1,200,0,200,6,1,200,0,200,5,1,200,0,200,5,2,200,0,200,4,2,200,0,200,3,2,200,0,200,4,1,200,0,200,2,2,200,0,200,2,3,200,0,200,2,4,200,0,200,2,5,200,0,200,2,6,200,0,200,2,7,200,0,200,2,8,200,0,200,2,9,200,0,200,2,10,200,0,200,2,11,200,0,200,2,12,200,0,200,2,13,200,0,200,3,13,200,0,200,3,12,200,0,200,3,11,200,0,200,3,10,200,0,200,3,9,200,0,200,3,8,200,0,200,3,7,200,0,200,3,6,200,0,200,3,5,200,0,200,4,4,200,0,200,4,3,200,0,200,3,3,200,0,200,3,4,200,0,200,4,5,200,0,200,4,6,200,0,200,4,7,200,0,200,4,8,200,0,200,4,9,200,0,200,4,10,200,0,200,4,11,200,0,200,4,12,200,0,200,4,13,200,0,200,5,13,200,0,200,5,12,200,0,200,5,11,200,0,200,5,10,200,0,200,5,9,200,0,200,5,8,200,0,200,5,7,200,0,200,5,6,200,0,200,5,5,200,0,200,5,4,200,0,200,5,3,200,0,200,6,2,200,0,200,6,3,200,0,200,6,4,200,0,200,6,5,200,0,200,6,6,200,0,200,6,7,200,0,200,6,8,200,0,200,6,9,200,0,200,6,10,200,0,200,6,11,200,0,200,6,12,200,0,200,6,13,200,0,200,7,13,200,0,200,7,12,200,0,200,7,11,200,0,200,7,10,200,0,200,7,8,200,0,200,7,6,200,0,200,7,5,200,0,200,7,3,200,0,200,7,2,200,0,200,7,4,200,0,200,7,7,200,0,200,7,9,200,0,200,8,13,200,0,200,8,12,200,0,200,8,11,200,0,200,8,10,200,0,200,8,9,200,0,200,8,8,200,0,200,8,7,200,0,200,8,6,200,0,200,8,5,200,0,200,8,4,200,0,200,8,3,200,0,200,8,2,200,0,200,9,2,200,0,200,9,3,0,0,0,9,4,0,0,0,9,5,0,0,0,9,6,0,0,0,9,7,0,0,0,9,8,200,0,200,9,9,200,0,200,9,10,200,0,200,9,11,200,0,200,9,12,200,0,200,9,13,200,0,200,10,13,200,0,200,10,12,200,0,200,10,11,200,0,200,10,10,200,0,200,10,9,200,0,200,10,8,200,0,200,10,7,0,0,0,10,6,255,255,255,10,5,255,255,255,10,4,255,255,255,10,3,0,0,0,10,2,200,0,200,11,2,200,0,200,11,3,0,0,0,11,4,255,255,255,11,5,0,0,0,11,6,255,255,255,11,7,0,0,0,11,8,200,0,200,11,9,200,0,200,11,10,200,0,200,11,11,200,0,200,11,12,200,0,200,11,13,200,0,200,12,13,200,0,200,12,12,200,0,200,12,11,200,0,200,12,10,200,0,200,12,9,200,0,200,12,8,200,0,200,12,7,0,0,0,12,6,255,255,255,12,5,255,255,255,12,4,255,255,255,12,3,0,0,0,13,3,0,0,0,13,2,200,0,200,12,2,200,0,200,13,4,0,0,0,13,5,0,0,0,13,6,0,0,0,13,7,0,0,0,13,8,200,0,200,13,9,200,0,200,13,10,200,0,200,13,11,200,0,200,13,12,200,0,200,13,13,200,0,200,14,13,200,0,200,14,12,200,0,200,14,11,200,0,200,14,10,200,0,200,14,9,200,0,200,14,8,200,0,200,14,7,200,0,200,14,6,200,0,200,14,5,200,0,200,14,4,200,0,200,14,3,200,0,200,14,2,200,0,200,15,2,200,0,200,15,3,200,0,200,15,4,200,0,200,15,5,200,0,200,15,6,200,0,200,15,7,200,0,200,15,8,200,0,200,15,11,200,0,200,15,10,200,0,200,15,9,200,0,200,15,12,200,0,200,15,13,200,0,200];
- var characterIsHeDedUnfiltered = [3,14,100,0,100,2,14,100,0,100,2,15,100,0,100,3,15,100,0,100,4,15,100,0,100,4,14,100,0,100,2,13,100,0,100,3,13,100,0,100,3,12,100,0,100,2,12,100,0,100,2,11,100,0,100,2,10,100,0,100,2,9,100,0,100,2,8,100,0,100,2,7,100,0,100,2,6,100,0,100,2,5,100,0,100,2,4,100,0,100,2,3,100,0,100,2,2,100,0,100,2,1,100,0,100,2,0,100,0,100,3,0,100,0,100,3,1,100,0,100,3,2,100,0,100,3,3,100,0,100,3,5,100,0,100,3,6,100,0,100,3,7,100,0,100,3,8,100,0,100,3,9,100,0,100,3,10,100,0,100,3,11,100,0,100,3,4,100,0,100,5,14,100,0,100,6,14,100,0,100,7,14,100,0,100,8,14,100,0,100,9,14,100,0,100,10,14,100,0,100,11,14,100,0,100,12,14,100,0,100,13,14,100,0,100,14,14,100,0,100,15,14,100,0,100,15,15,100,0,100,14,15,100,0,100,13,15,100,0,100,12,15,100,0,100,11,15,100,0,100,10,15,100,0,100,9,15,100,0,100,8,15,100,0,100,7,15,100,0,100,6,15,100,0,100,5,15,100,0,100,10,5,0,0,0,9,5,0,0,0,8,5,200,0,200,7,5,200,0,200,6,6,200,0,200,5,6,200,0,200,4,6,200,0,200,4,5,200,0,200,5,5,200,0,200,6,5,200,0,200,7,4,200,0,200,6,4,200,0,200,5,4,200,0,200,4,4,200,0,200,4,3,200,0,200,4,2,200,0,200,4,1,200,0,200,4,0,200,0,200,5,0,200,0,200,6,0,200,0,200,7,0,200,0,200,8,0,200,0,200,9,0,200,0,200,10,0,200,0,200,10,1,200,0,200,11,1,200,0,200,12,1,200,0,200,13,1,200,0,200,13,0,200,0,200,14,0,200,0,200,14,1,200,0,200,15,1,200,0,200,15,0,200,0,200,12,0,200,0,200,11,0,200,0,200,9,1,200,0,200,8,1,200,0,200,7,1,200,0,200,6,1,200,0,200,5,1,200,0,200,5,2,200,0,200,6,2,200,0,200,7,2,200,0,200,8,2,200,0,200,9,2,200,0,200,10,2,200,0,200,11,2,200,0,200,12,2,200,0,200,13,2,200,0,200,14,2,200,0,200,15,2,200,0,200,15,3,200,0,200,14,3,200,0,200,13,3,200,0,200,12,3,200,0,200,11,3,200,0,200,10,3,200,0,200,9,3,200,0,200,8,3,200,0,200,7,3,200,0,200,6,3,200,0,200,5,3,200,0,200,8,4,200,0,200,9,4,200,0,200,10,4,200,0,200,11,4,200,0,200,12,4,200,0,200,13,4,200,0,200,14,4,200,0,200,15,4,200,0,200,15,5,200,0,200,14,6,200,0,200,13,6,200,0,200,12,6,200,0,200,11,6,200,0,200,11,5,0,0,0,12,5,0,0,0,13,5,0,0,0,14,5,200,0,200,15,6,200,0,200,15,7,200,0,200,14,7,200,0,200,13,7,200,0,200,12,7,200,0,200,11,7,200,0,200,10,7,200,0,200,10,6,200,0,200,9,6,200,0,200,8,6,200,0,200,7,6,200,0,200,7,7,200,0,200,6,7,200,0,200,5,7,200,0,200,4,7,200,0,200,4,8,200,0,200,4,9,200,0,200,4,10,200,0,200,4,11,200,0,200,4,12,200,0,200,4,13,200,0,200,5,13,200,0,200,6,13,200,0,200,7,13,200,0,200,8,13,200,0,200,9,13,200,0,200,10,13,200,0,200,11,13,200,0,200,12,13,200,0,200,13,13,200,0,200,14,13,200,0,200,15,13,200,0,200,15,12,200,0,200,15,11,200,0,200,15,10,200,0,200,15,9,200,0,200,14,9,200,0,200,14,8,200,0,200,13,8,200,0,200,12,8,200,0,200,11,8,200,0,200,10,8,200,0,200,9,8,200,0,200,8,8,200,0,200,7,8,200,0,200,6,8,200,0,200,5,8,200,0,200,8,7,200,0,200,9,7,200,0,200,15,8,200,0,200,13,9,200,0,200,12,9,200,0,200,11,9,200,0,200,10,9,200,0,200,9,9,200,0,200,8,9,200,0,200,7,9,200,0,200,6,9,200,0,200,5,9,200,0,200,5,10,200,0,200,5,11,200,0,200,5,12,200,0,200,6,12,200,0,200,6,11,200,0,200,6,10,200,0,200,7,10,200,0,200,7,11,200,0,200,7,12,200,0,200,8,12,200,0,200,8,11,200,0,200,8,10,200,0,200,9,10,200,0,200,9,11,200,0,200,9,12,200,0,200,10,12,200,0,200,10,11,200,0,200,10,10,200,0,200,11,10,200,0,200,11,11,200,0,200,11,12,200,0,200,12,12,200,0,200,12,11,200,0,200,12,10,200,0,200,13,10,200,0,200,13,11,200,0,200,13,12,200,0,200,14,12,200,0,200,14,11,200,0,200,14,10,200,0,200];
- } // Textures, don't open kuz they're flipping enormous
- var cloudsYPassed = 0;
- var textureScale = 1;
- // Thanks to catkirlkelly!!! (https://stackoverflow.com/questions/72114191/change-array-list-into-multiple-array-lists-every-3-items)
- {
- var chunks = [];
- for (var i = 0; i < stoneTextureUnfiltered.length; i += 5) {
- chunks.push(stoneTextureUnfiltered.slice(i, i + 5));
- }
- var stoneTexture = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
- chunks = [];
- for (var i = 0; i < characterEyesClosedUnfiltered.length; i += 5) {
- chunks.push(characterEyesClosedUnfiltered.slice(i, i + 5));
- }
- var characterEyesClosed = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
- chunks = [];
- for (var i = 0; i < characterEyesHalfOpenUnfiltered.length; i += 5) {
- chunks.push(characterEyesHalfOpenUnfiltered.slice(i, i + 5));
- }
- var characterEyesHalfOpen = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
- chunks = [];
- for (var i = 0; i < characterEyesWideOpenUnfiltered.length; i += 5) {
- chunks.push(characterEyesWideOpenUnfiltered.slice(i, i + 5));
- }
- var characterEyesWideOpen = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
- chunks = [];
- for (var i = 0; i < characterIsHeDedUnfiltered.length; i += 5) {
- chunks.push(characterIsHeDedUnfiltered.slice(i, i + 5));
- }
- var characterIsHeDed = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
- }
- var drawTexture = function(texture, scale) {
- for (var i = 0; i < texture.length; i++) {
- noStroke();
- pushMatrix();
- textureScale = scale;
- fill(texture[i][2][0], texture[i][2][1], texture[i][2][2]);
- rect(texture[i][0]*(400*textureScale/16), texture[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
- textureScale=1;
- popMatrix();
- }
- };
- var drawTextureSheet = function() {
- for (var i = 0; i < texture.length; i++) {
- noStroke();
- pushMatrix();
- textureScale = 0.2;
- fill(characterEyesClosed[i][2][0], characterEyesClosed[i][2][1], characterEyesClosed[i][2][2]);
- rect(characterEyesClosed[i][0]*(400*textureScale/16), characterEyesClosed[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
- textureScale=1;
- popMatrix();
- }
- for (var i = 0; i < texture.length; i++) {
- noStroke();
- pushMatrix();
- textureScale = 0.2;
- fill(characterEyesHalfOpen[i][2][0], characterEyesHalfOpen[i][2][1], characterEyesHalfOpen[i][2][2]);
- rect(characterEyesHalfOpen[i][0]*(400*textureScale/16), characterEyesHalfOpen[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
- textureScale=1;
- popMatrix();
- }
- for (var i = 0; i < texture.length; i++) {
- noStroke();
- pushMatrix();
- textureScale = 0.2;
- fill(characterEyesWideOpen[i][2][0], characterEyesWideOpen[i][2][1], characterEyesWideOpen[i][2][2]);
- rect(characterEyesWideOpen[i][0]*(400*textureScale/16), characterEyesWideOpen[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
- textureScale=1;
- popMatrix();
- }
- };
- var draw = function() {
- if (progress === 0) {
- background(0, 0, 0);
- fill(255, 0, 0);
- textSize(30);
- textAlign(CENTER, CENTER);
- fill(introFramesPassed, introFramesPassed, introFramesPassed);
- text("Wake up...", width/2, height/2);
- introFramesPassed+= introSpeed;
- if (introFramesPassed > 300) {
- introSpeed = -1;
- }
- if (introFramesPassed < 0) {
- progress = 1;
- }
- } else if (progress === 1) {
- background(255-pulseFramesPassed, 255-pulseFramesPassed, 255-pulseFramesPassed);
- noStroke();
- textSize(30);
- textAlign(CENTER, CENTER);
- for (var i = 0; i < 12; i++) {
- fill(255-i*10, 255-pulseFramesPassed, 255-i*5);
- text("P O S S I B I L I T Y", width/2+i, height/2);
- }
- pulseFramesPassed++;
- if (pulseFramesPassed > 230) {
- textSize(20);
- text("Press any key to begin.", width/2, height/2+30);
- keyPressable = true;
- }
- } else if (progress === 2) {
- background(0, 255, 255);
- fill(150, 150, 150);
- if (cloudsYPassed > 300) {
- pushMatrix();
- textureScale = 0.1;
- translate(0, 1600);
- for (var j = 0; j < 5; j++) {
- drawTexture(stoneTexture);
- translate(400, 0);
- }
- textureScale = 1;
- popMatrix();
- }
- var xoff = 0.0+totalXoff;
- for (var x = 0; x < width; x+=10) {
- var yoff = 0.0+totalYoff;
- for (var y = 0; y < 400; y+=10) {
- var bright = map(noise(xoff, yoff), 0, 1, 0, 255);
- var index = (y * width + x) * 4;
- if (cloudsYPassed > 300) {
- fill(255, 255, 255, bright*2-(y/2*2.55));
- } else {
- fill(255, 255, 255, bright*2);
- }
- rect(x, y, 10, 10);
- yoff += 0.01;
- }
- xoff += 0.01;
- }
- totalXoff += 0.0025;
- if (cloudsYPassed < 300) {
- totalYoff += 0.05;
- pushMatrix();
- translate(200, 200);
- rotate(cloudsYPassed);
- translate(-50, -50);
- if (cloudsYPassed < 100) {
- drawTexture(characterEyesClosed, 0.2);
- } else if (cloudsYPassed < 200) {
- drawTexture(characterEyesHalfOpen, 0.2);
- } else {
- drawTexture(characterEyesWideOpen, 0.2);
- }
- popMatrix();
- } else if (cloudsYPassed < 315) {
- pushMatrix();
- translate(-100, (cloudsYPassed-200)*5);
- rotate(90);
- translate(-200, -200);
- drawTexture(characterEyesWideOpen, 0.2);
- popMatrix();
- pushMatrix();
- translate(0, 320);
- drawTexture(stoneTexture, 0.2);
- for (var i = 0; i < 5; i++) {
- translate(64, 0);
- drawTexture(stoneTexture, 0.2);
- }
- popMatrix();
- } else if (cloudsYPassed < 340) {
- pushMatrix();
- translate(-100, 300);
- rotate(90);
- translate(-60, -200);
- drawTexture(characterIsHeDed, 0.2);
- popMatrix();
- pushMatrix();
- translate(0, 320);
- drawTexture(stoneTexture, 0.2);
- for (var i = 0; i < 5; i++) {
- translate(64, 0);
- drawTexture(stoneTexture, 0.2);
- }
- popMatrix();
- } else {
- pushMatrix();
- translate(-100, 300);
- rotate(90);
- translate(-60, -200);
- drawTexture(characterIsHeDed, 0.2);
- popMatrix();
- pushMatrix();
- translate(0, 320);
- drawTexture(stoneTexture, 0.2);
- for (var i = 0; i < 5; i++) {
- translate(64, 0);
- drawTexture(stoneTexture, 0.2);
- }
- popMatrix();
- }
- cloudsYPassed++;
- }
- };
- var keyPressed = function() {
- if (keyPressable) {
- if (progress === 1) {
- progress = 2;
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement