Advertisement
Guest User

Untitled

a guest
May 11th, 2022
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function setup() {
  2.   createCanvas(400, 400);
  3.   frameRate(60);
  4. }
  5.                
  6. var progress = 0;
  7. var introFramesPassed = 0;
  8. var pulseFramesPassed = 0;
  9. var introSpeed = 1;
  10. var keyPressable = false;
  11. var totalXoff = 0;
  12. var totalYoff = 0;
  13. {
  14.     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];
  15.     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];
  16.     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];
  17.     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];
  18.     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];
  19.     } // Textures, don't open kuz they're flipping enormous
  20. var cloudsYPassed = 0;
  21. var textureScale = 1;
  22.  
  23. // Thanks to catkirlkelly!!! (https://stackoverflow.com/questions/72114191/change-array-list-into-multiple-array-lists-every-3-items)
  24.  
  25. {
  26.    
  27. var chunks = [];    
  28.  
  29. for (var i = 0; i < stoneTextureUnfiltered.length; i += 5) {
  30.     chunks.push(stoneTextureUnfiltered.slice(i, i + 5));
  31. }
  32.  
  33. var stoneTexture = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
  34.  
  35. chunks = [];
  36.  
  37. for (var i = 0; i < characterEyesClosedUnfiltered.length; i += 5) {
  38.     chunks.push(characterEyesClosedUnfiltered.slice(i, i + 5));
  39. }
  40.  
  41. var characterEyesClosed = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
  42.  
  43. chunks = [];
  44.  
  45. for (var i = 0; i < characterEyesHalfOpenUnfiltered.length; i += 5) {
  46.     chunks.push(characterEyesHalfOpenUnfiltered.slice(i, i + 5));
  47. }
  48.  
  49. var characterEyesHalfOpen = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
  50.  
  51. chunks = [];
  52.  
  53. for (var i = 0; i < characterEyesWideOpenUnfiltered.length; i += 5) {
  54.     chunks.push(characterEyesWideOpenUnfiltered.slice(i, i + 5));
  55. }
  56.  
  57. var characterEyesWideOpen = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
  58.  
  59. chunks = [];
  60.  
  61. for (var i = 0; i < characterIsHeDedUnfiltered.length; i += 5) {
  62.     chunks.push(characterIsHeDedUnfiltered.slice(i, i + 5));
  63. }
  64.  
  65. var characterIsHeDed = chunks.map(function mapper(chunk) { return [chunk[0], chunk[1], chunk.slice(2)]; });
  66. }
  67.  
  68. var drawTexture = function(texture, scale) {
  69.     for (var i = 0; i < texture.length; i++) {
  70.         noStroke();
  71.         pushMatrix();
  72.         textureScale = scale;
  73.         fill(texture[i][2][0], texture[i][2][1], texture[i][2][2]);
  74.         rect(texture[i][0]*(400*textureScale/16), texture[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
  75.         textureScale=1;
  76.         popMatrix();
  77.     }
  78. };
  79.  
  80. var drawTextureSheet = function() {
  81.     for (var i = 0; i < texture.length; i++) {
  82.         noStroke();
  83.         pushMatrix();
  84.         textureScale = 0.2;
  85.         fill(characterEyesClosed[i][2][0], characterEyesClosed[i][2][1], characterEyesClosed[i][2][2]);
  86.         rect(characterEyesClosed[i][0]*(400*textureScale/16), characterEyesClosed[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
  87.         textureScale=1;
  88.         popMatrix();
  89.     }
  90.     for (var i = 0; i < texture.length; i++) {
  91.         noStroke();
  92.         pushMatrix();
  93.         textureScale = 0.2;
  94.         fill(characterEyesHalfOpen[i][2][0], characterEyesHalfOpen[i][2][1], characterEyesHalfOpen[i][2][2]);
  95.         rect(characterEyesHalfOpen[i][0]*(400*textureScale/16), characterEyesHalfOpen[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
  96.         textureScale=1;
  97.         popMatrix();
  98.     }
  99.     for (var i = 0; i < texture.length; i++) {
  100.         noStroke();
  101.         pushMatrix();
  102.         textureScale = 0.2;
  103.         fill(characterEyesWideOpen[i][2][0], characterEyesWideOpen[i][2][1], characterEyesWideOpen[i][2][2]);
  104.         rect(characterEyesWideOpen[i][0]*(400*textureScale/16), characterEyesWideOpen[i][1]*(400*textureScale/16), 400*textureScale/16, 400*textureScale/16);
  105.         textureScale=1;
  106.         popMatrix();
  107.     }
  108. };
  109.  
  110. var draw = function() {
  111.     if (progress === 0) {
  112.         background(0, 0, 0);
  113.         fill(255, 0, 0);
  114.         textSize(30);
  115.         textAlign(CENTER, CENTER);
  116.         fill(introFramesPassed, introFramesPassed, introFramesPassed);
  117.         text("Wake up...", width/2, height/2);
  118.         introFramesPassed+= introSpeed;
  119.         if (introFramesPassed > 300) {
  120.             introSpeed = -1;
  121.         }
  122.         if (introFramesPassed < 0) {
  123.             progress = 1;
  124.         }
  125.     } else if (progress === 1) {
  126.         background(255-pulseFramesPassed, 255-pulseFramesPassed, 255-pulseFramesPassed);
  127.         noStroke();
  128.         textSize(30);
  129.         textAlign(CENTER, CENTER);
  130.         for (var i = 0; i < 12; i++) {
  131.             fill(255-i*10, 255-pulseFramesPassed, 255-i*5);
  132.             text("P O S S I B I L I T Y", width/2+i, height/2);
  133.         }
  134.         pulseFramesPassed++;
  135.         if (pulseFramesPassed > 230) {
  136.             textSize(20);
  137.             text("Press any key to begin.", width/2, height/2+30);
  138.             keyPressable = true;
  139.         }
  140.     } else if (progress === 2) {
  141.         background(0, 255, 255);
  142.         fill(150, 150, 150);
  143.         if (cloudsYPassed > 300) {
  144.             pushMatrix();
  145.             textureScale = 0.1;
  146.             translate(0, 1600);
  147.             for (var j = 0; j < 5; j++) {
  148.                 drawTexture(stoneTexture);
  149.                 translate(400, 0);
  150.             }
  151.             textureScale = 1;
  152.             popMatrix();
  153.         }
  154.        
  155.         var xoff = 0.0+totalXoff;
  156.         for (var x = 0; x < width; x+=10) {
  157.             var yoff = 0.0+totalYoff;
  158.             for (var y = 0; y < 400; y+=10) {
  159.                 var bright = map(noise(xoff, yoff), 0, 1, 0, 255);
  160.                 var index = (y * width + x) * 4;
  161.                 if (cloudsYPassed > 300) {
  162.                     fill(255, 255, 255, bright*2-(y/2*2.55));
  163.                 } else {
  164.                     fill(255, 255, 255, bright*2);
  165.                 }
  166.                 rect(x, y, 10, 10);
  167.                 yoff += 0.01;
  168.             }
  169.             xoff += 0.01;
  170.         }
  171.    
  172.         totalXoff += 0.0025;
  173.         if (cloudsYPassed < 300) {
  174.             totalYoff += 0.05;
  175.             pushMatrix();
  176.             translate(200, 200);
  177.             rotate(cloudsYPassed);
  178.             translate(-50, -50);
  179.             if (cloudsYPassed < 100) {
  180.                 drawTexture(characterEyesClosed, 0.2);
  181.             } else if (cloudsYPassed < 200) {
  182.                 drawTexture(characterEyesHalfOpen, 0.2);
  183.             } else {
  184.                 drawTexture(characterEyesWideOpen, 0.2);
  185.             }
  186.             popMatrix();
  187.         } else if (cloudsYPassed < 315) {
  188.             pushMatrix();
  189.             translate(-100, (cloudsYPassed-200)*5);
  190.             rotate(90);
  191.             translate(-200, -200);
  192.             drawTexture(characterEyesWideOpen, 0.2);
  193.             popMatrix();
  194.             pushMatrix();
  195.             translate(0, 320);
  196.             drawTexture(stoneTexture, 0.2);
  197.             for (var i = 0; i < 5; i++) {
  198.                 translate(64, 0);
  199.                 drawTexture(stoneTexture, 0.2);
  200.             }
  201.             popMatrix();
  202.         } else if (cloudsYPassed < 340) {
  203.             pushMatrix();
  204.             translate(-100, 300);
  205.             rotate(90);
  206.             translate(-60, -200);
  207.             drawTexture(characterIsHeDed, 0.2);
  208.             popMatrix();
  209.             pushMatrix();
  210.             translate(0, 320);
  211.             drawTexture(stoneTexture, 0.2);
  212.             for (var i = 0; i < 5; i++) {
  213.                 translate(64, 0);
  214.                 drawTexture(stoneTexture, 0.2);
  215.             }
  216.             popMatrix();
  217.         } else {
  218.             pushMatrix();
  219.             translate(-100, 300);
  220.             rotate(90);
  221.             translate(-60, -200);
  222.             drawTexture(characterIsHeDed, 0.2);
  223.             popMatrix();
  224.             pushMatrix();
  225.             translate(0, 320);
  226.             drawTexture(stoneTexture, 0.2);
  227.             for (var i = 0; i < 5; i++) {
  228.                 translate(64, 0);
  229.                 drawTexture(stoneTexture, 0.2);
  230.             }
  231.             popMatrix();
  232.         }
  233.         cloudsYPassed++;
  234.     }
  235. };
  236.  
  237. var keyPressed = function() {
  238.     if (keyPressable) {
  239.         if (progress === 1) {
  240.             progress = 2;
  241.         }
  242.     }
  243. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement