JSFiddle - React, Tailwind, and code Playground

by Darby Rathbone

CSS

body{
    overflow:hidden;
}

JavaScript

window.requestAnimFrame = (function () {
    return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function ( /* function */ callback, /* DOMElement */ element) {
        window.setTimeout(callback, 1000 / 60);
    };
})();

var canvas = document.getElementById("myCanvas");
var canvas2 = document.getElementById("myCanvas2");
var center = document.getElementById("center");
var hands = document.getElementById("hands");
var vid = document.getElementById("videoWrapper");
var video = document.getElementById("bj_vid");
var vWrapper = document.getElementById("videoWrapper");
var leftHand = document.getElementById("left");
var rightHand = document.getElementById("right");
var txt = document.getElementById("txtImages");
var vidWidth, vidHeight;
var W = window.outerWidth;
var H = window.outerHeight;
var m = Math.min(W, H);
var s = m * 4.5E-4;
var ch = 29.75 * s;
canvas.width = W;
canvas.height = H;
canvas2.width = W;
canvas2.height = H;
var vidWidth = images[7].width * s + images[8].width * s,
    vidHeight = images[7].height * s,
    lhWidth = images[2].width * s,
    rhWidth = images[3].width * s,
    rhHeight = images[1].height * s;
var ctx = canvas.getContext("2d");
var ctx2 = canvas2.getContext("2d");
var clouds = [images[4], images[5]];
var idx = 0;
var vel = 0.55;
var v = isNaN(v) ? 0 : v;
var f = isNaN(f) ? 0 : f;
var alpha = 1;
var alpha2 = 1;
var alpha3 = 1;
var alphaSky = 1;
var alphaESky = 0;
var alphaRay = 0;
var alphaTxt = 0;
var particles = [];
for (var i = 0; i < 100; i++) {
    particles.push(new create_particle());
}

function create_particle() {
    this.x = Math.random() * W / Math.random() / Math.random() - 200;
    this.y = Math.random() * H / Math.random() / Math.random() - 200;
    this.vx = Math.random() * vel;
    this.vy = Math.random() * vel;
    this.radius = Math.random() * 20 + 20;
}
var x = 100;
var y = 100;
var...