»
AnglaisFrançaisVietnamien

Imprimer - Boids 2D en JavaScript - JavaScriptBank.com

Version complète: jsB@nk » Utilitaire » Boids 2D en JavaScript
URL: http://www.javascriptbank.com/2d-boids-javascript.html

Boids 2D en JavaScript © JavaScriptBank.comCet effet JavaScript Boids est une simulation de flocage comportement/de scolarisation ( e. g. oiseaux , poissons). A très utile. code JavaScript pour vous exercer.

Version complète: jsB@nk » Utilitaire » Boids 2D en JavaScript
URL: http://www.javascriptbank.com/2d-boids-javascript.html



JavaScript
<script src="boids.js" type="text/javascript"></script><!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->


HTML
<p><a href="http://www.red3d.com/cwr/boids/">Boids</a> in JS (2 dimensional).  Boids are a simulation of flocking behavior.</p>Attraction: (m1) <input size="3" id="m1" type="text" onchange="m1 = this.value;">Repulsion: (m2) <input size="3" id="m2" type="text" onchange="m2 = this.value;"><br/>Alignment: (m3) <input size="3" id="m3" type="text" onchange="m3 = this.value;">Stay on screen: (m4) <input size="3" id="m4" type="text" onchange="m4 = this.value;"><br/>Chase: (m5) <input size="3" id="m5" type="text" onchange="m5 = this.value;">Fear: (m6) <input size="3" id="m6" type="text" onchange="m6 = this.value;"><br/><input type="checkbox" onchange="predator(this.checked);" checked="checked"> Predator<br/><input type="button" onclick="go()" value="go"><input type="button" onclick="init();" value="reset"><br/>    </div>    <canvas id="theCanvas" width="1024" height="768" style="border: 1px solid black">Get a better browser (SeaMonkey, Firefox, Opera, Safari)</canvas>


Files
/javascript/utility/2D_Boids_in_JavaScript/boids.js/javascript/utility/2D_Boids_in_JavaScript/excanvas.js