Forked from Giovanny's Pen Pixel art Experiments.
Forked from Captain Anonymous's Pen Pixel art Experiments.
Forked from Giovanny's Pen Pixel art Experiments.
Forked from Captain Anonymous's Pen Pixel art Experiments.
Estado del Arte desarrollo de videojuegos en HTML5 | |
-- Capacidades en el browser | |
- canvas | |
- webgl | |
- dispositivos de entrada | |
- key events | |
- mouse events | |
- usermedia: http://www.html5rocks.com/es/tutorials/getusermedia/intro/ | |
- mic |
function main(word){ | |
word = word.replace(/\s/g,''); | |
return word == word.split('').reverse().join(''); | |
}; |
var memo = { | |
'0': 0, | |
'1': 1, | |
'2': 2, | |
'3': 6 | |
}; | |
function main(n){ | |
if(n<=2){ | |
return memo[n]; |
var replaces = { | |
'á':'a', | |
'é':'e', | |
'í':'i', | |
'ó':'o', | |
'ú':'u', | |
'Á':'A', | |
'É':'E', | |
'Í':'I', |
function main(operation){ | |
return (new Function('return ' + operation))(); | |
} |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Fundamentos de física</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<h1>Aplicando físicas a videojuegos</h1> | |
<canvas id="scene" width="600" height="400"></canvas> | |
<script type="text/javascript" src="main.js"></script> |
/** | |
* Creates a new Sync MapIterator over objects with an asyncrhonus mapFunction | |
* @param {[array]} objects [object array to iterate over] | |
* @param {[Function]} mapFunction [function to apply over each object sync mode] | |
* @param {Function} done [function to call when it's done] | |
*/ | |
var SyncMapIterator = function(objects, mapFunction, done){ | |
this.objects = objects; | |
this.i = 0; | |
this.retries = 0; |
/** | |
* Creates a new Sync MapIterator over objects with an asyncrhonus mapFunction | |
* @param {[array]} objects [object array to iterate over] | |
* @param {[Function]} mapFunction [function to apply over each object sync mode] | |
* @param {Function} done [function to call when it's done] | |
*/ | |
var SyncMapIterator = function(objects, mapFunction, done){ | |
this.objects = objects; | |
this.i = 0; | |
this.retries = 0; |
fun naranjas(n:int) = | |
let fun funcion_auxiliar(numero, acumulador) = | |
if numero = 0 then | |
acumulador | |
else | |
funcion_auxiliar(numero - 1, acumulador * numero) | |
in | |
funcion_auxiliar(n, 1) | |
end; |