EFEITO NEVE REVISADO COM MAIS FLOCOS!
Publicado por Leonardo Berbert Gomes 13/01/2005
[ Hits: 24.482 ]
Homepage: https://www.linkedin.com/in/leoberbert
Efeito neve agora revisado, com mais flocos.Um efeito que faz flocos de neve cairem por sua
tela, flocos de neve ou qualquer outra figura, mas para isso você terá que mexer no código
fonte.
<html>
<head>
<title>
Teste
</title>
</head>
<body bgcolor="black">
<center><font size="7px" color="Green">
SCRIPT REVISADO E RECRIADO POR<br> Leonardo Berbert
<script language="JavaScript">
//COLOCADO SOBRE AS TAG's BODY \\
<!--
var FLOCOS = 50;
var VELOCIDADE = 30;
var FIGURA = "local aonde a figura NEVE.gif está localizada";
var PROGRAMA = navigator.appName;
var COORDENADA = new Array();
var POSICAO_X = new Array();
var POSICAO_Y = new Array();
var AMPLITUDE = new Array();
var AVANCA_X = new Array();
var AVANCA_Y = new Array();
var RX, RY, I, LARGURA, COMPRIMENTO;
if (PROGRAMA == 'Netscape') {
LARGURA = self.innerWidth;
COMPRIMENTO = self.innerHeight; }
else {
LARGURA = document.body.clientWidth;
COMPRIMENTO = document.body.clientHeight;
}
for (I=0; I<FLOCOS; I++) {
COORDENADA[I] = 0;
POSICAO_X[I] = Math.random() * (LARGURA - 50);
POSICAO_Y[I] = Math.random() * COMPRIMENTO;
AMPLITUDE[I] = Math.random() * 20;
AVANCA_X[I] = 0.02 + Math.random() / 10;
AVANCA_Y[I] = 0.7 + Math.random();
if (PROGRAMA == 'Netscape') {
document.write('<LAYER NAME=\"dot' + I + '\" LEFT=\"15\" ');
document.write('TOP=\"15\" VISIBILITY=\"SHOW\"><IMG SRC=\"');
document.write(FIGURA + '\" BORDER=\"0\"></LAYER>'); }
else {
document.write('<DIV ID=\"dot' + I + '\" STYLE=\"POSITION: ');
document.write('ABSOLUTE; Z-INDEX: ' + I + '; VISIBILITY: ');
document.write('VISIBLE; TOP: 15px; LEFT: 15px;\"><IMG SRC=\"');
document.write(FIGURA + '\" BORDER=\"0\"></DIV>');
}
}
function MoveFlocos() {
for (I=0; I<FLOCOS; I++) {
POSICAO_Y[I] += AVANCA_Y[I];
if (POSICAO_Y[I] > COMPRIMENTO - 50) {
POSICAO_X[I] = Math.random() * (LARGURA - AMPLITUDE[I] - 30);
POSICAO_Y[I] = 0;
AVANCA_X[I] = 0.02 + Math.random() / 10;
AVANCA_Y[I] = 0.7 + Math.random();
}
COORDENADA[I] += AVANCA_X[I];
RX = POSICAO_X[I] + AMPLITUDE[I] * Math.sin(COORDENADA[I]);
RY = POSICAO_Y[I];
if (PROGRAMA == 'Netscape') {
document.layers["dot" + I].top = RY;
document.layers["dot" + I].left = RX; }
else {
document.all["dot" + I].style.pixelTop = RY;
document.all["dot" + I].style.pixelLeft = RX;
}
}
setTimeout('MoveFlocos()', VELOCIDADE);
}
MoveFlocos();
//-->
</script>
</body>
</html>
Calculadora Bem Legal box shadow e border Radius
Mudando o layout dinamicamente
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Novos apps de produtividade, avanços em IA e distros em ebulição agitam o universo Linux
Como instalar o repositório do DBeaver no Ubuntu
Como instalar o Plex Media Server no Ubuntu
Digitando underscore com "shift" + "barra de espaços"
Como ativar a lixeira e recuperar aquivos deletados em um servidor Linux
Como mudar o nome de dispositivos Bluetooth via linha de comando
Linux é a solução para o fim do Windows10? (2)
Problemas com Driver NVIDIA (4)
Programa fora de escala na tela do pc (28)
converter algoritmo C++ em C? (1)
Fedora KDE plasma 42 X Módulo de segurança BB (Warsaw-2) (1)









