Point

Draws a point at the given position with given stroke width.

Syntax

                    
    new point(x, y, stroke, stroke_width);                   
                

Parameters

x x-coordinate of the point
y y-coordinate of the point
stroke stroke color of the point
stroke_width stroke width of the point

Example

                    
    new point(100, 100, "#ff0000", 5);
    
        
    t=0;
    function draw(){
        clearCanvas();
        new point((WIDTH/2)+100*(cos(t)), (HEIGHT/2)+100*(sin(t)), "#ff0000", 10);
        t+=0.01;
        requestAnimationFrame(draw);
    }