Thursday, June 14, 2018



Create A simple animation in JavaScript

The simple JavaScript code below, create a beautiful line and round animation on the screen.

To learn more on how to install, setup, and prepare the environment to  writing and testing JavaScript codes, Go to this page. You can also find other  examples on that page.




//Simple dot and line animation:
function setup (){
 createCanvas(600, 600);
}

function draw(){
background(0, 255, 0);

strokeWeight(3)
ellipse(100, 150, random(200), random(200));

strokeWeight(8);
line(random(width), random(height), 500, 100);
}

No comments:

Post a Comment

SOLVED PROBLEMS IN JAVASCRIPTS

The Material is for exercises and sample solved problems in Javascripts WORKING WITH STRINGS EXERCISE 1: Using split...