<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Código JAVA SCRIPT  by Fernando Díaz</title>
      <link>https://padlet.com/ffernandoodi18/Bookmarks</link>
      <description>GRUPO N°3</description>
      <language>en-us</language>
      <pubDate>2021-04-30 17:23:51 UTC</pubDate>
      <lastBuildDate>2025-12-01 10:05:45 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f916.png</url>
      </image>
      <item>
         <title>ELEMENTOS </title>
         <author>ffernandoodi18</author>
         <link>https://padlet.com/ffernandoodi18/Bookmarks/wish/1479241986</link>
         <description><![CDATA[<div>var Elemento, Nombre, Apellido, Edad, long, i, edadfalsa;<br>edadfalsa = 0;<br>console.log("Inicializados todos los elementos elementos");<br>function Enviar()<br>{<br>	Nombre = document.getElementById("Nombre").value;<br>	Apellido = document.getElementById("Apellido").value;<br>	Edad = document.getElementById("Edad").value;<br>	if (Elememto = "") {<br>		long = Edad.length;<br>		console.log(long)<br>		for (i = 0; i &lt; long; i++) {<br>			console.log(Edad.codePointAt(i))<br>			if ((Edad.codePointAt(i) &lt; 48) || (Edad.codePointAt(i) &gt; 57)) {<br>				console.log(Edad.codePointAt(i))<br>				edadfalsa = 1;<br>			}<br>		}<br>		if (long == 0) {<br>			edadfalsa = 0;<br>		}<br>		if (edadfalsa == 0 &amp;&amp; Edad != "" &amp;&amp; Apellido != "" &amp;&amp; Nombre != "") {<br>			console.log(Nombre + " " + Apellido + " " + Edad + " " + Elemento);<br>			document.getElementById("texto3").innerHTML = "&lt;br&gt; Nombres: " + Nombre + "&lt;br&gt; Apellidos: " + Apellido + "&lt;br&gt; Edad: " + Edad + "&lt;br&gt; Elemento: Sin elegir";<br>		}<br>		else {<br>			if (Edad == "") {<br>				document.getElementById("texto3").innerHTML = "&lt;br&gt; La edad no puede ser un texto vacío";<br>				document.getElementById("Edad").focus;<br>			}<br>			else {<br>				if (edadfalsa == 1) {<br>					document.getElementById("texto3").innerHTML = "&lt;br&gt; La edad no puede ser un caracter no numérico";<br>					document.getElementById("Edad").focus;<br>				}<br>				else {<br>					if (Nombre == "") {<br>						document.getElementById("texto3").innerHTML = "&lt;br&gt; El nombre no debe ser un texto vacío";<br>						document.getElementById("Nombre").focus;<br>					}<br>					else {<br>						if (Apellido == "") {<br>							document.getElementById("texto3").innerHTML = "&lt;br&gt; El Apellido no debe ser un texto vacío";<br>							document.getElementById("Apellido").focus;<br>						}<br>						else {<br>							document.getElementById("texto3").innerHTML = "&lt;br&gt; Ha ocurrido un error en el código";<br>						}<br>					}<br>				}<br>			}<br>		}<br>	}<br>	else {<br>		long = Edad.length;<br>		console.log(long)<br>		for (i = 0; i &lt; long; i++) {<br>			if ((Edad.codePointAt(i) &lt; 48) || (Edad.codePointAt(i) &gt; 57)) {<br>				console.log(Edad.codePointAt(i))<br>				edadfalsa = 1;<br>			}<br>		}<br>		if (long == 0) {<br>			edadfalsa = 0;<br>		}<br>		if (edadfalsa == 0 &amp;&amp; Edad != "" &amp;&amp; Apellido != "" &amp;&amp; Nombre != "") {<br>			console.log(Nombre + " " + Apellido + " " + Edad + " " + Elemento);<br>			document.getElementById("texto3").innerHTML = "&lt;br&gt; Nombres: " + Nombre + "&lt;br&gt; Apellidos: " + Apellido + "&lt;br&gt; Edad: " + Edad + "&lt;br&gt; Elemento: " + Elemento;<br>		}<br>		else<br>		{<br>			if (Edad == "") {<br>				document.getElementById("texto3").innerHTML = "&lt;br&gt; La edad no puede ser un texto vacío";<br>				document.getElementById("Edad").focus;<br>			}<br>			else {<br>				if (edadfalsa == 1) {<br>					document.getElementById("texto3").innerHTML = "&lt;br&gt; La edad no puede ser un caracter no numérico";<br>					document.getElementById("Edad").focus;<br>				}<br>				else<br>				{<br>					if (Nombre == "") {<br>						document.getElementById("texto3").innerHTML = "&lt;br&gt; El nombre no debe ser un texto vacío";<br>						document.getElementById("Nombre").focus;<br>					}<br>					else<br>					{<br>						if (Apellido == "") {<br>							document.getElementById("texto3").innerHTML = "&lt;br&gt; El Apellido no debe ser un texto vacío";<br>							document.getElementById("Apellido").focus;<br>						}<br>						else<br>						{<br>							document.getElementById("texto3").innerHTML = "&lt;br&gt; Ha ocurrido un error en el código";<br>						}<br>					}<br>				}<br>			}<br>		}<br>	}<br>}<br>function Fuego() {<br>	Elemento = "Fuego";<br>	document.getElementById('Imagen').src = 'a.png';<br>	document.getElementById('fondo').style.backgroundColor = '#FF6600';<br>	document.getElementById('texto').style.color = '#FFFE01';<br>	document.getElementById('texto2').style.color = '#FFFE01';<br>	document.getElementById('texto').innerHTML = "Clase Fuego";<br>	document.getElementById("texto2").innerHTML = "La clase fuego puede quemar todo a su alrededor";<br>}<br>function Agua() {<br>	Elemento = "Agua";<br>	document.getElementById('Imagen').src = 'b.png';<br>	document.getElementById('fondo').style.backgroundColor = '#2BFFFF';<br>	document.getElementById('texto').style.color = '#164676';<br>	document.getElementById('texto2').style.color = '#164676';<br>	document.getElementById('texto').innerHTML = "Clase Agua";<br>	document.getElementById("texto2").innerHTML = "La clase agua puede causar inundaciones";<br>}<br>function Planta() {<br>	Elemento = "Planta";<br>	document.getElementById('Imagen').src = 'c.png';<br>	document.getElementById('fondo').style.backgroundColor = '#FBC5E5';<br>	document.getElementById('texto').style.color = '#744A3A';<br>	document.getElementById('texto2').style.color = '#744A3A';<br>	document.getElementById('texto').innerHTML = "Clase Planta";<br>	document.getElementById("texto2").innerHTML = "La clase planta puede hacer crecer la vegetación";<br>}<br>function Piedra() {<br>	Elemento = "Piedra";<br>	document.getElementById('Imagen').src = 'd.png';<br>	document.getElementById('fondo').style.backgroundColor = '#666666';<br>	document.getElementById('texto').style.color = '#BBBBBB';<br>	document.getElementById('texto2').style.color = '#BBBBBB';<br>	document.getElementById('texto').innerHTML = "Clase Piedra";<br>	document.getElementById("texto2").innerHTML = "La clase piedra puede modificar el entorno (Terraformación)";<br>}<br>function Viento() {<br>	Elemento = "Viento";<br>	document.getElementById('Imagen').src = 'e.png';<br>	document.getElementById('fondo').style.backgroundColor = '#E0FFFF';<br>	document.getElementById('texto').style.color = '#5391C7';<br>	document.getElementById('texto2').style.color = '#5391C7';<br>	document.getElementById('texto').innerHTML = "Clase Viento";<br>	document.getElementById("texto2").innerHTML = "La clase viento puede crear ráfagas de aire y huracanes";<br>}<br>function Luz() {<br>	Elemento = "Luz";<br>	document.getElementById('Imagen').src = 'f.png';<br>	document.getElementById('fondo').style.backgroundColor = '#FFFFFF';<br>	document.getElementById('texto').style.color = '#FFFF22';<br>	document.getElementById('texto2').style.color = '#FFFF22';<br>	document.getElementById('texto').innerHTML = "Clase Luz";<br>	document.getElementById("texto2").innerHTML = "La clase luz puede crear brillantes destellos";<br>}<br>function Oscuridad() {<br>	Elemento = "Oscuridad";<br>	document.getElementById('Imagen').src = 'g.png';<br>	document.getElementById('fondo').style.backgroundColor = '#333333';<br>	document.getElementById('texto').style.color = '#999999';<br>	document.getElementById('texto2').style.color = '#999999';<br>	document.getElementById('texto').innerHTML = "Clase Oscuridad";<br>	document.getElementById("texto2").innerHTML = "La clase oscuridad puede crear tinieblas";<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-04-30 17:25:20 UTC</pubDate>
         <guid>https://padlet.com/ffernandoodi18/Bookmarks/wish/1479241986</guid>
      </item>
      <item>
         <title>CALCULADORA</title>
         <author>ffernandoodi18</author>
         <link>https://padlet.com/ffernandoodi18/Bookmarks/wish/1479243472</link>
         <description><![CDATA[<div>var Operando1, Operando2, Resultado;<br>numerofalso = 0;<br>console.log("Inicializados todos los elementos elementos");<br>function Enviarelementos() {<br>	Operando1 = document.getElementById("Operando1").value;<br>	Operando2 = document.getElementById("Operando2").value;<br>}<br>function suma() {<br>	Resultado = Number(Operando1) + Number(Operando2);<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function resta() {<br>	Resultado = Number(Operando1) - Number(Operando2);<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function multiplicacion() {<br>	Resultado = Number(Operando1) * Number(Operando2);<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function division() {<br>	Resultado = Number(Operando1) / Number(Operando2);<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function potencia() {<br>	Resultado = Math.pow(Number(Operando1), Number(Operando2));<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function raizx() {<br>	Resultado = Math.sqrt(Number(Operando1))<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}<br>function raizy() {<br>	Resultado = Math.sqrt(Number(Operando2))<br>	document.getElementById("texto3").innerHTML = Resultado;<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-04-30 17:25:40 UTC</pubDate>
         <guid>https://padlet.com/ffernandoodi18/Bookmarks/wish/1479243472</guid>
      </item>
      <item>
         <title>Dinosaurio</title>
         <author></author>
         <link>https://padlet.com/ffernandoodi18/Bookmarks/wish/1480315486</link>
         <description><![CDATA[<div>document.addEventListener('keydown', function(evento){<br>&nbsp; &nbsp; if (evento.keyCode == 32){<br>&nbsp; &nbsp; &nbsp; &nbsp; if (nivel.muerto == false) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; saltar();<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; else if (nivel.muerto == true) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.muerto = false;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cactus.x = ancho + 100;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nube.x = ancho + 100;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.puntuacion = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>});<br>var a = { a: 1, max: 16}<br>var ancho = 700, alto = 300;<br>var canvas, ctx;<br>var imgRex, imgNube, imgCactus, imgSuelo, imgReiniciar;<br>var FPS = 60;<br>var suelo = 200;<br>var trex = { y: suelo, velocidadvertical: 0, gravedad: 2, salto: 28, velocidadverticalmaxima: 9, saltando: false}<br>var nivel = { velocidad: 9, puntuacion: 0, muerto: false }<br>var cactus = { x: ancho + 100, y: suelo}<br>var nube = { x: 400, y: 100 }<br>var piso = { x: 0, y: suelo }<br><br>function inicializar() {<br>&nbsp; &nbsp; imgRex = new Image();<br>&nbsp; &nbsp; imgNube = new Image();<br>&nbsp; &nbsp; imgCactus = new Image();<br>&nbsp; &nbsp; imgSuelo = new Image();<br>&nbsp; &nbsp; imgReiniciar = new Image();<br>&nbsp; &nbsp; imgRex.src = 'img/Dinosaurio_a.png'<br>&nbsp; &nbsp; imgNube.src = 'img/Nube.png'<br>&nbsp; &nbsp; imgCactus.src = 'img/Cactus.png'<br>&nbsp; &nbsp; imgSuelo.src = 'img/Suelo.png'<br>&nbsp; &nbsp; imgReiniciar.src = 'img/Reiniciar.png'<br>&nbsp; &nbsp; canvas = document.getElementById('canvas');<br>&nbsp; &nbsp; ctx = canvas.getContext('2d');<br>&nbsp; &nbsp; setInterval(function () {<br>&nbsp; &nbsp; &nbsp; &nbsp; principal();<br>&nbsp; &nbsp; &nbsp; &nbsp; puntuacion();<br>&nbsp; &nbsp; }, 1000 / FPS);<br>}<br>function borraCanvas(){<br>&nbsp; &nbsp; canvas.width = ancho;<br>&nbsp; &nbsp; canvas.height = alto;<br>}<br>//-----------------------------------------------------------------------------<br>function principal() {<br>&nbsp; &nbsp; if (nivel.muerto == false) {<br>&nbsp; &nbsp; &nbsp; &nbsp; actualizarimagen();<br>&nbsp; &nbsp; &nbsp; &nbsp; borraCanvas();<br>&nbsp; &nbsp; &nbsp; &nbsp; gravedad();<br>&nbsp; &nbsp; &nbsp; &nbsp; logcactus();<br>&nbsp; &nbsp; &nbsp; &nbsp; logPiso();<br>&nbsp; &nbsp; &nbsp; &nbsp; lognube();<br>&nbsp; &nbsp; &nbsp; &nbsp; dibujar();<br>&nbsp; &nbsp; &nbsp; &nbsp; colision();<br>&nbsp; &nbsp; &nbsp; &nbsp; var value1;<br>&nbsp; &nbsp; &nbsp; &nbsp; value1 = document.getElementById('Velocidad').value;<br>&nbsp; &nbsp; &nbsp; &nbsp; value1 = Number(value1);<br>&nbsp; &nbsp; &nbsp; &nbsp; if (value1 &gt; 0)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.velocidad = value1;<br>&nbsp; &nbsp; &nbsp; &nbsp; else if (value1 &lt; 0)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.velocidad = -value1;<br>&nbsp; &nbsp; &nbsp; &nbsp; else if (value1 == 0)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.velocidad = 10;<br>&nbsp; &nbsp; }<br>}<br>function actualizarimagen() {<br>&nbsp; &nbsp; a.a = a.a + 1;<br>&nbsp; &nbsp; if (a.a &gt; a.max) {<br>&nbsp; &nbsp; &nbsp; &nbsp; nivel.puntuacion += nivel.velocidad/10;<br>&nbsp; &nbsp; &nbsp; &nbsp; imgRex.src = 'img/Dinosaurio_b.png';<br>&nbsp; &nbsp; &nbsp; &nbsp; a.a = 1<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; else if (a.a &lt; a.max &amp;&amp; a.a &gt; (a.max / 2)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; imgRex.src = 'img/Dinosaurio_a.png';<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; &nbsp; imgRex.src = 'img/Dinosaurio_b.png';<br>&nbsp; &nbsp; }<br>}<br>function dibujar() {<br>&nbsp; &nbsp; ctx.drawImage(imgNube, 0, 0, 82, 31, nube.x, nube.y, 102, 41)<br>&nbsp; &nbsp; ctx.drawImage(imgCactus, 0, 0, 50, 50, cactus.x, cactus.y, 50, 50)<br>&nbsp; &nbsp; ctx.drawImage(imgRex, 0, 0, 32, 32, 100, trex.y + 3, 50, 50)<br>&nbsp; &nbsp; ctx.drawImage(imgSuelo, piso.x, 0, 700, 30, 0, piso.y + 32, 700, 30)<br>}<br>function lognube() {<br>&nbsp; &nbsp; if (nube.x &lt; -100) {<br>&nbsp; &nbsp; &nbsp; &nbsp; nube.x = ancho + 100;<br>&nbsp; &nbsp; &nbsp; &nbsp; nube.y = Math.round(Math.random() * (70) + 40);<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; &nbsp; nube.x -= (nivel.velocidad/5);<br>&nbsp; &nbsp; }<br>}<br>function logcactus() {<br>&nbsp; &nbsp; if (cactus.x &lt; -100) {<br>&nbsp; &nbsp; &nbsp; &nbsp; cactus.x = ancho + 100;<br>&nbsp; &nbsp; &nbsp; &nbsp; nivel.puntuacion += 10;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; &nbsp; cactus.x -= nivel.velocidad;<br>&nbsp; &nbsp; }<br>}<br>function logPiso() {<br>&nbsp; &nbsp; if (piso.x &gt; 700) {<br>&nbsp; &nbsp; &nbsp; &nbsp; piso.x = 0;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; &nbsp; piso.x += nivel.velocidad;<br>&nbsp; &nbsp; }<br>}<br>function saltar() {<br>&nbsp; &nbsp; if (trex.y == suelo) {<br>&nbsp; &nbsp; &nbsp; &nbsp; trex.saltando = true;<br>&nbsp; &nbsp; &nbsp; &nbsp; trex.velocidadvertical = trex.salto;<br>&nbsp; &nbsp; }<br>}<br>function gravedad() {<br>&nbsp; &nbsp; if (trex.saltando == true) {<br>&nbsp; &nbsp; &nbsp; &nbsp; if (trex.y - trex.velocidadvertical - trex.gravedad &gt; suelo) {&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trex.saltando = false;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trex.velocidadvertical = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trex.y = suelo;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trex.velocidadvertical -= trex.gravedad;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trex.y -= trex.velocidadvertical;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>}<br>function colision(){<br>&nbsp; &nbsp; if (cactus.x &gt;= 80 &amp;&amp; cactus.x &lt;= 136) {<br>&nbsp; &nbsp; &nbsp; &nbsp; if (trex.y &gt;= suelo - 30) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nivel.muerto = true;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>}<br>function puntuacion() {<br>&nbsp; &nbsp; ctx.font = "20px SAO UI";<br>&nbsp; &nbsp; ctx.fillStyle = '#6666666';<br>&nbsp; &nbsp; ctx.fillText("puntuacion: " + nivel.puntuacion, ancho-150, 50);<br>&nbsp; &nbsp; if (nivel.muerto == true) {<br>&nbsp; &nbsp; &nbsp; &nbsp; imgGame = new Image();<br>&nbsp; &nbsp; &nbsp; &nbsp; imgGame.src = 'img/GameOver.png'<br>&nbsp; &nbsp; &nbsp; &nbsp; borraCanvas();<br>&nbsp; &nbsp; &nbsp; &nbsp; ctx.drawImage(imgNube, 0, 0, 82, 31, nube.x, nube.y, 102, 41)<br>&nbsp; &nbsp; &nbsp; &nbsp; ctx.drawImage(imgCactus, 0, 0, 50, 50, cactus.x, cactus.y, 50, 50)<br>&nbsp; &nbsp; &nbsp; &nbsp; ctx.drawImage(imgRex, 0, 0, 32, 32, 100, trex.y + 3, 50, 50)<br>&nbsp; &nbsp; &nbsp; &nbsp; ctx.drawImage(imgSuelo, piso.x, 0, 700, 30, 0, piso.y + 32, 700, 30)<br>&nbsp; &nbsp; &nbsp; &nbsp; ctx.drawImage(imgGame, 0, 0, 400, 60, (ancho - 400) / 2, (alto - 60) / 2, 400, 60)<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br>&nbsp; &nbsp; }<br>}</div>]]></description>
         <enclosure url="" />
         <pubDate>2021-05-01 01:09:24 UTC</pubDate>
         <guid>https://padlet.com/ffernandoodi18/Bookmarks/wish/1480315486</guid>
      </item>
   </channel>
</rss>
