Difference between revisions of "Team:HebrewU"

 
(47 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
<!--- Own CSS --->
 
<!--- Own CSS --->
 
<link rel="stylesheet" href="https://2018.igem.org/Template:HebrewU/CSS?action=raw&ctype=text/css">
 
<link rel="stylesheet" href="https://2018.igem.org/Template:HebrewU/CSS?action=raw&ctype=text/css">
 
<!--- Jquery script - ****** remove when uploading to wiki ********** --->
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
 
  
 
<!--- Main Menu script --->
 
<!--- Main Menu script --->
Line 16: Line 13:
 
<!--- w3 Css --->
 
<!--- w3 Css --->
 
<link rel="stylesheet" href="https://2018.igem.org/Template:HebrewU/w3?action=raw&ctype=text/css">
 
<link rel="stylesheet" href="https://2018.igem.org/Template:HebrewU/w3?action=raw&ctype=text/css">
 +
  
 
<style>
 
<style>
Line 36: Line 34:
  
  
.ahuji {
 
    color:black
 
    }
 
  
 
@media (max-width: 1000px) {  
 
@media (max-width: 1000px) {  
Line 85: Line 80:
  
 
.ulogo { display:none; }
 
.ulogo { display:none; }
 +
 +
#myDIV button{
 +
display:none;
 +
}
 +
 
}
 
}
  
Line 95: Line 95:
  
  
 
.arrow_on_img {
 
    position: absolute;
 
width:10%;
 
    top: 90%;
 
    left: 50%;
 
    transform: translate(-50%, -50%);
 
animation-name: flash;
 
animation-duration: 1s;
 
animation-timing-function: linear;
 
animation-iteration-count: infinite;
 
 
/* Chrome 4+, Safari 4+, Opera 15+ */
 
-webkit-animation-name: flash;
 
-webkit-animation-duration: 1s;
 
-webkit-animation-timing-function: linear;
 
-webkit-animation-iteration-count: infinite;
 
 
/* Firefox 5+ */
 
-moz-animation-name: flash;
 
-moz-animation-duration: 1s;
 
-moz-animation-timing-function: linear;
 
-moz-animation-iteration-count: infinite
 
}
 
  
 
@keyframes flash {   
 
@keyframes flash {   
Line 148: Line 124:
 
padding-left:10%;
 
padding-left:10%;
 
text-align:center;
 
text-align:center;
 +
}
 +
 +
.start_button {
 +
display:block;
 +
 +
}
 +
 +
canvas {
 +
display:none;
 +
border: solid 1px black;
 +
position:relative;
 +
margin: 0 auto 0 auto;
 +
}
 +
 +
.index_body {
 +
    width: 80%;
 +
    color: black;
 +
    Padding-left: 10%;
 +
    Padding-right: 10%;
 +
    Padding-top: 3%;
 +
}
 +
 +
.ahuji {
 +
    color: white;
 +
}
 +
 +
.index_body {
 +
    color: white;
 +
 +
}
 +
 +
#HQ_page p {
 +
color:white;
 +
 +
}
 +
 +
#myDIV button{
 +
background-color:black;
 +
padding:0px;
 +
}
 +
 +
a:visited {
 +
    color: yellow;
 
}
 
}
  
Line 154: Line 173:
  
 
<body>
 
<body>
 +
<div class="w3-blue-gray">
  
 
<ul id="ddmenu_hebrewu">
 
<ul id="ddmenu_hebrewu">
Line 173: Line 193:
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Description">Description</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Description">Description</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Model">Model</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Model">Model</a></li>
             <li><a href="https://2018.igem.org/Team:HebrewU/Results">Results</a></li>
+
             <li><a href="https://2018.igem.org/Team:HebrewU/Demonstrate">Results</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Parts">Parts</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Parts">Parts</a></li>
             <li><a href="https://2018.igem.org/Team:HebrewU/Motivation">Moolti</a></li>
+
             <li><a href="https://2018.igem.org/Team:HebrewU/Software">MOOLTi</a></li>
  
 
         </ul>         
 
         </ul>         
Line 205: Line 225:
 
         <ul>
 
         <ul>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Team">Members</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Team">Members</a></li>
             <li><a href="https://2018.igem.org/Team:HebrewU/Attributionss">Attributions</a></li>
+
             <li><a href="https://2018.igem.org/Team:HebrewU/Attributions">Attributions</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Collaborations">Collaborations</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Collaborations">Collaborations</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Photo_Gallery">Photo Gallery</a></li>
 
             <li><a href="https://2018.igem.org/Team:HebrewU/Photo_Gallery">Photo Gallery</a></li>
Line 228: Line 248:
 
             <a href="https://2018.igem.org/Team:HebrewU/Description"><button class="b_huji_small_subnav">Description</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Description"><button class="b_huji_small_subnav">Description</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Model"><button class="b_huji_small_subnav">Model</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Model"><button class="b_huji_small_subnav">Model</button></a>
             <a href="https://2018.igem.org/Team:HebrewU/Results"><button class="b_huji_small_subnav">Results</button></a>
+
             <a href="https://2018.igem.org/Team:HebrewU/Demonstrate"><button class="b_huji_small_subnav">Results</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Parts"><button class="b_huji_small_subnav">Parts</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Parts"><button class="b_huji_small_subnav">Parts</button></a>
             <a href="https://2018.igem.org/Team:HebrewU/Software"><button class="b_huji_small_subnav">Moolti</button></a>
+
             <a href="https://2018.igem.org/Team:HebrewU/Software"><button class="b_huji_small_subnav">MOOLTi</button></a>
 
         </div>
 
         </div>
  
Line 257: Line 277:
 
           <button class="huji_small_navbar">Team</button>
 
           <button class="huji_small_navbar">Team</button>
 
         <div class="huji_small_navbar_panel">
 
         <div class="huji_small_navbar_panel">
             <a href="https://2018.igem.org/Team:HebrewU/Members"><button class="b_huji_small_subnav">Members</button></a>
+
             <a href="https://2018.igem.org/Team:HebrewU/Team"><button class="b_huji_small_subnav">Members</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Attributionsn"><button class="b_huji_small_subnav">Attributions</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Attributionsn"><button class="b_huji_small_subnav">Attributions</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Collaborations"><button class="b_huji_small_subnav">Collaborations</button></a>
 
             <a href="https://2018.igem.org/Team:HebrewU/Collaborations"><button class="b_huji_small_subnav">Collaborations</button></a>
Line 295: Line 315:
 
     </script>
 
     </script>
  
 +
<a onClick="topFunction()" id="myBtn_up" title="Go to top"><img src="https://static.igem.org/mediawiki/2018/1/1e/T--hebrewu--arrow_up.png" width="40px" /></a>
  
 +
 +
<script>
 +
// When the user scrolls down 20px from the top of the document, show the button
 +
window.onscroll = function() {scrollFunction()};
 +
 +
function scrollFunction() {
 +
    if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
 +
        document.getElementById("myBtn_up").style.display = "block";
 +
    } else {
 +
        document.getElementById("myBtn_up").style.display = "none";
 +
    }
 +
}
 +
 +
// When the user clicks on the button, scroll to the top of the document
 +
function topFunction() {
 +
    document.body.scrollTop = 0;
 +
    document.documentElement.scrollTop = 0;
 +
}
 +
</script>
  
  
  
 
<div class="huji_container">
 
<div class="huji_container">
   <img src="https://static.igem.org/mediawiki/2018/thumb/b/bb/T--Hebrewu--draft_pic.png/800px-T--Hebrewu--draft_pic.png" alt="Snow" style="width:100%;">
+
   <img src="https://static.igem.org/mediawiki/2018/a/a2/T--hebrewu--final_index_pic.png" alt="Snow" style="width:100%;">
   <div class="centered"><div class="arrow_on_img"><a href="#huji_hughlights">down down</a></div></div>
+
   <div class="centered"></div>
 
</div>
 
</div>
  
  
<!--- Up button --->
+
 
<div class="fixed">
+
<!------------ Awards modal start ------------->
<a href="#ddmenu_hebrewu"> ^ </a>
+
        <div id="huji_jamb" class="w3-modal" style="display:inline-block">
</div>
+
            <div class="w3-modal-content w3-animate-zoom">
 +
              <header class="w3-container w3-dark-gray">
 +
                <span onClick="document.getElementById('huji_jamb').style.display='none'"
 +
                class="w3-button w3-display-topright">&times;</span>
 +
                <h2 align="center" style="color:white"><b> ~ Giant Jamboree 2018 Results ~ </b></h2>
 +
              </header>
 +
            <div class="w3-container w3-blue-gray">
 +
            <div style="text-align:center">
 +
            <p style="color:white; font-size:24px;text-align:justify; padding-left:50px;"> <br />
 +
            Hello everyone, <br />
 +
We are glad to share with you our results from the iGEM conference:<br /><br /> </p>
 +
            <p style="color:white; font-size:24px;text-align:justify;padding-left:100px;">
 +
<b> Best Plant Synthetic Biology </b> <br />
 +
Second place in the Environmental Research category<br />
 +
Nominated for the Best Software Tool<br />
 +
Gold Medal for our overall project achievements<br /><br />
 +
</p>
 +
                <div style="text-align:center">
 +
                <img src="https://static.igem.org/mediawiki/2018/b/b0/T--HebrewU--Bestplant.jpeg" width="75%"> <br />
 +
                <img src="https://static.igem.org/mediawiki/2018/c/cb/T--HebrewU--Jamboree2018_1.jpeg" width="75%"><br />
 +
</div> <br />
 +
 +
 
 +
<p style="color:white; font-size:24px;text-align:justify; padding-left:50px;"> <br />
 +
We would like to thank again for all of our <a href="https://2018.igem.org/Team:HebrewU/Attributions">supporters</a>, who helped us make it all possible. Toda Raba!  <br /> <br />
 +
            </p>
 +
<h2 style="color:white"> HebrewU i-GEM Team 2018  </h2> <br />
 +
 
 +
<p style="color:white; font-size:30px;text-align:center;"> <br />
 +
                </p>
 +
                </div>
 +
 
 +
            <footer class="w3-container">
 +
                <p> </p>
 +
              </footer>
 +
    </div>
 +
 
 +
        </div>
 +
        </div>
 +
<!------------ Awards modal end ------------->
  
 
<!--- Page content start --->
 
<!--- Page content start --->
<div class="columnhuji middle">
+
 
<!--- Abstract --->
+
<div class="index_body">
<h2 id="huji_hughlights" class="ahuji">The Catalysis of Dioxin Degradation </h2>
+
 
<p class="abstract_huji">
+
Dioxins, a family of chemical compounds, pose a serious threat to humans, animals, and the environment. Classified as persistent environmental pollutants, these compounds move up the food chain via bioaccumulation; consequently, they are found in very harmful concentrations by the time the reach humans. Our team has set out to engineer a metabolic pathway for the complete degradation of dioxins, and detoxification of chlorinated compounds. <br /> <br />The pathway would involve the uptake of these pollutants and their subsequent breakdown into molecules that would enter organisms’ native metabolism. We are testing the pathway in S. cerevisiae, and have prepared expression vectors and means to engineer a multitude of plants. By deploying such pathways directly into endemic plants, our solution can be tailored to specific regions. Furthermore, because we can efficiently control plant reproduction, we can responsibly implement synthetic biology to solve this issue in a non-invasive and ecological manner.</p>
+
  
  
Line 324: Line 401:
  
 
<div class="w3-third">
 
<div class="w3-third">
   <button class="ripple"><img src="https://static.igem.org/mediawiki/2018/3/3c/T--Hebrewu--highlight_OS.png" width="150px" height="150px"></button>  
+
   <a href="https://2018.igem.org/Team:HebrewU/Open_Source"><button class="ripple"><img src="https://static.igem.org/mediawiki/2018/3/3c/T--Hebrewu--highlight_OS.png" width="150px" height="150px"></button> </a>
   <p style="text-align:justify"> We made an open source platform, where local researchers can take our synthetic pathway and conduct a research themselves, inserting it to local plants and other flora as well as improving it for us all.</p>
+
   <p style="text-align:justify"> We designed an open source platform where researchers anywhere can view our synthetic pathway and
 +
conduct their own research, inserting it into native plants and building upon our database.</p>
 
</div>
 
</div>
  
  
 
<div class="w3-third">
 
<div class="w3-third">
  <button class="ripple"><img src="https://static.igem.org/mediawiki/2018/c/c0/T--Hebrewu--highlight_Moolti.png" width="150px" height="150px"></button>  
+
  <a href="https://2018.igem.org/Team:HebrewU/Software"><button class="ripple"><img src="https://static.igem.org/mediawiki/2018/c/c0/T--Hebrewu--highlight_Moolti.png" width="150px" height="150px"></button></a>  
   <p style="text-align:justify;padding-left:10%;width:80%;">Our <b>M</b>ultiple <b>O</b>rganism <b>O</b>ptimization <b>L</b>ab <b>T</b>ool for <b>i</b>GEM Allows biologists to optimize codon usage for multiple organisms simultaneously.
+
   <p style="text-align:justify;padding-left:10%;width:80%;">Our <b>M</b>ultiple <b>O</b>rganism <b>O</b>ptimization <b>L</b>ab <b>T</b>ool for <b>i</b>GEM allows biologists to optimize codon usage for
 +
multiple organisms simultaneously.
 
</p>
 
</p>
 
    
 
    
Line 339: Line 418:
  
 
<div class="w3-third">
 
<div class="w3-third">
    <button class="ripple"><img src="https://static.igem.org/mediawiki/2018/5/57/T--Hebrewu--highlight_gibson.png" width="150px" height="150px"></button>  
+
  <a href="https://2018.igem.org/Team:HebrewU/Model"> <button class="ripple"><img src="https://static.igem.org/mediawiki/2018/f/f3/T--hebrewu--model_icon_new.png" width="150px" height="150px"></button> </a>
   <p style="text-align:justify">We created 40 bp oligos that can be used as primers for all BioBrick parts. When amplified, these “GBs” can be used for Gibson Assembly which can save time and resources.</p>
+
   <p style="text-align:justify">We have created a model enzymatic pathway for dioxin and chlorinated-compound degradation, which
 +
serves as the foundation of our research and project design. </p>
 
</div>
 
</div>
  
 
</div>
 
</div>
 
</div>
 
</div>
 
 
<div>
 
<div>
 +
 +
 +
<!--- Abstract --->
 +
<div class="w3-center">
 +
            <img src="https://static.igem.org/mediawiki/2018/a/ac/T--Hebrewu--plant_index.png" width="80%">
 +
          <br />
 +
        <br />
 +
</div>
 +
 +
 
<!-- Second Grid -->
 
<!-- Second Grid -->
<div class="w3-row-padding w3-light-grey w3-padding-64 w3-container">
+
  <canvas style="text-align:center" id="canvas" width="800" height="600" tabindex='2'></canvas>
   <div class="w3-content">
+
   <div >
<img src="BreakingTCDD.png" width="100%">
+
  <div class='box_container' id="TC" style="float:right;">
  </div>
+
 
</div>
 
</div>
 
</div>
 
</div>
  
 +
<div id="myDIV" style="text-align:center;">
 +
<button class="flashing" onClick="init()"><img src="https://static.igem.org/mediawiki/2018/1/18/T--Hebrewu--TCDD-invasion.png" width="800" heiht="600">
 +
</button>
 +
</div>
 +
</div>
 +
<br />
 +
<br />
 +
</div>
 +
 +
 +
 +
<!---game script--->
 +
<script type="text/javascript">
 +
  $(function() {
 +
    var images = ['https://static.igem.org/mediawiki/2018/1/12/T--hebrewu--Game1.png', 'https://static.igem.org/mediawiki/2018/7/74/T--Hebrewu--game_background_2.png','https://static.igem.org/mediawiki/2018/1/1e/T--hebrewu--Game2.png'];
 +
    $('#canvas').css({'background-image': 'url(' + images[Math.floor(Math.random() * images.length)] + ')'});
 +
  });
 +
</script>
  
<!------------ Smooth scrool script ------------->
 
 
<script>
 
<script>
// Select all links with hashes
+
function myFunction() {
$('a[href*="#"]')
+
    var x = document.getElementById("myDIV");
  // Remove links that don't actually link to anything
+
     if (x.style.display === "none") {
  .not('[href="#"]')
+
         x.style.display = "block";
  .not('[href="#0"]')
+
    } else {
  .click(function(event) {
+
        x.style.display = "none";
    // On-page links
+
     if (
+
      location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
+
      &&
+
      location.hostname == this.hostname
+
    ) {
+
      // Figure out element to scroll to
+
      var target = $(this.hash);
+
      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
+
      // Does a scroll target exist?
+
      if (target.length) {
+
        // Only prevent default if animation is actually gonna happen
+
         event.preventDefault();
+
        $('html, body').animate({
+
          scrollTop: target.offset().top
+
        }, 1000, function() {
+
          // Callback after animation
+
          // Must change focus!
+
          var $target = $(target);
+
          $target.focus();
+
          if ($target.is(":focus")) { // Checking if the target was focused
+
            return false;
+
          } else {
+
            $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
+
            $target.focus(); // Set focus again
+
          };
+
        });
+
      }
+
 
     }
 
     }
  });
+
}
 +
</script>
  
 +
 +
<script>
 +
function init() {
 +
 +
 +
    var x = document.getElementById("myDIV");
 +
 +
    if (x.style.display === "none") {
 +
        x.style.display = "block";
 +
    } else {
 +
        x.style.display = "none";
 +
    }
 +
 +
 +
 +
// defining the canvas
 +
var canvas = document.getElementById("canvas");
 +
canvas.style.display = "block";
 +
canvas.width = 800;
 +
canvas.height = 600;
 +
 +
// defining some variables
 +
var c = canvas.getContext("2d");
 +
var WIDTH = canvas.width;
 +
var HEIGHT = canvas.height;
 +
var keys = [];
 +
var theCoins = [];
 +
var timeRemaining = 30;
 +
var theBadGuys = [];
 +
var spawnX, spawnY;
 +
var gameOver = false;
 +
var endMessage = "";
 +
var mouseX, mouseY;
 +
var deltaX = 0;
 +
var deltaY = 0;
 +
var rotation = 0;
 +
var xtarget = 0;
 +
var ytarget = 0;
 +
var theBullets = [];
 +
var deltaX, deltaY, newAngle = 0;
 +
var endStatsDisplay = "score";
 +
 +
var coinCollectSwitcher = 1;
 +
 +
 +
function loadImages() {
 +
playerImage = new Image();
 +
playerImage.src = 'https://static.igem.org/mediawiki/2018/b/b2/T--Hebrewu--game_player.png';
 +
 +
badGuyImage = new Image();
 +
badGuyImage.src = 'https://static.igem.org/mediawiki/2018/5/53/T--Hebrewu--game_badguy.png';
 +
 +
 +
 +
balls = new Image();
 +
balls.src = 'https://static.igem.org/mediawiki/2018/9/98/T--Hebrewu--balls.png';
 +
 +
}
 +
loadImages();
 +
 +
 +
 +
// construct a player
 +
function Player () {
 +
this.x = 285;
 +
this.y = 290;
 +
this.w = 200;
 +
this.h = 45;
 +
this.health = 200;
 +
this.points = 0;
 +
this.image = playerImage;
 +
}
 +
var Player1 = new Player();
 +
 +
// set the game loop interval
 +
createNewCoins();
 +
setInterval(mainDraw, 20);
 +
 +
 +
function playerDraw() {
 +
 +
c.beginPath();
 +
 +
c.strokeStyle="blue";
 +
//c.rect(Player1.x, Player1.y, Player1.w, Player1.h);
 +
c.lineWidth=1;
 +
c.stroke();
 +
 +
c.save();
 +
deltaX = mouseX - Player1.x;
 +
deltaY = mouseY - Player1.y;
 +
newAngle = Math.atan(deltaY / deltaX);
 +
 +
c.translate(Player1.x + (Player1.w / 2), Player1.y + (Player1.h / 2) );
 +
if (deltaX < 0) {
 +
c.rotate(newAngle);
 +
c.scale(-1, 1);
 +
} else {
 +
c.rotate(newAngle);
 +
}
 +
 +
c.drawImage(Player1.image, -(Player1.w / 2) - 7, -(Player1.h / 2) - 5, Player1.w * 1.3, Player1.h * 1.3);
 +
 +
c.restore();
 +
}
 +
 +
function createNewCoins() {
 +
theCoins.push({x: Math.floor(Math.random() * 800),y: Math.floor(Math.random() * 600),w: 20,h: 20, points: 10, color: 'yellow', sourceX: 0, sourceY: 130, sourceW: 130, sourceH: 130});
 +
 +
theCoins.push({x: Math.floor(Math.random() * 800),y: Math.floor(Math.random() * 600),w: 45,h: 45, points: 5, color: 'grey', sourceX: 130, sourceY: 130, sourceW: 130, sourceH: 130});
 +
 +
theCoins.push({x: Math.floor(Math.random() * 800),y: Math.floor(Math.random() * 600),w: 60,h: 60, points: 2, color: 'brown', sourceX: 0, sourceY: 0, sourceW: 130, sourceH: 130});
 +
 +
}
 +
 +
function drawCoins() {
 +
theCoins.forEach( function(i, j) {
 +
c.beginPath();
 +
c.strokeStyle=i.color;
 +
// c.rect(i.x, i.y, i.w, i.h);
 +
c.drawImage(balls, i.sourceX, i.sourceY, i.sourceW, i.sourceH, i.x, i.y, i.w, i.h);
 +
c.lineWidth=1;
 +
c.stroke();
 +
});
 +
}
 +
 +
function drawHUD() {
 +
c.font = '18pt Calibri';
 +
c.fillStyle = 'white';
 +
c.fillText("Health:", 10, 25);
 +
 +
c.beginPath();
 +
if (Player1.health < 50) {
 +
c.strokeStyle= 'red';
 +
} else {
 +
c.strokeStyle= 'yellow';
 +
}
 +
 +
c.moveTo(85,18);
 +
c.lineTo(85 + Player1.health, 18);
 +
c.lineWidth=15;
 +
c.stroke();
 +
 +
c.fillStyle = 'white';
 +
c.fillText("Points:", 370, 25);
 +
c.fillText("Time remaining:", 585, 25);
 +
 +
if (timeRemaining < 10) {
 +
c.fillStyle = "red"
 +
}
 +
c.fillText(Math.ceil(timeRemaining), 750, 25);
 +
 +
c.fillStyle = 'yellow';
 +
c.fillText(Player1.points, 445, 25);
 +
}
 +
 +
 +
function collides(a, b) {
 +
    return  !(a.x >= b.x + b.w ||
 +
              a.x + a.w <= b.x ||
 +
              a.y >= b.y + b.h ||
 +
              a.y + a.h <= b.y);
 +
}
 +
 +
 +
function collidesStep(a, b) {
 +
return !(a.x + a.xStep >= b.x + b.w ||
 +
a.x + a.xStep + a.w <= b.x ||
 +
a.y + a.yStep >= b.y + b.h ||
 +
a.y + a.yStep + a.h >= b.y);
 +
}
 +
 +
function checkCollision() {
 +
theCoins.forEach( function(i, j){
 +
if ( collides(i, Player1) ) {
 +
Player1.points += i.points;
 +
theCoins.splice(0);
 +
createNewCoins();
 +
 +
if (coinCollectSwitcher === 1) {
 +
coinCollect1.play();
 +
}
 +
 +
if (coinCollectSwitcher === 2) {
 +
coinCollect2.play();
 +
}
 +
 +
if (coinCollectSwitcher === 3) {
 +
coinCollect3.play();
 +
}
 +
if (coinCollectSwitcher === 4) {
 +
coinCollect4.play();
 +
}
 +
if (coinCollectSwitcher === 5) {
 +
coinCollect5.play();
 +
}
 +
if (coinCollectSwitcher === 6) {
 +
coinCollect6.play();
 +
}
 +
 +
coinCollectSwitcher++;
 +
 +
if (coinCollectSwitcher === 7) {
 +
coinCollectSwitcher = 1;
 +
}
 +
 +
 +
}
 +
});
 +
}
 +
 +
 +
 +
 +
function endStats() {
 +
 +
if (keys[67]) {
 +
endStatsDisplay = "credits";
 +
}
 +
 +
if (keys[83]) {
 +
endStatsDisplay = "score";
 +
}
 +
 +
if (endStatsDisplay === "credits") {
 +
c.font = '20pt Calibri';
 +
c.fillStyle = 'cyan';
 +
c.fillText("The code for the game was based on tutorial from frozenlizardproductions.com", 0, 30);
 +
c.fillStyle = 'white';
 +
c.fillText("Graphics by HebrewU (Aliza Fedorenko)",200 , 100);
 +
c.font = '30pt Calibri';
 +
c.fillStyle = 'white';
 +
c.fillText("Press enter to play again!", 190, 455);
 +
c.fillText("Press S for score", 250, 520);
 +
 +
}
 +
 +
if (endStatsDisplay === "score") {
 +
c.font = '60pt Calibri';
 +
c.fillStyle = 'white';
 +
c.fillText(endMessage, 70, 100);
 +
 +
c.font = '80pt Calibri';
 +
c.fillText("Your Score:", 70, 220);
 +
c.fillStyle = 'yellow';
 +
c.fillText(Player1.points, 580, 220);
 +
 +
c.font = '30pt Calibri';
 +
c.fillStyle = 'white';
 +
c.fillText("Press enter to play again!", 190, 455);
 +
c.fillText("Press C for credits", 250, 520);
 +
 +
c.fillStyle = 'cyan';
 +
}
 +
 +
if ( keys[13] ) {
 +
Player1.points = 0;
 +
theCoins.splice(0);
 +
createNewCoins();
 +
timeRemaining = 30;
 +
theBadGuys.splice(0);
 +
Player1.x = 395;
 +
Player1.y = 295;
 +
gameOver = false;
 +
Player1.health = 200;
 +
theBullets.splice(0);
 +
}
 +
}
 +
 +
 +
 +
function pushBadGuy() {
 +
if (Math.random() < 0.5) {
 +
spawnX = Math.random() < 0.5 ? -20 : 820;
 +
spawnY = Math.random() * 600;
 +
} else {
 +
spawnX = Math.random() * 800;
 +
spawnY = Math.random() < 0.5 ? -20 : 620;
 +
}
 +
theBadGuys.push( {
 +
x: spawnX, y: spawnY, w: 30, h: 30, speed: Math.ceil(Math.random()* 2), hit: false, image: badGuyImage
 +
});
 +
}
 +
 +
 +
function badGuyCollidesY (i, j, step) {
 +
for (k = theBadGuys.length - 1; k >= 0; k--){
 +
if (j != k) {
 +
if (
 +
i.x < theBadGuys[k].x + theBadGuys[k].w) {
 +
 +
if (
 +
i.x + i.w > theBadGuys[k].x) {
 +
 +
if (
 +
i.y + step < theBadGuys[k].y + theBadGuys[k].h) {
 +
if (i.y + step + i.h > theBadGuys[k].y) {
 +
return true;
 +
}
 +
}
 +
}
 +
}
 +
}
 +
}
 +
 +
if (i.x + step < Player1.x + Player1.w) {
 +
if (i.x + step + i.w > Player1.x) {
 +
 +
if (i.y < Player1.y + Player1.h) {
 +
if (i.y + i.h > Player1.y) {
 +
!i.hit
 +
Player1.health -= 40;
 +
if (Player1.health <= 0){
 +
gameOver = true;
 +
endMessage = "Oh no! Game Over";
 +
}
 +
i.hit = true;
 +
return true;
 +
}
 +
 +
}
 +
}}
 +
return false;
 +
}
 +
 +
function badGuyCollidesX (i, j, step) {
 +
for (k = theBadGuys.length - 1; k >= 0; k--){
 +
if (j != k) {
 +
if (
 +
i.x + step < theBadGuys[k].x + theBadGuys[k].w) {
 +
 +
if (
 +
i.x + step + i.w > theBadGuys[k].x) {
 +
 +
if (
 +
i.y < theBadGuys[k].y + theBadGuys[k].h) {
 +
if (i.y + i.h > theBadGuys[k].y) {
 +
return true;
 +
}
 +
}
 +
}
 +
}
 +
}
 +
}
 +
 +
if (i.x + step < Player1.x + Player1.w) {
 +
if (i.x + step + i.w > Player1.x) {
 +
if (i.y < Player1.y + Player1.h) {
 +
if (i.y + i.h > Player1.y) {
 +
if (!i.hit) {
 +
Player1.health -= 40;
 +
if (Player1.health <= 0){
 +
gameOver = true;
 +
endMessage = "Oh no! Game Over";
 +
}
 +
}
 +
i.hit = true;
 +
return true;
 +
}
 +
 +
}
 +
}}
 +
return false;
 +
}
 +
 +
 +
 +
function badGuysMove() {
 +
theBadGuys.forEach( function(i, j) {
 +
if (i.x > Player1.x) {
 +
if (!badGuyCollidesX(i, j, -i.speed)) {i.x -= i.speed;}
 +
}  
 +
if (i.x < Player1.x) {
 +
if (!badGuyCollidesX(i, j, -i.speed)) {i.x += i.speed;}
 +
}
 +
if (i.y > Player1.y) {
 +
if (!badGuyCollidesY(i, j, -i.speed)) {i.y -= i.speed;}
 +
}
 +
if (i.y < Player1.y) {
 +
if (!badGuyCollidesY(i, j, -i.speed)) {i.y += i.speed;}
 +
}
 +
 +
if (i.hit === true){ theBadGuys.splice(j, 1); }
 +
});
 +
}
 +
 +
//out the if on
 +
 +
function badGuysDraw() {
 +
theBadGuys.forEach( function(i, j) {
 +
c.beginPath();
 +
c.strokeStyle="red";
 +
// c.rect(i.x, i.y, i.w, i.h);
 +
c.drawImage(i.image, i.x - 12 , i.y - 12, 50, 50);
 +
c.lineWidth=1;
 +
c.stroke();
 +
});
 +
}
 +
 +
function createBullet(targetX, targetY, shooterX, shooterY) {
 +
if (!gameOver) {
 +
console.log (gameOver);
 +
deltaX = targetX - shooterX;
 +
deltaY = targetY - shooterY;
 +
rotation = Math.atan2(deltaY, deltaX);
 +
xtarget = Math.cos(rotation);
 +
ytarget = Math.sin(rotation);
 +
 +
theBullets.push({
 +
active:true,
 +
x: shooterX, //updates
 +
y: shooterY,
 +
speed: 10,
 +
xtarget: xtarget,
 +
ytarget: ytarget,
 +
w: 5,
 +
h: 5,
 +
color: 'red',
 +
angle: rotation
 +
});
 +
 +
if (shotSwitcher === 1) {
 +
laser1.currentTime = 0.1;
 +
laser1.play();
 +
}
 +
 +
if (shotSwitcher === 2) {
 +
laser2.currentTime = 0.1;
 +
laser2.play();
 +
}
 +
 +
if (shotSwitcher === 3) {
 +
laser3.currentTime = 0.1;
 +
laser3.play();
 +
}
 +
if (shotSwitcher === 4) {
 +
laser4.currentTime = 0.1;
 +
laser4.play();
 +
}
 +
if (shotSwitcher === 5) {
 +
laser5.currentTime = 0.1;
 +
laser5.play();
 +
}
 +
if (shotSwitcher === 6) {
 +
laser6.currentTime = 0.1;
 +
laser6.play();
 +
}
 +
 +
shotSwitcher++;
 +
 +
if (shotSwitcher === 7) {
 +
shotSwitcher = 1;
 +
}
 +
 +
}
 +
}
 +
 +
function bulletsMove() {
 +
theBullets.forEach( function(i, j) {
 +
i.x += i.xtarget * i.speed;
 +
i.y += i.ytarget * i.speed;
 +
});
 +
}
 +
 +
function bulletsDraw() {
 +
theBullets.forEach( function(i, j) {
 +
c.beginPath();
 +
c.save();
 +
c.fillStyle = i.color;
 +
c.rect(i.x, i.y, i.w, i.h);
 +
c.fill();
 +
});
 +
}
 +
 +
function checkBulletHits() {
 +
if (theBullets.length > 0) {
 +
if(theBadGuys.length > 0) {
 +
for (j = theBullets.length - 1; j >= 0; j--) {
 +
for (k = theBadGuys.length - 1; k >= 0; k--) {
 +
if (collides(theBadGuys[k], theBullets[j])) {
 +
console.log("collides");
 +
theBadGuys.splice(k, 1);
 +
theBullets.splice(j, 1);
 +
Player1.points += 1;
 +
 +
if (boomSwitcher === 1) {
 +
boom1.play();
 +
}
 +
 +
if (boomSwitcher === 2) {
 +
boom2.play();
 +
}
 +
 +
if (boomSwitcher === 3) {
 +
boom3.play();
 +
}
 +
if (boomSwitcher === 4) {
 +
boom4.play();
 +
}
 +
if (boomSwitcher === 5) {
 +
boom5.play();
 +
}
 +
if (boomSwitcher === 6) {
 +
boom6.play();
 +
}
 +
 +
boomSwitcher++;
 +
 +
if (boomSwitcher === 7) {
 +
boomSwitcher = 1;
 +
}
 +
 +
}
 +
}
 +
}
 +
}
 +
}
 +
}
 +
 +
 +
 +
function mainDraw() {
 +
c.clearRect(0, 0, WIDTH, HEIGHT);
 +
if (!gameOver) {
 +
playerMove();
 +
playerDraw();
 +
bulletsMove();
 +
bulletsDraw();
 +
checkBulletHits();
 +
drawCoins();
 +
drawHUD();
 +
checkCollision();
 +
 +
badGuysMove();
 +
badGuysDraw();
 +
if (Math.random() * 100 < 1 ) {
 +
pushBadGuy();
 +
}
 +
 +
timeRemaining -= 0.02;
 +
if (timeRemaining < 0) {
 +
gameOver = true;
 +
endMessage = " You Survived!";
 +
}
 +
} // if !gameOver
 +
if (gameOver) {
 +
endStats();
 +
}
 +
 +
} //mainDraw
 +
 +
 +
 +
 +
function playerMove(e){
 +
 +
if (keys[87]) {
 +
if (Player1.y > 2) {
 +
Player1.y -= 3;
 +
}
 +
}
 +
if (keys[83] ) {
 +
if (Player1.y < HEIGHT - Player1.h - 2) {
 +
Player1.y += 3;
 +
}
 +
}
 +
if (keys[65] ) {
 +
if (Player1.x > 2) {
 +
Player1.x -= 3;
 +
}
 +
}
 +
if (keys[68] ) {
 +
if (Player1.x < WIDTH - Player1.w - 2) {
 +
Player1.x += 3;
 +
}
 +
}
 +
return false;
 +
}
 +
 +
canvas.addEventListener("keydown", function (e) {
 +
keys[e.keyCode] = true;
 +
});
 +
canvas.addEventListener("keyup", function (e) {
 +
keys[e.keyCode] = false;
 +
});
 +
 +
canvas.addEventListener("click", function() {
 +
if (!gameOver){
 +
createBullet(mouseX, mouseY, Player1.x + (Player1.w / 2), Player1.y + (Player1.h / 2));
 +
}
 +
});
 +
 +
function mouseMove(e) {
 +
    if(e.offsetX) {
 +
        mouseX = e.offsetX;
 +
        mouseY = e.offsetY;
 +
    }
 +
    else if (e.layerX) {
 +
        mouseX = e.layerX;
 +
        mouseY = e.layerY;
 +
    }
 +
}
 +
 +
canvas.addEventListener('mousemove', mouseMove, true);
 +
 +
} // init
 +
 
</script>
 
</script>
 +
 +
 +
 +
<!-- end game script -->
 +
 +
<!--game style-->
 +
<style>
 +
.flashing{
 +
border:none;
 +
display:inline-block;
 +
animation-name: flash;
 +
animation-duration: 1s;
 +
animation-timing-function: linear;
 +
animation-iteration-count: infinite;
 +
text-align:center;
 +
 +
/* Chrome 4+, Safari 4+, Opera 15+ */
 +
-webkit-animation-name: flash;
 +
-webkit-animation-duration: 1s;
 +
-webkit-animation-timing-function: linear;
 +
-webkit-animation-iteration-count: infinite;
 +
 +
/* Firefox 5+ */
 +
-moz-animation-name: flash;
 +
-moz-animation-duration: 1s;
 +
-moz-animation-timing-function: linear;
 +
-moz-animation-iteration-count: infinite
 +
}
 +
 +
@keyframes flash { 
 +
0% { opacity: 1.0 }
 +
50% { opacity: 0.5 }
 +
100% { opacity: 1.0 }
 +
}
 +
 +
/* Chrome 4+, Safari 4+, Opera 15+ */
 +
@-webkit-keyframes flash { 
 +
0% { opacity: 1.0 }
 +
50% { opacity: 0.5 }
 +
100% { opacity: 1.0 }
 +
}
 +
 +
/* Firefox 5+ */
 +
@-moz-keyframes flash { 
 +
0% { opacity: 1.0 }
 +
50% { opacity: 0.5 }
 +
100% { opacity: 1.0 }
 +
}
 +
 +
 +
</style>
 +
 +
<script>
 +
var Mac = document.getElementById('huji_jamb');
 +
 +
// When the user clicks anywhere outside of the modal, close it
 +
window.onclick = function(event) {
 +
  //alert(event.target)
 +
    if (event.target == Mac) {
 +
        Mac.style.display = "none";
 +
    }
 +
 +
}
 +
</script>
 +
 +
<!--game style end-->
  
  

Latest revision as of 17:54, 12 December 2018

HebrewU HujiGEM 2018

Snow
×

~ Giant Jamboree 2018 Results ~


Hello everyone,
We are glad to share with you our results from the iGEM conference:

Best Plant Synthetic Biology
Second place in the Environmental Research category
Nominated for the Best Software Tool
Gold Medal for our overall project achievements





We would like to thank again for all of our supporters, who helped us make it all possible. Toda Raba!

HebrewU i-GEM Team 2018



Highlights:


We designed an open source platform where researchers anywhere can view our synthetic pathway and conduct their own research, inserting it into native plants and building upon our database.

Our Multiple Organism Optimization Lab Tool for iGEM allows biologists to optimize codon usage for multiple organisms simultaneously.



We have created a model enzymatic pathway for dioxin and chlorinated-compound degradation, which serves as the foundation of our research and project design.