init () {

        const {width, height, canvas} = this.props;

        canvas.width = width;
        canvas.height = height;

        this.context = canvas.getContext("2d");
        this.context.font = '18px sans-serif';
        this.context.strokeStyle = '#000';
        this.context.lineJoin = 'round';

        this.context.save();
        this.draw();
    }
/**
     * Init function.
     *
     * Initialize variables and begin the animation.
     */
Init function.
Initialize variables and begin the animation.
Init function . Initialize variables and begin the animation .
init () {
        const {width, height, canvas} = this.props;
        canvas.width = width;
        canvas.height = height;
        this.context = canvas.getContext("2d");
        this.context.font = '18px sans-serif';
        this.context.strokeStyle = '#000';
        this.context.lineJoin = 'round';
        this.context.save();
        this.draw();
    }
init ( ) { const { width , height , canvas } = this . props ; canvas . width = width ; canvas . height = height ; this . context = canvas . getContext ( "2d" ) ; this . context . font = '18px sans-serif' ; this . context . strokeStyle = '#000' ; this . context . lineJoin = 'round' ; this . context . save ( ) ; this . draw ( ) ; }
Init function.
Init function .