I am trying to animate the lines but I have no Idea how to proceed.The code I worte so far is this.
function setup() {
createCanvas(400, 400);
textSize(8);
}
function temp(){
strokeWeight(5);
point(150,108);
point(56,75);
point(121,185);
strokeWeight(1);
line(150,108,56,75);
line(56,75,121,185);
}
function draw() {
clear();
background(220);
translate(35,60);
temp();
}
What I desire is the line comes up one by one according to the sequence they are drawn and when they are drawn the screen clear and again one by one basically it should come in sequence. I am not aware of how to do this.
GIF ===>https://thumbs.gfycat.com/SnoopyWildDuckbillcat.webp
The output I get is this The output