drawSine (context) {
        const {color} = this.props;
        let laserLength = 200;


        context.strokeStyle = color;
        context.beginPath();


        let num = 0;
        for(let line of this.lines) {

            if ((this.counter >= num && this.counter <= num + laserLength) || true) {
                if(this.counter == num) {
                    //context.moveTo( line.x,  line.y);
                     context.moveTo( line.x  , line.y);
                } else {
                    //context.lineTo( line.x,  line.y);
                    context.lineTo( line.x , line.y);
                    //console.log(line.x,line.y);
                }
            }
            num ++;
        }



        context.stroke();

        this.counter+= laserLength/20 ;

    }
/**
     * Function to draw sine
     *
     * The sine curve is drawn in 10px segments starting at the origin.
     */
Function to draw sine
The sine curve is drawn in 10px segments starting at the origin.
Function to draw sine The sine curve is drawn in 10px segments starting at the origin .
drawSine (context) {
        const {color} = this.props;
        let laserLength = 200;
        context.strokeStyle = color;
        context.beginPath();
        let num = 0;
        for(let line of this.lines) {
            if ((this.counter >= num && this.counter <= num + laserLength) || true) {
                if(this.counter == num) {
                     context.moveTo( line.x  , line.y);
                } else {
                    context.lineTo( line.x , line.y);
                }
            }
            num ++;
        }
        context.stroke();
        this.counter+= laserLength/20 ;
    }
drawSine ( context ) { const { color } = this . props ; let laserLength = 200 ; context . strokeStyle = color ; context . beginPath ( ) ; let num = 0 ; for ( let line of this . lines ) { if ( ( this . counter >= num && this . counter <= num + laserLength ) || true ) { if ( this . counter == num ) { context . moveTo ( line . x , line . y ) ; } else { context . lineTo ( line . x , line . y ) ; } } num ++ ; } context . stroke ( ) ; this . counter += laserLength / 20 ; }
Function to draw sine
 The sine curve is drawn in 10px segments starting at the origin.
Function to draw sine The sine curve is drawn in 10px segments starting at the origin .
//context.moveTo( line.x,  line.y); //context.lineTo( line.x,  line.y); //console.log(line.x,line.y);