This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const searchFast = () => { | |
if((document.getElementById('searchField').value) === ''){ | |
let newQuery = ''; | |
}else{ | |
let query = document.getElementById('searchField').value; | |
let newQuery = query.split(' '); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function circleCollison(p1x, p1y, r1, p2x, p2y, r2){ | |
let radiusSum; | |
let xDiff; | |
let yDiff; | |
radiusSum = r1 + r2; | |
xDiff = p1x - p2x; | |
yDiff = p1y - p2y; | |
if(radiusSum > Math.sqrt((xDiff * xDiff) + (yDiff * yDiff)) ){ | |
console.log('Player Coord: ' + p1x + ':' + p1y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cartbtn = $('.shop-btn'); | |
var popup = $('.popout'); | |
cartbtn.on('mouseenter', function(){ | |
body.classList.add('cartShow'); | |
}); | |
popup.on('mouseleave', function(){ | |
body.classList.remove('cartShow'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let bacon = document.querySelectorAll("[data-value='bacon-1']"); | |
let baconomit = bacon[0].previousSibling; | |
let bacondeny = baconomit.previousSibling; | |
let baconImage = document.getElementById("bacon"); | |
bacondeny.classList.add('selected'); | |
if(bacondeny.classList.contains('selected')){ | |
deleteBacon(); | |
} //Make bacon not default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {BrowserRouter as Router, Route} from 'react-router-dom'; | |
import './App.css'; | |
import Header from './components/Header'; | |
import Footer from './components/Footer'; | |
import Home from './components/Home'; | |
import Nav from './components/Nav'; | |
import Single from './components/Single'; | |
import ScrollToTop from 'react-router-scroll-top'; | |
import ReactVivus from 'react-vivus'; |