JSFiddle - React, Tailwind, and code Playground

HTML

<div id="screen">
	<div id="img">
		<img alt="Teste1" src="">
		<img alt="asdsad" src="">
		<img alt="Teste2" src="">
		<img alt="Teste3" src="">
		<img alt="Teste4" src="">
		<img alt="Teste5" src="">
		<img alt="Teste6" src="">
		<img alt="Teste7" src="">
	</div>
	<div id="tit"></div>
</div>

CSS

html {
		overflow: hidden;
	}
	body {
		background: #fff;
		width:100%;
		height:100%;
		margin:0;
	}
	#screen {
		position: absolute;
		width: 100%;
		height: 100%;
	}	
	
	#img {
		visibility: hidden;
	}
	#screen img  {
		position:absolute;
		left:-10000px;
		z-index:100;
		-ms-interpolation-mode:nearest-neighbor;
		image-rendering: optimizeSpeed;
		cursor: pointer;
		border:#333 solid 1px;
	}
	#tit {
		text-align:center;
		position:absolute;
		color:#000;
		font-family:verdana;
		font-weight:bold;
		font-size:48px;
		filter: alpha(opacity=30);
		opacity: 0.3;
		width:100%;
		bottom:12px;
		z-index:10000;
	}

JavaScript

var diapo = function () {
    var object = new Array(),
        K = Math.PI / 180,
        N = 0,
        xm = 0,
        ym = 0,
        mx = 0,
        my = 0,
        ax = 0,
        ay = 0,
        Nb = 0,
        tit = 0,
        img = 0;

    var zM = 4;

    var CObj = function (N, x, y, z) {
        var I = img.getElementsByTagName("img")[N % img.getElementsByTagName("img").length];
        var o = document.createElement("img");
        o.onclick = function () {
            if (object[N].on == true) object[N].on = false;
            else object[N].on = true;
        }
        o.onmouseover = function () {
            if (Nb != N) {
                Nb = N;
                tit.innerHTML = I.alt;
            }
        }
        o.onmouseout = function () {
            Nb = -1;
            object[N].on = false;
        }
        o.onmousedown = new Function("return false");
        o.src = I.src;
        scr.appendChild(o);
        this.obj = o.style;
        this.z = Math.round(z * ny * .25);
        this.x = Math.round(x * ny * .25);
        this.y = Math.round(y * ny * .25);
        this.on = false;
        this.zOOm = 1;
        this.N = N;
    }

    CObj.prototype.anim = function () {
        var xP = this.z * Math.sin(mx * K) + this.x * Math.cos(mx * K);
        var zP = this.z * Math.cos(mx * K) - this.x * Math.sin(mx * K);
        var yP = this.y * Math.cos(my * K) - zP * Math.sin(my * K);
        zP = this.y * Math.sin(my * K) + zP * Math.cos(my * K);
        var w = (zP * .25 + ny * .25) * this.zOOm;
        var h = w * .8;
        if (this.on && zP > 0) {
            if (this.zOOm < zM) this.zOOm += .05;
        } else {
            if (this.zOOm > 1) this.zOOm -= .025;
        }
        this.obj.left = Math.round(xP + nx * .5 - w * .5) + "px";
        this.obj.top = Math.round(yP + ny * .5 - h * .5) + "px";
        this.obj.width = Math.round(w) + "px";
        this.obj.height = Math.round(h) + "px";
        this.obj.zIndex = Math.round(1000 +...