xxxxxxxxxx
97
let pos1x;
let pos2x;
var grid = [];
let tx1 = 'In his pocket were the key that augured death and the egg that could save him from a deadly day... The egg was marked with a date, the key with a small gold handle.';
let tx2 = 'They believe that in the life of every man there are knot points, small parts of time like keys. Hence, every Khazar had his own stick and in the course of his life would put notches on it, carving states of clear consciousness or moments of the sublime fulfillment of life. Each of these markings was named after an animal or a precious stone. And called a "dream." To the Khazars, therefore, a dream was not just the day of our nights; it could also be the mysterious starry night of our days.';
let tx3 = 'The letters of language! Here we come to the bottom of the shadow. The earth`s alphabet mirrors heaven`s and shares the fate of language!';
let tx4 = 'Both were made of shiny salt, but one was fast and the other slow. Whatever the fast mirror picked up, reflecting the world like an advance on the future, the slow mirror returned, settling the debt of the former, because it was as slow in relation to the present as the other was fast.';
let tx5 = 'Be careful, in future, not to place the cross on the lock like that, when the spirit is residing outside the book. It fears the cross and, not daring to go back into the book, it wreaks havoc all around.';
function setup() {
createCanvas(600, 600);
noFill();
// rectMode(CENTER);
angleMode(DEGREES);
pos1x = 0;
pos2x = width;
textStyle(ITALIC);
}
function draw() {
background(255);
noFill();
stroke(255, 255, 0);
//texts
textSize(15);
text(tx1, 10, 10, 200, 200); // wraps within the text box
textSize(10);
text(tx2, 100, 152, 200, 200);
textSize(18);
text(tx3, 250, 400, 200, 200);
textSize(14);
text(tx4, 400, 0, 200, 200);
textSize(9);
text(tx5, 0, 500, 200, 200);
// hidden grid
for (let x = 0; x < 200; x++) {
for (let y = 0; y < 100; y++) { //inside loop
strokeWeight(0.1);
rect(x * 20, y * 20, 20, 20);
}
}
// sun
stroke(0, 0, 255);
strokeWeight(0.3);
for (let x = 0; x <= 1000; x++) {
rotate(0.5);
rect(pos1x, 0, x * 5);
}
for (let y = 0; y <= 1000; y++) {
rotate(0.5);
rect(pos2x, -1000, y * 5);
}
pos1x = pos1x + 1;
pos2x = pos2x - 1;
for (var i = 0; i < grid.length; i++) {
grid[i].show();
}
if (mouseIsPressed) {
blendMode(MULTIPLY);
fill(0, 0, 255);
ellipse(mouseX, mouseY, 100, 100);
} else {
blendMode(BLEND); // to the default mode
}
}