Skip to content

Commit

Permalink
Merge branch 'main' into IKnowYou
Browse files Browse the repository at this point in the history
  • Loading branch information
vansh-codes authored Jun 20, 2024
2 parents 6d86cbc + 5412315 commit 3e66b9a
Show file tree
Hide file tree
Showing 23 changed files with 624 additions and 16 deletions.
7 changes: 4 additions & 3 deletions Games/Carrom/carrom.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</head>
<body style="background-image:url(carrom.jpg)">
<div class="row" style="margin: 0px;padding: 0px;">
<div class="col-md-3">
<div class="col-md-3 flexx">
<div class="jumbotron">
<h3><b>Player 1</b></h3>
<p><b>Score : <span id="0">0</span></b></p>
Expand All @@ -28,12 +28,13 @@ <h3><b>Player 1</b></h3>
<canvas id="Carrom" width="720" height="720">Your browser does not support the HTML5 canvas tag.</canvas>
<canvas id="Striker" width="720" height="720">Your browser does not support the HTML5 canvas tag.</canvas>
</div>
<div class="col-md-3">
<div class="col-md-3 flexx">
<div class="jumbotron">
<h3><b>Player 2</b></h3>
<p><b>Score : <span id="1">0</span></b></p>
</div>
<p id="mp">Mouse Positions :</p>
<div class="mousepos"><p id="mp">Mouse Positions :</p></div>

</div>
</div>
<script type="text/javascript">
Expand Down
43 changes: 39 additions & 4 deletions Games/Carrom/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,49 @@ div{
padding: 0px;
}
#Carrom{
background-color: black;
background:linear-gradient(black, brown);
position: absolute;
border-radius: 10px;
}
#Striker{
position: relative;
}
.jumbotron{
padding: 0px;
margin: 0px;
padding-left: 20px;
margin: 10px;
padding: 10px;
border-radius: 10px;
border: 2.5px solid rgb(168, 43, 1);
border-style:groove;
backdrop-filter: blur(5px);
background: linear-gradient(rgba(255, 211, 181, 0.608),rgba(68, 1, 1, 0.577));
}

.jumbotron h3{
text-align: center;
color: rgb(255, 255, 255);
}
.jumbotron p{
color:beige;

}
.mousepos{
margin: 10px;
align-items: center;
text-align: center;
background-color: rgb(252, 237, 187);
padding: 10px;
border-radius: 10px;
font-weight: 600;
}
.btn-primary{
margin: 10px;
background-color: maroon;
width: 100px;
height: 40px;
align-items: center;

}
.flexx{
align-items: center;
text-align: center;
}
8 changes: 4 additions & 4 deletions Games/Carrom/js/canvasCalls.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ function canvasCalls(){
//inner rectangle
drawRect(20,20,680,680,'#f3e5ab',ctx);
//Corner Circles
drawCircle(35,35,22,'black',ctx);
drawCircle(685,35,22,'black',ctx);
drawCircle(685,685,22,'black',ctx);
drawCircle(35,685,22,'black',ctx);
drawCircle(35,35,22,'#750E21',ctx);
drawCircle(685,35,22,'#750E21',ctx);
drawCircle(685,685,22,'#750E21',ctx);
drawCircle(35,685,22,'#750E21',ctx);
//Central Circles
drawCircle(360,360,10,'black',ctx);
drawCircleS(360,360,70,ctx);
Expand Down
2 changes: 1 addition & 1 deletion Games/Carrom/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $(document).ready(function(){
yCo = event.pageY;
if(xCo < players[currPlayer].rb && xCo > players[currPlayer].lb)
coins[0].x = xCo;
$("#mp").html("x-coor : " + xCo +" y-coor : " + yCo);
$("#mp").html("X-coordinate : " + xCo +" Y-coordinate : " + yCo);
ctx.clearRect(0,0,720,720);
drawCoins();
drawCircle(coins[0].x-390,coins[0].y,12.5,'white',ctx);
Expand Down
Binary file added Games/Ganesh QR Maker/QR CODE Generator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions Games/Ganesh QR Maker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# QR Code Generator

## About The Project

A simple web application which will generate a QR Code.

## Tech Stacks Used


![HTML](https://img.shields.io/badge/html5%20-%23E34F26.svg?&style=for-the-badge&logo=html5&logoColor=white)
![CSS](https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&logo=css3&logoColor=white)
![JS](https://img.shields.io/badge/javascript%20-%23323330.svg?&style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)

## API Used

Visit Website: https://goqr.me/api/

## Screenshot
![alt text](<QR CODE Generator.png>)
23 changes: 23 additions & 0 deletions Games/Ganesh QR Maker/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>QR Code Generator</title>
</head>

<body>
<h1>GANESH QR MAKER</h1>
<div class="main">
<input type="text" name="" id="" class="input" placeholder="Enter text here...">
<button class="btn">Generate</button> <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTgdnbx19IIBKvSAwARaGMfbl06_CnXNcV63g&usqp=CAU" alt="qrcode" class="code">
<p id="note">Made with ♥ by Ganesh </p>
</div>
<div id="toast">Successfully Generated!!!</div>
<script src="script.js"></script>
</body>

</html>
21 changes: 21 additions & 0 deletions Games/Ganesh QR Maker/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const btn = document.querySelector('.btn');
const code = document.querySelector('.code');
const input = document.querySelector('.input');
const toast = document.querySelector('#toast');

btn.addEventListener('click', generate);

function generate() {
const data = input.value;
const URL = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${data}`;
code.src = URL;

toastDiv();
}

function toastDiv() {
toast.className = "show";
setTimeout(function() {
toast.className = toast.className.replace("show", "");
}, 2000)
}
94 changes: 94 additions & 0 deletions Games/Ganesh QR Maker/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
width: 100%;
height: 100vh;
background: linear-gradient(to right top, #ff0f7b, #f89b29);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

h1 {
font-size: 55px;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9,
0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1),
0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2),
0 5px 10px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.2),
0 20px 20px rgba(0, 0, 0, 0.15);
}

.main {
width: 25%;
height: 70%;
padding: 50px 15px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background: #fff;
box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
border-radius: 5px;
margin-top: 25px;
margin-bottom: 40px;
}

.main .input {
width: 90%;
padding: 8px 25px;
border: 3px solid #9e9e9e;
outline: none;
margin: 15px 0;
}
.main .input:focus {
border: 3px solid #f89b29;
}
.btn,
.input {
font-size: 1.1rem;
border-radius: 5px;
}
.main .btn {
width: 90%;
padding: 12px 0;
outline: none;
border: none;
border-radius: 5px;
background: #f89b29;
color: #fff;
transition: 0.3s;
}
.main .code {
margin: 10px 0;
}

.main .btn:hover {
box-shadow: 0 10px 25px -10px #f89b29;
}

#toast {
position: absolute;
bottom: 0;
border-radius: 5px;
padding: 10px 50px;
background: #07f49e;
opacity: 0;
visibility: hidden;
box-shadow: 0 10px 25px -10px #07f49e;
transition: 0.3s;

font-size: 20px;
}

#toast.show {
visibility: visible;
opacity: 1;
bottom: 50px;
}


23 changes: 23 additions & 0 deletions Games/Spirograph/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Spirograph Simulator

This code simulates a Spirograph, a fun tool for drawing intricate curves.

**How to Play:**

1. **Open the HTML file:** Double-click the `index.html` file in your web browser.
2. **Adjust settings:**
- Change gear sizes (r1, r2, r3) and frequency values (f1, f2, f3) to modify the curve's shape (sliders or input boxes).
3. **Start drawing:** Click the "Play" button. The spirograph will come alive!
4. **Pause/Resume:** Click "Pause" to stop the animation and "Play" to resume.
5. **Reset:** Click "Reset" to clear the drawing and start fresh with the current settings.
6. **Save your artwork:** Click "Save" to download the current drawing as a PNG image.


**Getting Started:**

1. Clone or download the repository.
2. Open `index.html` in your browser.

**Enjoy the world of spirograph curves!**

![Spirograph](https://github.com/GSSoC24/Contributor/assets/141642724/bf5e34a3-b8a8-4d7f-9732-894a20fbb7a9)
48 changes: 48 additions & 0 deletions Games/Spirograph/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>

</head>
<body>
<div id="canvasContainer"></div>
<div id="inputContainer">
<div>
<label for="f1Input">f1:</label><input id="f1Input" type="number"/>
<label for="f2Input">f2:</label><input id="f2Input" type="number"/>
<label for="f3Input">f3:</label><input id="f3Input" type="number"/>
</div>
<div>
<label for="r1Input">r1:</label><input id="r1Input" type="number"/>
<label for="r2Input">r2:</label><input id="r2Input" type="number"/>
<label for="r3Input">r3:</label><input id="r3Input" type="number"/>
</div>
<div>
<button id="pausePlayButton">Play</button>
<button id="resetButton">Reset</button>
<button id="saveButton">Save</button>
<label for="speedInput">Speed:</label><input id="speedInput" type="number"/>
<label for="radial">Radial:</label><input id="radial" type="checkbox"/>
</div>
</div>


<script src="main.js"></script>
</body>
</html>












Loading

0 comments on commit 3e66b9a

Please sign in to comment.