Team:Acton-BoxboroughRHS/Simulations

From 2014hs.igem.org

(Difference between revisions)
Line 134: Line 134:
         var c=document.getElementById("myCanvas");
         var c=document.getElementById("myCanvas");
         var ctx=c.getContext("2d");
         var ctx=c.getContext("2d");
 +
     
 +
 +
        time=0;
 +
        function render(){
 +
 +
            // Draw some stuff
 +
            draw();
 +
            //Stuff below makes the current function run again and again
 +
            //setTimeout(render,1000/60);
 +
            window.webkitRequestAnimationFrame(render);
 +
            time+=1;
 +
        }
 +
        function draw(){
 +
       
 +
        timet=time%10;
         /*
         /*
Line 147: Line 162:
         ctx.font = "30px Arial";
         ctx.font = "30px Arial";
-
         ctx.strokeText("Plasmid",10,50);
+
         ctx.strokeText("Plasmid",10+timet,50+timet);
   
   
         ctx.font = "12px Arial";
         ctx.font = "12px Arial";
Line 188: Line 203:
         ctx.arc(250,250,100,1.75*Math.PI,0);
         ctx.arc(250,250,100,1.75*Math.PI,0);
         ctx.stroke();
         ctx.stroke();
-
 
+
        }
         </script>
         </script>

Revision as of 19:52, 3 June 2014

Welcome to the ABRHS iGEM team

ABRHS




Simulations

Note that this is test JavaScript:



Your browser does not support the HTML5 canvas tag.

Still Under Construction