1 <div id="container"></div>2 3 <br>4 <br>5 <label>Expand factor <input id="factor" value="4"></label>6 <br>7 <label>Randomness <input id="randomness" value="2"></label>8 <br>9 <label><input id="animate" type="checkbox" checked> Animate</label>10 11 <script type="text/javascript">12 var container = document.getElementById('container');13 var factor = document.getElementById('factor');14 var randomness = document.getElementById('randomness');15 var animate = document.getElementById('animate');16 17 setInterval(function(){18 if (animate.checked) {19 container.innerHTML = paint_bitmap(colorize(expand(h, factor.value), randomness.value));20 }21 }, 100);22 23 </script>
Enlace
El enlace para compartir es: