1
0
Derivar 0
udatinos/screensaver.js
2021-04-04 12:59:48 +02:00

30 linhas
640 B
JavaScript

function Screensaver(){
this.enter = function()
{
console.log("ENTER SCREESAVER")
textX = 10;
textY = 0;
}
this.setup= function() {
cnv=createCanvas(_w, _h);
cnv.mouseClicked(toRiver);
console.log("ScSv STARTED ")
}
this.draw = function() {
let ourText='Click Over Me';
background("teal");
fill("black");
textSize(50 + cos(frameCount * 0.025) * 25);
textLeading(sin(frameCount * 0.01)*50);
text(ourText, 40, height/2, 300, 350);
}
function toRiver(){
console.log("Mouse pressed in ScSv")
_mgr.showScene( River );
}
}