GTM-NW983Z3S
(function () {
if (window.__heyLordGlobeLoaded) return;
window.__heyLordGlobeLoaded = true;
const style = document.createElement("style");
style.textContent = `
#hl-globe-widget {
position: fixed;
right: 22px;
bottom: 22px;
width: 142px;
z-index: 99990;
font-family: Arial, sans-serif;
color: #fff;
text-align: center;
}
#hl-globe {
width: 142px;
height: 142px;
border-radius: 50%;
overflow: hidden;
filter: drop-shadow(0 5px 12px rgba(0,0,0,.35));
}
#hl-globe-note {
margin-top: 8px;
padding: 9px 10px;
border: 1px solid rgba(255,255,255,.15);
border-radius: 10px;
background: rgba(15,20,25,.94);
box-shadow: 0 4px 18px rgba(0,0,0,.22);
font-size: 11px;
line-height: 1.4;
text-align: left;
opacity: 1;
transition: opacity .4s ease;
}
#hl-globe-note .hl-city {
color: #a7ef45;
font-weight: bold;
}
#hl-globe-note small {
display: block;
margin-top: 3px;
color: #b9c0c7;
font-size: 9px;
}
@media(max-width:600px) {
#hl-globe-widget {
right: 10px;
bottom: 12px;
width: 112px;
}
#hl-globe {
width: 112px;
height: 112px;
}
}
`;
document.head.appendChild(style);
const widget = document.createElement("div");
widget.id = "hl-globe-widget";
widget.innerHTML = `
BRASIL — SP
Movimentação ilustrativa
`;
document.body.appendChild(widget);
const places = [
{ name: "São Paulo", uf: "SP", lat: -23.55, lng: -46.63 },
{ name: "Francisco Morato", uf: "SP", lat: -23.28, lng: -46.75 },
{ name: "Campinas", uf: "SP", lat: -22.90, lng: -47.06 },
{ name: "Santos", uf: "SP", lat: -23.96, lng: -46.33 },
{ name: "Belo Horizonte", uf: "MG", lat: -19.92, lng: -43.94 },
{ name: "Uberlândia", uf: "MG", lat: -18.91, lng: -48.27 },
{ name: "Rio de Janeiro", uf: "RJ", lat: -22.90, lng: -43.20 },
{ name: "Curitiba", uf: "PR", lat: -25.43, lng: -49.27 },
{ name: "Porto Alegre", uf: "RS", lat: -30.03, lng: -51.23 },
{ name: "Florianópolis", uf: "SC", lat: -27.59, lng: -48.55 },
{ name: "Salvador", uf: "BA", lat: -12.97, lng: -38.50 },
{ name: "Recife", uf: "PE", lat: -8.05, lng: -34.90 },
{ name: "Fortaleza", uf: "CE", lat: -3.73, lng: -38.52 },
{ name: "Brasília", uf: "DF", lat: -15.79, lng: -47.88 },
{ name: "Goiânia", uf: "GO", lat: -16.68, lng: -49.25 },
{ name: "Manaus", uf: "AM", lat: -3.12, lng: -60.02 },
{ name: "Belém", uf: "PA", lat: -1.45, lng: -48.50 },
{ name: "Vitória", uf: "ES", lat: -20.31, lng: -40.31 },
{ name: "Campo Grande", uf: "MS", lat: -20.46, lng: -54.62 },
{ name: "Natal", uf: "RN", lat: -5.79, lng: -35.21 },
{ name: "Buenos Aires", uf: "AR", lat: -34.60, lng: -58.38 },
{ name: "Cidade do México", uf: "MX", lat: 19.43, lng: -99.13 },
{ name: "Santiago", uf: "CL", lat: -33.45, lng: -70.66 },
{ name: "Lisboa", uf: "PT", lat: 38.72, lng: -9.13 },
{ name: "Miami", uf: "US", lat: 25.76, lng: -80.19 },
{ name: "Londres", uf: "UK", lat: 51.50, lng: -0.12 },
{ name: "Paris", uf: "FR", lat: 48.85, lng: 2.35 },
{ name: "Tóquio", uf: "JP", lat: 35.68, lng: 139.69 }
];
let lastIndex = -1;
function nextPlace() {
let index;
do {
index = Math.floor(Math.random() * places.length);
} while (index === lastIndex);
lastIndex = index;
return places[index];
}
function updateNote() {
const note = document.getElementById("hl-globe-note");
if (!note) return;
note.style.opacity = "0";
setTimeout(function () {
const place = nextPlace();
note.innerHTML =
'' +
place.name.toUpperCase() + " — " + place.uf +
'Atividade ilustrativa';
note.style.opacity = "1";
}, 400);
}
setInterval(updateNote, 5500);
function loadGlobe() {
if (typeof window.Globe !== "function") return;
const globe = window.Globe()(document.getElementById("hl-globe"))
.width(window.innerWidth <= 600 ? 112 : 142)
.height(window.innerWidth <= 600 ? 112 : 142)
.backgroundColor("rgba(0,0,0,0)")
.globeImageUrl(
"https://unpkg.com/three-globe/example/img/earth-blue-marble.jpg"
)
.bumpImageUrl(
"https://unpkg.com/three-globe/example/img/earth-topology.png"
)
.showAtmosphere(true)
.atmosphereColor("#70b9ff")
.atmosphereAltitude(0.16)
.pointsData(places)
.pointLat("lat")
.pointLng("lng")
.pointColor(() => "#8cff35")
.pointAltitude(0.012)
.pointRadius(0.32)
.pointResolution(8)
.ringsData(places.slice(0, 12))
.ringLat("lat")
.ringLng("lng")
.ringColor(() => t => `rgba(140,255,53,${1-t})`)
.ringMaxRadius(2)
.ringPropagationSpeed(0.8)
.ringRepeatPeriod(1800);
globe.pointOfView({ lat: -15, lng: -48, altitude: 2.2 }, 1000);
fetch(
"https://raw.githubusercontent.com/codeforgermany/click_that_hood/main/public/data/brazil-states.geojson"
)
.then(response => response.json())
.then(data => {
globe
.polygonsData(data.features)
.polygonCapColor(() => "rgba(0,0,0,0)")
.polygonSideColor(() => "rgba(0,0,0,0)")
.polygonStrokeColor(() => "rgba(255,255,255,0.65)")
.polygonAltitude(0.008);
})
.catch(() => {});
}
const library = document.createElement("script");
library.src = "https://unpkg.com/globe.gl";
library.onload = loadGlobe;
library.onerror = function () {
const note = document.getElementById("hl-globe-note");
if (note) note.innerHTML = "Globo indisponível no momento";
};
document.head.appendChild(library);
})();