Study for a javascript tile generator