JSFiddle - React, Tailwind, and code Playground

by Arif Reza

HTML

<div class="line"><script>for (i=0;i<=50;i++){document.write("<div class='ball ball"+i+"' style='left:"+(i*20)+"px;top:-10px;'></div>");}</script></div>

CSS

.ball {width:20px;height:20px;position:absolute;left:0px;top:-10px;background:red;border-radius:10px;}
.line {width:200px;height:2px;position:absolute;left:20px;top:210px;background:white;}

JavaScript

var a=100,
Wd=10,
speed=100,
Wr	=(Math.PI*Wd)/180, W=Wr;

var time= new Array();
for (j=0;j<=document.getElementsByClassName("ball").length;j++){time[j]=0;}

function run(particle){
	ball=$(particle);
	number = particle.substr(5);
	time[number]+=speed/100;
	t=time[number];
	WT=W*t;
	y=a *...