Moved code to js version of my BurningByte engine (which I introduce
now).