Animate Canvas from Vue

I am trying to implement this post, which draws and animates a stick figure, into Vue.

   draw(timestamp, wave) {
        if(Date.now() < (timestamp+900)) return requestAnimationFrame(this.draw);

        context.clearRect(0, 0, window.innerWidth, window.innerHeight);
        context.beginPath();
        context.fillStyle = "black"; // #000000
        context.arc(200, 50, 30, 0, Math.PI * 2, true);
        context.fill(); //fill the circle  

        context.beginPath(); 
        context.lineWidth = 6;
        context.stroke();

        //body
        context.beginPath();
        context.moveTo(200, 80);
        context.lineTo(200, 180);
        context.strokeStyle = "black";
        context.stroke();

        //arms
        context.beginPath();
        context.strokeStyle = "black";
        context.moveTo(200, 100);
        context.lineTo(150, 130);
        if(wave) { 
        context.moveTo(200, 100);
        context.lineTo(250, 130);
        wave = false;
        }
        else {
        context.moveTo(200, 100);
        context.lineTo(250, 70);
        wave = true;
        }
        context.stroke();

        //legs
        context.beginPath();
        context.strokeStyle = "black";
        context.moveTo(200, 180);
        context.lineTo(150, 280);
        context.moveTo(200, 180);
        context.lineTo(250, 280);
        context.stroke();
        timestamp = Date.now();
        requestAnimationFrame(this.draw);
    }
},
mounted: function () {
    var canvas = document.getElementById("canvas");
    context = canvas.getContext("2d"); // get Canvas Context object
    let timestamp = Date.now();
    let wave = false;

    this.draw(timestamp, wave);
}

If I do the entire draw method inside of my mounted method, it works. But when I move draw to it’s own method, as shown above, it fails.

I know it’s failing because the line if(Date.now() < (timestamp+900)) is always returning false when running the code above. But I’m not sure why that’s happening, or what the difference is.

How can I get this canvas to animate?

Animate Canvas from Vue