Team:UFMG Brazil
From 2013.igem.org
(Difference between revisions)
Line 8: | Line 8: | ||
</div> | </div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | window.requestAnimFrame = (function(callback) { | |
- | + | return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || | |
+ | function(callback) { | ||
+ | window.setTimeout(callback, 1000 / 60); | ||
+ | }; | ||
+ | })(); | ||
- | + | w = 10; | |
- | function animate() | + | function animate() { |
- | { | + | var canvas = document.getElementById("main_canvas"); |
- | + | var context = canvas.getContext('2d'); | |
- | + | ||
- | + | ||
- | requestAnimFrame(animate()); | + | // update |
+ | |||
+ | // clear | ||
+ | context.clearRect(0, 0, canvas.width, canvas.height); | ||
+ | |||
+ | // draw stuff | ||
+ | ctx.fillRect(25,25, w,100); | ||
+ | w = (w+1)%100; | ||
+ | |||
+ | // request new frame | ||
+ | requestAnimFrame(function() | ||
+ | { | ||
+ | animate(); | ||
+ | }); | ||
+ | } | ||
+ | animate(); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 22:30, 22 June 2013
These are our initial steps towards of a great project, in which we will build an device for detecting Heart diseases.
Wiki edition responsibility: Fernando Carvalho da Silva Coelho
You can write a background of your team here. Give us a background of your team, the members, etc. Or tell us more about something of your choosing. | |
Tell us more about your project. Give us background. Use this as the abstract of your project. Be descriptive but concise (1-2 paragraphs) | |
Team UFMG_Brazil |
Home | Team | Official Team Profile | Project | Parts Submitted to the Registry | Modeling | Notebook | Safety | Attributions |
---|