function spawner_to(t)
{
    console.log('spawner_to');
    var prefab = document.querySelector('bug[is_prefab=true]');
    prefab.style.setProperty
    (
        'background'
        , 
        `url('public/bugs/${getRandomName()}.png') center center / contain no-repeat`
    );
    var clone = prefab.spawn_me();
    
    var top = t.style.getPropertyValue('top');
    var left = t.style.getPropertyValue('left');
    clone.style.setProperty('top', top);
    clone.style.setProperty('left', left);
    return clone;
}
function getRandomInt(max) 
{
    return Math.floor(Math.random() * max);
}
function getRandomName ()
{
    var names =
    [
        'chinche1'
        ,
        'chinche2'
        ,
        'gusano1'
        ,
        'gusano2'
        ,
        'gusano3'
        ,
        'hormiga'
    ];
    return names[getRandomInt(names.length)];
}
