LÍO EN LA ESCUELA. 3D COLOR GAME
- José Carusso
- 30 dic 2024
- 2 Min. de lectura
Chistecito 1
- FELIPE.
- SÍ MAFALDA.
- JUGUEMOS CON LOS COLORES.
- OK, MIRÁ ESTE CÓDIGO DE TREBEDIT, ES SOLO PARA CELULARES Y TABLETS:
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<HEAD>
<TITLE>3D COLORS</TITLE>
<STYLE>
#fondo {
background-color: #FFFFFF;
}
</STYLE>
</HEAD>
<body>
<DIV id="fondo">
<h1>DOM touchmove Evento</h1>
<p ontouchmove="myFunction(event)">Este código es para que las nenas y los nenes jueguen con los colores. La posición a la izquierda arriba es el 0 de Red y 0 de Green, a la derecha abajo es FF de Red y FF de Green. Con el zoom cambian el Blue de 0 a FF. Las tres coordenadas X Y Z conforman el color RGB. Si descubrís un color interesante anotá el código hexadecimal de abajo.</p>
</DIV>
<BR>
<p><strong>Nota:</strong> Este ejemplo es solo para dispositivos con Touch Screen.</p>
<p id="demo">Color RGB: #FFFFFF</p>
<DIV>
<IMG src="";
</DIV>
<script>
var x=255;
var y=255;
var z=255;
var xchar="";
var ychar="";
var zchar="";
function myFunction(event){
x = event.touches[0].clientX;
if(x>255){x=255;}else if(x<0){x=0;}
y = event.touches[0].clientY;
y=y/1.5;
if(y>255){y=255;}else if(y<0){y=0;}
if (event.touches.length === 2) {
scaling = true;
z = Math.hypot( event.touches[0].pageX - event.touches[1].pageX, event.touches[0].pageY - event.touches[1].pageY);
if(z>255){z=255;}else if(z<48){z=48;}
z=(z-48)*1.231884058;
}
c=document.getElementById("fondo").style.color;
c="red";
if(x<16){xchar="0";}
xchar=xchar+Math.floor(x).toString(16).toUpperCase();
if(y<16){ychar="0";}
ychar=ychar+Math.floor(y).toString(16).toUpperCase();
if(z<16){zchar="0";}
zchar=zchar+Math.floor(z).toString(16).toUpperCase();
document.getElementById("demo").innerHTML = "Color RGB: #"+xchar + ychar + zchar;
document.getElementById("fondo").style.backgroundColor="#"+xchar+ychar+zchar;
xchar="";
ychar="";
zchar="";
}
</script>
</body>
</html>
- QUE BUENO ME SIRVE PARA JUGAR CON LOS COLORES Y CODIFICARLOS PARA MIS PROGRAMAS.
- POS CLARO, MAJA.
- MAFALDA, ME LLAMO MAFALDA.
JAJAJA.
Chistecito 2
- MAFALDA.
- SÍ MANOLITO.
- TENÉS QUE PROBAR MIS MUFFINS.
- EN ARGENTINA SE LLAMAN MAGDALENAS.
- BUAAA…
- ¿POR QUÉ LLORÁS?
- PORQUE VENDIENDO PRODUCTOS IMPORTADOS GANO MÁS.
JAJAJA.
Chistecito 3
- PAPÁ.
- SÍ MAFALDA.
- ¿QUERÉS JUGAR CON MI PROGRAMA?
- ¿QUÉ HAY QUE HACER?
- TE DIGO UN COLOR Y LO BUSCÁS EN MI APP.
- ¿POR EJEMPLO?
- ROSA.
- MEJOR ME DEDICO A UNA TAREA MÁS LABORIOSA.
JAJAJA.
BACHATA ROSA






Comentarios