coisinhas
varias coisinhas aleatórias
efeitinhos que to coletando
boa parte (ou tudo) são do https://www.mf2fm.com/rv/
explosãozinha quando clica
RAINBOW GLOW TEXT EFFECT
RAINBOW GLOW TEXT
ARCOIRUUUUUUUUUIIIIIIIIAAAAAAEEEEEEEEEIIIIIOOOOOOOOOYYYYY
ARCOIRUUUUUUUUUIIIIIIIIAAAAAAEEEEEEEEEIIIIIOOOOOOOOOYYYYY
// data-speed ms, data-glow px, data-link URL.
inicializadores.push(() => {
const numero = (valor, padrao) => {
const n = Number(valor);
return Number.isFinite(n) ? n : padrao;
};
const cores = [
"#ff0000", "#ff5500", "#ffaa00", "#ffff00", "#aaff00", "#55ff00",
"#00ff00", "#00ff55", "#00ffaa", "#00ffff", "#00aaff", "#0055ff",
"#0000ff", "#5500ff", "#aa00ff", "#ff00ff", "#ff00aa", "#ff0055",
];
class ArcoIrisBrilhante {
constructor(elemento) {
this.elemento = elemento;
this.texto = Array.from(elemento.textContent);
this.velocidade = numero(elemento.dataset.speed, 100);
this.brilho = numero(elemento.dataset.glow, 3);
this.link = elemento.dataset.link || null;
this.fase = 0;
this.timer = null;
this.letras = [];
elemento.replaceChildren();
elemento.dataset.rainbowReady = "true";
for (const caractere of this.texto) {
const letra = document.createElement("span");
letra.className = "rainbow-glow__char";
letra.textContent = caractere;
this.letras.push(letra);
elemento.append(letra);
}
if (this.link) {
elemento.addEventListener("click", () => {
window.location.href = this.link;
});
}
this.tick();
}
tick() {
this.letras.forEach((letra, indice) => {
const cor = cores[(indice + this.fase) % cores.length];
letra.style.color = cor;
letra.style.textShadow = this.brilho
? `${cor} 0 0 ${this.brilho}px`
: "none";
});
this.fase = (this.fase + 1) % cores.length;
this.timer = setTimeout(() => this.tick(), this.velocidade);
}
}
for (const elemento of document.querySelectorAll(".rainbow-glow:not([data-rainbow-ready])")) {
new ArcoIrisBrilhante(elemento);
}
});
escrevinhando
WIPE OUT TEXT
WIPE OUT TEXT2
WIPE OUT TEXT2
// data-speed ms, data-delay ticks, data-link URL.
inicializadores.push(() => {
const numero = (valor, padrao) => {
const n = Number(valor);
return Number.isFinite(n) ? n : padrao;
};
class Escrevinhando {
constructor(elemento) {
this.elemento = elemento;
this.texto = Array.from(elemento.textContent); // Array.from lida com emoji
this.velocidade = numero(elemento.dataset.speed, 100);
this.pausa = numero(elemento.dataset.delay, 25);
this.link = elemento.dataset.link || null;
this.passo = 0;
this.timer = null;
this.letras = [];
elemento.replaceChildren();
elemento.dataset.wipeReady = "true";
for (const caractere of this.texto) {
const letra = document.createElement("span");
letra.className = "wipe-out__char is-hidden";
letra.textContent = caractere;
this.letras.push(letra);
elemento.append(letra);
}
if (this.link) {
elemento.addEventListener("click", () => {
window.location.href = this.link;
});
}
this.tick();
}
tick() {
const total = this.letras.length;
const ciclo = Math.max(total + this.pausa, 1);
const passo = this.passo;
if (passo === 0) {
for (const letra of this.letras) letra.classList.add("is-hidden");
} else if (passo <= total) {
this.letras[passo - 1].classList.remove("is-hidden");
}
// passo > total: mantém o texto completo antes de recomeçar
this.passo = (passo + 1) % ciclo;
this.timer = setTimeout(() => this.tick(), this.velocidade);
}
}
for (const elemento of document.querySelectorAll(".wipe-out:not([data-wipe-ready])")) {
new Escrevinhando(elemento);
}
});