JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    <canvas id='example' width=512px height=512px></canvas>
</body>

JavaScript

frame = 0;
	ctx = document.getElementById("example").getContext('2d');
	img1 = new Image();
	img2 = new Image();
	img1.src = 'http://rghost.ru/private/7dRKVSYnr/97601a192fa14627af3228f6352a5f3b/image.png';
	img2.src = 'http://rghost.ru/private/8PP77NW9c/a22aa3c80c4a64d7bc75a4bf98d36146/image.png';

	setInterval(function () {
	    ctx.drawImage(frame++%2 ? img1 : img2, 0, 0);
	}, 20);