// T H E
// ____ __ ____
// /\ \ /'_/'\ /\ _ /__ \
// \ \ / /\ \ \ \ ,\ __ //\ \
// \ \ \ \ \ __\ \ /''\ \ / /''\ \ \ \
// \ \ _ \ \ _/\ /\ /\ \ _/\ \L._ _\ \
// \ _\ \ _\ _\ _\ _\ _/._\ /_
// // // //// ////// //
// ______________________________________________________
// | |
// | ! I N S T R U C T I O N S #4 |
// ||
// | |
// | This OBJKT DOES NOT take its description metadata |
// | to execute it as code to render its output. |
// | But if it did, this GIF is what it would look like. |
// ||
// | |
// ################ START OF INSTRUCTIONS ################
background(pieceColors[0])
// Split the instructions into lines
let string = instructions.match(/[^\r\n]+/g)
// Set the text appearance
textFont('Courier') // Courier
textSize(height/44) // Relative size
fill(pieceColors[1]) // Either Light or Dark
// Set a rolling starting index
let start = frameCount%string.length
// For each line of the instructions, take each line...
for(let i=0;i<string.length;i++){
let line = string[(start+i)%string.length]
// Calculate a width which looks like a wave
let waveWidth = 5+(5sin((i/1.75)-HALF_PI))
// Add a number of spaces to the beginning of each line
// equal to that width
for(let j=0;j<waveWidth;j++){ // to simulate the text
line = ' ' + line ; // moving like a wave
}
// Render the line
text(line,2,-2+(i(height/32)))}
// ################ END OF INSTRUCTIONS ################
// ||
// | |
// | Clicking anywhere doesn't do anything. |
// | It's a GIF. |
// | |
// | Made in p5js |
// ||
// | |
// | 5 Aug 2021 @Yazid |
// |______________________________________________________|