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() {
 
-
  return window.requestAnimationFrame ||
 
-
        window.webkitRequestAnimationFrame ||
 
-
        window.mozRequestAnimationFrame ||
 
-
        window.oRequestAnimationFrame ||
 
-
        window.msRequestAnimationFrame ||
 
-
        function(/* function FrameRequestCallback */ callback, /* DOMElement Element */ element) {
 
-
          window.setTimeout(callback, 1000/60);
 
-
        };
 
-
})();
 
-
var canvas = document.getElementById("main_canvas");
+
window.requestAnimFrame = (function(callback) {
-
var ctx = canvas.getContext('2d');
+
        return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
 +
        function(callback) {
 +
          window.setTimeout(callback, 1000 / 60);
 +
        };
 +
      })();
-
var w = 10;
+
w = 10;
-
function animate()
+
function animate() {
-
{
+
var canvas = document.getElementById("main_canvas");
-
  ctx.fillRect(25,25, w,100);
+
var context = canvas.getContext('2d');
-
  w = w+1;
+
-
}
+
-
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.
UFMG Brazil logo.png

Tell us more about your project. Give us background. Use this as the abstract of your project. Be descriptive but concise (1-2 paragraphs)

File:UFMG Brazil team.png
Your team picture
Team UFMG_Brazil


Home Team Official Team Profile Project Parts Submitted to the Registry Modeling Notebook Safety Attributions