Mis à jour du git

master
emeric dallot 4 years ago
parent c2ec3c6e1d
commit a82240c747

@ -1,62 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v4.1.1">
<title>Connexion</title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/floating-labels/">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<link href="floating-labels.css" rel="stylesheet">
</head>
<body>
<form class="form-signin">
<div class="text-center mb-4">
<img class="mb-4" src="ballon.png" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Connexion</h1>
</div>
<div class="form-label-group">
<input type="text" class="form-control" placeholder="Username" id="validationPseudo" required autofocus>
<label for="validationPseudo">Pseudo</label>
</div>
<div class="form-label-group">
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<label for="inputPassword">Mot de passe</label>
</div>
<div class="checkbox mb-3">
<label>
<input type="checkbox" value="remember-me"> Se souvenir de moi
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Connexion</button>
<a>Pas de compte,</a>
<a href="Inscription.html">
s'inscrire?
</a>
</form>
</body>
</html>

@ -1,61 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v4.1.1">
<title>Inscription</title>
<link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/floating-labels/">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<link href="floating-labels.css" rel="stylesheet">
</head>
<body>
<form class="form-signin">
<div class="text-center mb-4">
<img class="mb-4" src="ballon.png" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Inscription</h1>
</div>
<div class="form-label-group">
<input type="text" class="form-control" placeholder="Username" id="validationPseudo" required autofocus>
<label for="validationPseudo">Pseudo</label>
</div>
<div class="form-label-group">
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputEmail">Email</label>
</div>
<div class="form-label-group">
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<label for="inputPassword">Mot de passe</label>
</div>
<div class="form-label-group">
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<label for="inputPassword">Confirmer mot de passe</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">S'inscrire</button>
</form>
</body>
</html>

@ -1,78 +0,0 @@
var canvas = document.getElementById("demiTerrainDroit");
canvas.width = window.innerWidth*0.74;
var lt = canvas.width;
canvas.height = lt*0.536;
var ht = canvas.height;
var c = canvas.getContext('2d');
console.log(canvas);
c.lineWidth="5";
//Bordures du terrain
c.beginPath();
c.rect(0, 0, lt/2, ht);
c.stroke();
c.lineWidth="2";
//Demi-cercle central
c.beginPath();
c.arc(0, ht/2, lt*0.064, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
/* RAQUETTES */
//Rectangle raquette
c.beginPath();
c.rect(lt/2-lt*0.208, ht/3, lt*0.208, ht/3);
c.stroke();
//Cercle raquette
c.beginPath();
c.arc(lt/2-lt*0.208, ht/2, lt*0.064, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
/* LIGNE LANCERS FRANCS */
//Ligne lf 1
c.beginPath();
c.moveTo(lt/2, 0.06*ht);
c.lineTo(lt/2-lt*0.075, 0.06*ht);
c.stroke();
//Ligne lf 2
c.beginPath();
c.moveTo(lt/2, 0.94*ht);
c.lineTo(lt/2-lt*0.075, 0.94*ht);
c.stroke();
// Cercle lf
c.beginPath();
c.arc(lt/2-lt*0.063, ht/2, ht*0.44, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
/* PANIER */
//Cercle panier
c.beginPath();
c.arc(lt/2-lt*0.063, ht/2, ht*0.083, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
//Panier
c.beginPath();
c.moveTo(lt/2-lt*0.06, ht*0.44);
c.lineTo(lt/2-lt*0.06, ht*0.56);
c.stroke();
//Micro cercle
c.beginPath();
c.arc(lt/2-lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
c.stroke();
//Micro ligne
c.beginPath();
c.moveTo(lt/2-lt*0.06, ht/2);
c.lineTo(lt/2-lt*0.067, ht/2);
c.stroke();

@ -1,79 +0,0 @@
var canvas = document.getElementById("demiTerrainGauche");
canvas.width = window.innerWidth*0.74;
var lt = canvas.width;
canvas.height = lt*0.536;
var ht = canvas.height;
var c = canvas.getContext('2d');
console.log(canvas);
c.lineWidth="5";
//Bordures du terrain
c.beginPath();
c.rect(0, 0, lt/2, ht);
c.stroke();
c.lineWidth="2";
//Demi-cercle central
c.beginPath();
c.arc(lt/2, ht/2, lt*0.064, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
/* RAQUETTES */
//Rectangle raquette
c.beginPath();
c.rect(0, ht/3, lt*0.208, ht/3);
c.stroke();
//Cercle raquette
c.beginPath();
c.arc(lt*0.208, ht/2, lt*0.064, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
/* LIGNE LANCERS FRANCS */
//Ligne lf 1
c.beginPath();
c.moveTo(0, 0.06*ht);
c.lineTo(lt*0.075, 0.06*ht);
c.stroke();
//Ligne lf 2
c.beginPath();
c.moveTo(0, 0.94*ht);
c.lineTo(lt*0.075, 0.94*ht);
c.stroke();
// Cercle lf
c.beginPath();
c.arc(lt*0.063, ht/2, ht*0.44, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
/* PANIER */
//Cercle panier
c.beginPath();
c.arc(lt*0.063, ht/2, ht*0.083, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
//Panier
c.beginPath();
c.moveTo(lt*0.06, ht*0.44);
c.lineTo(lt*0.06, ht*0.56);
c.stroke();
//Micro cercle
c.beginPath();
c.arc(lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
c.stroke();
//Micro ligne
c.beginPath();
c.moveTo(lt*0.06, ht/2);
c.lineTo(lt*0.067, ht/2);
c.stroke();

@ -1,133 +0,0 @@
var canvas = document.getElementById("terrain");
canvas.width = window.innerWidth*0.74;
var lt = canvas.width;
canvas.height = lt*0.536;
var ht = canvas.height;
var c = canvas.getContext('2d');
console.log(canvas);
c.lineWidth="5";
//Bordures du terrain
c.beginPath();
c.rect(0, 0, lt, ht);
c.stroke();
c.lineWidth="2";
//Ligne centrale
c.beginPath();
c.moveTo(lt/2, ht);
c.lineTo(lt/2, 0);
c.stroke();
//Cercle central
c.beginPath();
c.arc(lt/2, ht/2, lt*0.064, 0, Math.PI*2, false);
c.stroke();
/* RAQUETTES */
//Rectangle raquette gauche
c.beginPath();
c.rect(0, ht/3, lt*0.208, ht/3);
c.stroke();
//Rectangle raquette droite
c.beginPath();
c.rect(lt-lt*0.208, ht/3, lt-lt*0.208, ht/3);
c.stroke();
//Cercle raquette gauche
c.beginPath();
c.arc(lt*0.208, ht/2, lt*0.064, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
//Cercle raquette droite
c.beginPath();
c.arc(lt-(lt*0.208), ht/2, lt*0.064, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
/* LIGNES LANCERS FRANCS */
//Ligne lf 1 gauche
c.beginPath();
c.moveTo(0, 0.06*ht);
c.lineTo(lt*0.075, 0.06*ht);
c.stroke();
//Ligne lf 2 gauche
c.beginPath();
c.moveTo(0, 0.94*ht);
c.lineTo(lt*0.075, 0.94*ht);
c.stroke();
// Cercle lf gauche
c.beginPath();
c.arc(lt*0.063, ht/2, ht*0.44, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
//Ligne lf 1 droite
c.beginPath();
c.moveTo(lt, 0.06*ht);
c.lineTo(lt*0.925, 0.06*ht);
c.stroke();
//Ligne lf 2 droite
c.beginPath();
c.moveTo(lt, 0.94*ht);
c.lineTo(lt*0.925, 0.94*ht);
c.stroke();
//Cercle lf droite
c.beginPath();
c.arc(lt*0.937, ht/2, lt*0.236, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
/* PANIERS */
//Cercle panier gauche
c.beginPath();
c.arc(lt*0.063, ht/2, ht*0.083, 1.5*Math.PI, 0.5*Math.PI, false);
c.stroke();
//Panier gauche
c.beginPath();
c.moveTo(lt*0.06, ht*0.44);
c.lineTo(lt*0.06, ht*0.56);
c.stroke();
c.beginPath();
c.arc(lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
c.stroke();
c.beginPath();
c.moveTo(lt*0.06, ht/2);
c.lineTo(lt*0.067, ht/2);
c.stroke();
//Cercle panier droit
c.beginPath();
c.arc(lt-lt*0.063, ht/2, ht*0.083, 0.5*Math.PI, 1.5*Math.PI, false);
c.stroke();
//Panier droit
c.beginPath();
c.moveTo(lt-lt*0.06, ht-ht*0.44);
c.lineTo(lt-lt*0.06, ht-ht*0.56);
c.stroke();
c.beginPath();
c.arc(lt-lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
c.stroke();
c.beginPath();
c.moveTo(lt-lt*0.06, ht-ht/2);
c.lineTo(lt-lt*0.067, ht-ht/2);
c.stroke();

@ -1,172 +0,0 @@
#barre_nav{
background: black;
height: 56px;
/*padding-top: 5px;*/
vertical-align: center;
}
#titre{
font-family: "Lucida Console", Courier, monospace;
text-shadow: white 0 -1px;
}
#navbarSupportedContent{
margin: 8px;
}
.nav-item:hover{
background-color: orange;
border-radius: 10px;
width: 70%;
}
#image_ballon{
margin-bottom: 5px;
}
body{
background-color: #303030;
overflow-x: scroll;
overflow-y: scroll;
}
.collapse.width,
.collapsing.width {
max-width: 0;
min-width: 0;
width: 0;
transition: all .2s ease;
}
.collapse .flex-column {
overflow: auto;
flex-wrap: nowrap; /* Optional, if you don't want the links to form columns if they overflow */
}
.collapse .flex-column li {
width: 100%;
}
.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}
.sidebar {
width: 20%;
margin-top: 56px;
position: fixed;
top: 0;
bottom: 0;
right: 0;
z-index: 100; /* Behind the navbar */
padding: 48px 0 0; /* Height of navbar */
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
background-color: #b9b7b7;
}
@media (max-width: 767.98px) {
.sidebar {
top: 5rem;
}
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 500;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}
.sidebar .nav-link.active {
color: #007bff;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
#list-home-list{
height: 50px;
width: 49%;
}
#ul{
padding-left: 15px;
padding-right: 15px;
}
#list-home-list{
padding-right:10px;
width: 99%
}
#bouton{
margin-left: 15px;
}
#arbre{
height: 150px;
width: 80%;
}
#sidebarMenu{
min-width: 50px;
}
#terrain{
margin-top: 2%;
margin-left: 5%;
width: 75%;
height: auto;
}
#demiTerrainDroit{
margin-top: 2%;
margin-left: 20%;
width: 75%;
height: auto;
}
#demiTerrainGauche{
margin-top: 2%;
margin-left: 20%;
width: 75%;
height: auto;
/*transform: rotate(90deg);*/
}
.boutons {
margin-top: 1%;
}
#bouttonadd: hover {
background-color : "red";
border-color: "yellow";
}
#bouttonadd:active{
box-shadow: 1px 1px 10px black inset, 0 1px 0 rgba( 255, 255, 255, 0.4);
}

@ -1,225 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="basket.css">
<title>Basket</title>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light" id="barre_nav">
<div id="titre">
<img id="image_ballon" src="ballon.png" width="30" height="30" alt="">
<a class="navbar-brand text-white" href="#">BASKET</a>
</div>
<button class="navbar-toggler bg-light" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link text-white" href="#">Connexion <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Galerie</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Nouvelle page
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" id="demo" href="#" onclick="afficherDemiTerrainDroit()">TERRAIN DROIT</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item " href="#" onclick="afficherDemiTerrainGauche()">TERRAIN GAUCHE</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item " href="#" onclick="afficherFullTerrain()" >FULL TERRAIN</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Partager
</a>
<div class="dropdown-menu text-white" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">PDF</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">JPG</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Sauvegarder</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block sidebar collapse">
<div class="row list-group list-group">
<div >
<div class="list-group list-group-horizontal" id="bouton" role="tablist">
<a class="list-group-item list-group-item-action active" id="list-home-list" data-toggle="list" href="#list-home" role="tab" aria-controls="home">CREATION
</a>
<a class="list-group-item list-group-item-action" data-toggle="list" id="list-tab" href="#list-profile" role="tab" aria-controls="profile">VUE ARBRE
</a>
</div>
</div>
<div>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="list-home" role="tabpanel" aria-labelledby="list-home-list">
<div class="sidebar-sticky pt-3">
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted font-weight-bold">
<span>AJOUTER JOUEUR</span>
<a class="d-flex align-items-center text-muted" href="#" aria-label="Add a new report">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="ajouterjoueur()" href="#">
<span data-feather="file"></span>
ATTAQUANT
</a>
</li>
<li class="nav-item" id="bouttonadd">
<a class="nav-link " onclick="ajouteradversaire()" href="#">
<span data-feather="shopping-cart"></span>
DÉFENSEUR
</a>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted font-weight-bold">
<span>ACTIONS</span>
<a class="d-flex align-items-center text-muted" href="#" aria-label="Add a new report">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="triggerfairepasse()"href="#">
<span data-feather="file-text"></span>
PASSE
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
DÉPLACER
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
DRIBBLER
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
ÉCRAN
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
TIRER
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="retourarriere()" href="#">
<span data-feather="file-text"></span>
RETOUR ARRIERE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="triggerdonnerlaballe()" href="#">
<span data-feather="file-text"></span>
DONNER LA BALLE
</a>
</li>
</ul>
</div>
</div>
<div class="tab-pane fade" id="list-profile" role="tabpanel" aria-labelledby="list-profile-list">
<div class="sidebar-sticky pt-3">
<ul class="nav flex-column" id="ul">
<li class="nav-item">
<a class="nav-link active" href="#">
<span data-feather="home"></span>
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file"></span>
<img id="arbre" src="arbre.PNG" width="30" height="30" alt="">
</a>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="boutons">
<button type="button" class="btn btn-warning">
<img src="flèche_gauche.png" height="30">
</button>
<button type="button" class="btn btn-warning">
<img src="flèche_droite.png" height="30">
</button>
</div>
<div id="divTerrains">
<canvas id="terrain" style="display:block;"></canvas>
<script src ="Terrains/Horizontal/entier.js"></script>
<canvas id="demiTerrainDroit" style="display:none;"></canvas>
<script src ="Terrains/Horizontal/demiDroit.js"></script>
<canvas id="demiTerrainGauche" style="display:none;"></canvas>
<script src ="Terrains/Horizontal/demiGauche.js"></script>
</div>
<script>
function afficherFullTerrain() {
document.getElementById("terrain").style.display = "block";
document.getElementById("demiTerrainDroit").style.display = "none";
document.getElementById("demiTerrainGauche").style.display = "none";
}
function afficherDemiTerrainDroit() {
document.getElementById("terrain").style.display = "none";
document.getElementById("demiTerrainDroit").style.display = "block";
document.getElementById("demiTerrainGauche").style.display = "none";
}
function afficherDemiTerrainGauche() {
document.getElementById("terrain").style.display = "none";
document.getElementById("demiTerrainDroit").style.display = "none";
document.getElementById("demiTerrainGauche").style.display = "block";
}
</script>
<button type="button" class="btn btn-warning fixed-bottom font-weight-bold">+</button>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="rectest.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
</body>
</html>

@ -1,124 +0,0 @@
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-signin {
width: 100%;
max-width: 420px;
padding: 15px;
margin: auto;
}
.form-label-group {
position: relative;
margin-bottom: 3rem;
}
.form-label-group input,
.form-label-group label {
height: 3.125rem;
padding: .75rem;
}
.form-label-group label {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
margin-bottom: 0;
line-height: 1.5;
color: #495057;
pointer-events: none;
cursor: text;
border: 1px solid transparent;
border-radius: .25rem;
transition: all .1s ease-in-out;
}
.form-label-group input::-webkit-input-placeholder {
color: transparent;
}
.form-label-group input::-moz-placeholder {
color: transparent;
}
.form-label-group input:-ms-input-placeholder {
color: transparent;
}
.form-label-group input::-ms-input-placeholder {
color: transparent;
}
.form-label-group input::placeholder {
color: transparent;
}
.form-label-group input:not(:-moz-placeholder-shown) {
padding-top: 1.25rem;
padding-bottom: .25rem;
}
.form-label-group input:not(:-ms-input-placeholder) {
padding-top: 1.25rem;
padding-bottom: .25rem;
}
.form-label-group input:not(:placeholder-shown) {
padding-top: 1.25rem;
padding-bottom: .25rem;
}
.form-label-group input:not(:-moz-placeholder-shown) ~ label {
padding-top: .25rem;
padding-bottom: .25rem;
font-size: 12px;
color: #777;
}
.form-label-group input:not(:-ms-input-placeholder) ~ label {
padding-top: .25rem;
padding-bottom: .25rem;
font-size: 12px;
color: #777;
}
.form-label-group input:not(:placeholder-shown) ~ label {
padding-top: .25rem;
padding-bottom: .25rem;
font-size: 12px;
color: #777;
}
/* Fallback for Edge
-------------------------------------------------- */
@supports (-ms-ime-align: auto) {
.form-label-group {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column-reverse;
flex-direction: column-reverse;
}
.form-label-group label {
position: static;
}
.form-label-group input::-ms-input-placeholder {
color: #777;
}
}

@ -1,584 +0,0 @@
// get canvas related references
var canvas = document.getElementById("terrain");
var ctx = canvas.getContext("2d");
var BB = canvas.getBoundingClientRect();
var offsetX = BB.left;
var offsetY = BB.top;
canvas.width = window.innerWidth*0.74;
var lt = canvas.width;
canvas.height = lt*0.536;
var ht = canvas.height;
var WIDTH = canvas.width;
var HEIGHT = canvas.height;
// drag related variables
var dragok = false;
var startX;
var startY;
//variable pour donner le ballon
var ball = false;
var nbball=0;
var nba = 0;
var nbb = 0;
//variable pour faire une passe
var nbjpass = 0;
var passable = false;
// array de cercle de joueurs
var joueurs = [];
// array de cercle d'adversaire
var adversaire = [];
// array de passes
var passes = [];
// array de numero de joueur pour créér la passe
var jpass = [];
// array d'action pour pouvoir supprimer la derniere
var last = [];
// listen for mouse events
canvas.onmousedown = myDown;
canvas.onmouseup = myUp;
canvas.onmousemove = myMove;
// call to draw the scene
draw();
// draw a single rect
function rect(x, y, w, h) {
ctx.beginPath();
ctx.rect(x, y, w, h);
ctx.closePath();
ctx.fill();
}
function cercle(x,y,z,a,b,c,g) {
ctx.fillStyle = g;
ctx.beginPath();
ctx.arc(x,y,z,a,b,c);
ctx.fill();
}
function ligne(a,b,c,d){
ctx.beginPath();
ctx.moveTo(a, b);
ctx.lineTo(c, d);
ctx.lineWidth= 3;
ctx.stroke();
}
// clear the canvas
function clear() {
ctx.clearRect(0, 0, WIDTH, HEIGHT);
}
// redraw the scene
function draw() {
clear();
ctx.fillStyle = "#FAF7F8";
rect(0, 0, WIDTH, HEIGHT);
faireterrain();
// redraw each rect in the rects[] array
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if(r.setball == true){
r.fill = "green";
}
else{
r.fill = "red";
}
ctx.fillStyle = r.fill;
cercle(r.x,r.y,r.rayon,r.cache,r.taille,r.last,r.fill);
}
for (var i = 0; i < adversaire.length; i++) {
var r = adversaire[i];
if(r.setball == true){
r.fill = "green";
}
ctx.fillStyle = r.fill;
cercle(r.x,r.y,r.rayon,r.cache,r.taille,r.last);
}
for (var i = 0; i < jpass.length-1; i=i+2) {
var r = jpass[i];
var z = jpass[i+1];
nbjpass=0;
fairepasse(r,z);
}
for(var i = 0; i < passes.length; i++) {
var r = passes[i];
ligne(r.x.x,r.x.y,r.x2.x,r.y2.y);
}
}
// handle mousedown events
function myDown(e) {
// tell the browser we're handling this mouse event
e.preventDefault();
e.stopPropagation();
// get the current mouse position
var mx = parseInt(e.clientX - offsetX);
var my = parseInt(e.clientY - offsetY);
//console.log(mx);
//console.log(my);
//console.log(ball);
if(ball == true){
dragok = false;
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if (mx > r.x - r.rayon && mx < r.x + r.rayon && my > r.y - r.rayon && my < r.y + r.rayon) {
// if yes, set that rects isDragging=true
document.body.style.cursor = 'pointer';
dragok = true;
if (nbball == 0){
r.setball = true;
r.gottheball = true;
nbball = nbball + 1;
last.push({
action : 3,
});
console.log(last);
}
else
window.alert("Un seul ballon sur le terrain");
ball = false;
draw();
}
}
for (var i = 0; i < adversaire.length; i++) {
var r = adversaire[i];
if (mx > r.x - r.rayon && mx < r.x + r.rayon && my > r.y - r.rayon && my < r.y + r.rayon) {
// if yes, set that rects isDragging=true
document.body.style.cursor = 'pointer';
dragok = true;
if (nbball == 0){
r.setball = true;
r.gottheball = true;
nbball = nbball + 1;
last.push({
action : 4,
})
}
else
window.alert("Un seul ballon sur le terrain");
ball = false;
draw();
}
}
ball = false;
}
if(passable == true ){
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if (mx > r.x - r.rayon && mx < r.x + r.rayon && my > r.y - r.rayon && my < r.y + r.rayon) {
// if yes, set that rects isDragging=true
document.body.style.cursor = 'pointer';
if (nbjpass == 0){
if(r.gottheball == false){
passable = false;
console.log(nbjpass);
nbjpass = 0;
window.alert("Seulement un joueur qui possede le ballon a un moment peut faire une passe")
}
else
{
r.gottheball = false;
addj(i);
nbjpass=nbjpass+1;
console.log(nbjpass);
}
}
else{
r.gottheball = true;
addj(i);
nbjpass=nbjpass+1;
console.log(nbjpass);
}
if(nbjpass % 2 == 0){
console.log(nbjpass % 2 );
passable=false;
draw();
}
}
}
}
else {
dragok = false;
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if (mx > r.x - r.rayon && mx < r.x + r.rayon && my > r.y - r.rayon && my < r.y + r.rayon) {
// if yes, set that rects isDragging=true
document.body.style.cursor = 'pointer';
dragok = true;
r.isDragging = true;
}
}
for (var i = 0; i < adversaire.length; i++) {
var r = adversaire[i];
if (mx > r.x - r.rayon && mx < r.x + r.rayon && my > r.y - r.rayon && my < r.y + r.rayon) {
// if yes, set that rects isDragging=true
document.body.style.cursor = 'pointer';
dragok = true;
r.isDragging = true;
}
}
}
// save the current mouse position
startX = mx;
startY = my;
}
// handle mouseup events
function myUp(e) {
// tell the browser we're handling this mouse event
e.preventDefault();
e.stopPropagation();
// clear all the dragging flags
document.body.style.cursor = 'default';
dragok = false;
for (var i = 0; i < joueurs.length; i++) {
joueurs[i].isDragging = false;
}
for (var i = 0; i < adversaire.length; i++) {
adversaire[i].isDragging = false;
}
}
// handle mouse moves
function myMove(e) {
// if we're dragging anything...
if (dragok) {
// tell the browser we're handling this mouse event
e.preventDefault();
e.stopPropagation();
// get the current mouse position
var mx = parseInt(e.clientX - offsetX);
var my = parseInt(e.clientY - offsetY);
// calculate the distance the mouse has moved
// since the last mousemove
var dx = mx - startX;
var dy = my - startY;
// move each rect that isDragging
// by the distance the mouse has moved
// since the last mousemove
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if (r.isDragging) {
r.x += dx;
r.y += dy;
}
}
for (var i = 0; i < adversaire.length; i++) {
var r = adversaire[i];
if (r.isDragging) {
r.x += dx;
r.y += dy;
}
}
// redraw the scene with the new rect positions
draw();
// reset the starting mouse position for the next mousemove
startX = mx;
startY = my;
}
}
function ajouterjoueur() {
if (joueurs.length >= 5)
window.alert("Nombre de joueurs maximum atteint");
else {
joueurs.push({
x: 60,
y: 35 + ((joueurs.length + 1) * 50),
rayon: 20,
cache: 0,
taille: Math.PI*2,
last: false,
fill: "red",
isDragging: false,
setball : false,
gottheball : false,
});
last.push({
action : 1,
});
console.log(last);
cercle(60,35 + (joueurs.length * 50),20,0,Math.PI*2,false,"red");
}
}
function ajouteradversaire() {
console.log(adversaire.length);
if (adversaire.length >= 5)
window.alert("Nombre d'adversaire maximum atteint");
else {
adversaire.push({
x: 560,
y: 35 + ((adversaire.length + 1) * 50),
rayon: 20,
cache: 0,
taille: Math.PI*2,
last: false,
fill: "black",
isDragging: false,
setball : false
});
last.push({
action : 2,
});
console.log(last);
cercle(560,35 + (adversaire.length * 50),20,0,Math.PI*2,false,"black");
}
}
function fairepasse(a,b) {
console.log(a);
console.log(b);
passes.push({
x: joueurs[a.c],
y: joueurs[a.c],
x2 : joueurs[b.c],
y2 : joueurs[b.c],
});
// console.log("passe stp");
jpass.pop();
jpass.pop();
last.push({
action : 5,
depart : a.c,
arrivé : b.c,
});
console.log(last);
ligne(joueurs[a.c].x,joueurs[a.c].y,joueurs[b.c].x,joueurs[b.c].y);
;
}
function faireterrain() {
ctx.lineWidth="5";
//Bordures du terrain
ctx.beginPath();
ctx.rect(0, 0, lt, ht);
ctx.stroke();
ctx.lineWidth="2";
//Ligne centrale
ctx.beginPath();
ctx.moveTo(lt/2, ht);
ctx.lineTo(lt/2, 0);
ctx.stroke();
//Cercle central
ctx.beginPath();
ctx.arc(lt/2, ht/2, lt*0.064, 0, Math.PI*2, false);
ctx.stroke();
/* RAQUETTES */
//Rectangle raquette gauche
ctx.beginPath();
ctx.rect(0, ht/3, lt*0.208, ht/3);
ctx.stroke();
//Rectangle raquette droite
ctx.beginPath();
ctx.rect(lt-lt*0.208, ht/3, lt-lt*0.208, ht/3);
ctx.stroke();
//Cercle raquette gauche
ctx.beginPath();
ctx.arc(lt*0.208, ht/2, lt*0.064, 1.5*Math.PI, 0.5*Math.PI, false);
ctx.stroke();
//Cercle raquette droite
ctx.beginPath();
ctx.arc(lt-(lt*0.208), ht/2, lt*0.064, 0.5*Math.PI, 1.5*Math.PI, false);
ctx.stroke();
/* LIGNES LANCERS FRANCS */
//Ligne lf 1 gauche
ctx.beginPath();
ctx.moveTo(0, 0.06*ht);
ctx.lineTo(lt*0.075, 0.06*ht);
ctx.stroke();
//Ligne lf 2 gauche
ctx.beginPath();
ctx.moveTo(0, 0.94*ht);
ctx.lineTo(lt*0.075, 0.94*ht);
ctx.stroke();
// Cercle lf gauche
ctx.beginPath();
ctx.arc(lt*0.063, ht/2, ht*0.44, 1.5*Math.PI, 0.5*Math.PI, false);
ctx.stroke();
//Ligne lf 1 droite
ctx.beginPath();
ctx.moveTo(lt, 0.06*ht);
ctx.lineTo(lt*0.925, 0.06*ht);
ctx.stroke();
//Ligne lf 2 droite
ctx.beginPath();
ctx.moveTo(lt, 0.94*ht);
ctx.lineTo(lt*0.925, 0.94*ht);
ctx.stroke();
//Cercle lf droite
ctx.beginPath();
ctx.arc(lt*0.937, ht/2, lt*0.236, 0.5*Math.PI, 1.5*Math.PI, false);
ctx.stroke();
/* PANIERS */
//Cercle panier gauche
ctx.beginPath();
ctx.arc(lt*0.063, ht/2, ht*0.083, 1.5*Math.PI, 0.5*Math.PI, false);
ctx.stroke();
//Panier gauche
ctx.beginPath();
ctx.moveTo(lt*0.06, ht*0.44);
ctx.lineTo(lt*0.06, ht*0.56);
ctx.stroke();
ctx.beginPath();
ctx.arc(lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(lt*0.06, ht/2);
ctx.lineTo(lt*0.067, ht/2);
ctx.stroke();
//Cercle panier droit
ctx.beginPath();
ctx.arc(lt-lt*0.063, ht/2, ht*0.083, 0.5*Math.PI, 1.5*Math.PI, false);
ctx.stroke();
//Panier droit
ctx.beginPath();
ctx.moveTo(lt-lt*0.06, ht-ht*0.44);
ctx.lineTo(lt-lt*0.06, ht-ht*0.56);
ctx.stroke();
ctx.beginPath();
ctx.arc(lt-lt*0.072, ht/2, ht*0.01, 0, Math.PI*2, false);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(lt-lt*0.06, ht-ht/2);
ctx.lineTo(lt-lt*0.067, ht-ht/2);
ctx.stroke();
}
function triggerdonnerlaballe(){
ball = true;
console.log(ball);
}
function triggerfairepasse(){
if(joueurs.length < 2){
window.alert("On ne peut faire une passe si on a pas 2 joueurs")
}
else{
passable = true;
console.log(passable);
}
}
function addj(a){
jpass.push({
c : a,
});
}
function retourarriere(){
console.log(last);
console.log("allo");
x = last.length;
if(x == 0){
window.alert("Vous ne pouvez revenir en arriere")
}
else{
if(last[x-1].action == 1){
joueurs.pop();
last.pop();
draw();
}
if(last[x-1].action == 2){
adversaire.pop();
last.pop();
draw();
}
if(last[x-1].action == 3){
for (var i = 0; i < joueurs.length; i++) {
var r = joueurs[i];
if(r.setball == true){
r.setball = false;
nbball = nbball - 1;
last.pop();
draw();
}
}
}
if(last[x-1].action == 4){
for (var i = 0; i < adversaire.length; i++) {
var r = adversaire[i];
if(r.setball = true){
r.setball = false;
nbball = nbball - 1;
last.pop();
draw();
}
}
}
if(last[x-1].action == 5){
joueurs[last[x-1].arrivé].gottheball = false;
joueurs[last[x-1].depart].gottheball = true;
last.pop();
passes.pop();
draw();
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

@ -1,177 +0,0 @@
#barre_nav{
background: black;
height: 56px;
/*padding-top: 5px;*/
vertical-align: center;
}
#titre{
font-family: "Lucida Console", Courier, monospace;
text-shadow: white 0 -1px;
}
#navbarSupportedContent{
margin: 8px;
}
.nav-item:hover{
background-color: orange;
border-radius: 10px;
width: 70%;
}
#image_ballon{
margin-bottom: 5px;
}
body{
background-color: #303030;
overflow-x: scroll;
overflow-y: scroll;
}
.collapse.width,
.collapsing.width {
max-width: 0;
min-width: 0;
width: 0;
transition: all .2s ease;
}
.collapse .flex-column {
overflow: auto;
flex-wrap: nowrap; /* Optional, if you don't want the links to form columns if they overflow */
}
.collapse .flex-column li {
width: 100%;
}
.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}
.sidebar {
width: 20%;
margin-top: 56px;
position: fixed;
top: 0;
bottom: 0;
right: 0;
z-index: 100; /* Behind the navbar */
padding: 48px 0 0; /* Height of navbar */
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
background-color: #b9b7b7;
}
@media (max-width: 767.98px) {
.sidebar {
top: 5rem;
}
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 500;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}
.sidebar .nav-link.active {
color: #007bff;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
#list-home-list{
height: 50px;
width: 49%;
}
#ul{
padding-left: 15px;
padding-right: 15px;
}
#list-home-list{
padding-right:10px;
width: 99%
}
#bouton{
margin-left: 15px;
}
#arbre{
height: 150px;
width: 80%;
}
#sidebarMenu{
min-width: 50px;
}
#terrain{
margin-top: 2%;
margin-left: 5%;
width: 75%;
height: auto;
}
#demiTerrainDroit{
margin-top: 2%;
margin-left: 20%;
width: 75%;
height: auto;
}
#demiTerrainGauche{
margin-top: 2%;
margin-left: 20%;
width: 75%;
height: auto;
/*transform: rotate(90deg);*/
}
.boutons {
margin-top: 1%;
}
#bouttonadd: hover {
background-color : "red";
border-color: "yellow";
}
#bouttonadd:active{
box-shadow: 1px 1px 10px black inset, 0 1px 0 rgba( 255, 255, 255, 0.4);
}
.red {
background-color: "red";
margin-left: 15%;
}

@ -1,245 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="basket.css">
<title>Basket</title>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light" id="barre_nav">
<div id="titre">
<img id="image_ballon" src="ballon.png" width="30" height="30" alt="">
<a class="navbar-brand text-white" href="#">BASKET</a>
</div>
<button class="navbar-toggler bg-light" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link text-white" href="#">Connexion <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Galerie</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Nouvelle page
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" id="demo" href="#" onclick="afficherDemiTerrainDroit()">TERRAIN DROIT</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item " href="#" onclick="afficherDemiTerrainGauche()">TERRAIN GAUCHE</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item " href="#" onclick="afficherFullTerrain()" >FULL TERRAIN</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Partager
</a>
<div class="dropdown-menu text-white" aria-labelledby="navbarDropdown">
<a href="#" class="button dropdown-item" id="btn-download">PNG</a>
<div class="dropdown-divider"></div>
<script src="https://cdn.jsdelivr.net/npm/three@0.118.3/build/three.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
<button class="dropdown-item" id="download">PDF</button>
</div>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Sauvegarder</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block sidebar collapse">
<div class="row list-group list-group">
<div >
<div class="list-group list-group-horizontal" id="bouton" role="tablist">
<a class="list-group-item list-group-item-action active" id="list-home-list" data-toggle="list" href="#list-home" role="tab" aria-controls="home">CREATION
</a>
<a class="list-group-item list-group-item-action" data-toggle="list" id="list-tab" href="#list-profile" role="tab" aria-controls="profile">VUE ARBRE
</a>
</div>
</div>
<div>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="list-home" role="tabpanel" aria-labelledby="list-home-list">
<div class="sidebar-sticky pt-3">
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted font-weight-bold">
<span>AJOUTER JOUEUR</span>
<a class="d-flex align-items-center text-muted" href="#" aria-label="Add a new report">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="ajouterjoueur()" id="bouttonattaquant">
<span data-feather="file"></span>
ATTAQUANT
</a>
</li>
<li class="nav-item" id="bouttonadd">
<a class="nav-link " onclick="ajouteradversaire()" id="bouttonadversaire">
<span data-feather="shopping-cart"></span>
DÉFENSEUR
</a>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted font-weight-bold">
<span>ACTIONS</span>
<a class="d-flex align-items-center text-muted" href="#" aria-label="Add a new report">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="triggerfairepasse()" id="bouttonpasse">
<span data-feather="file-text"></span>
PASSE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="deplace()" id="bouttondeplacer">
<span data-feather="file-text"></span>
DÉPLACER
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="dribble()" id="bouttondribbler">
<span data-feather="file-text"></span>
DRIBBLER
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="bouttonecran">
<span data-feather="file-text"></span>
ÉCRAN
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="tire()" id="bouttontirer">
<span data-feather="file-text"></span>
TIRER
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="retourarriere()" id="bouttonretour">
<span data-feather="file-text"></span>
RETOUR ARRIERE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="triggerdonnerlaballe()" id="bouttondonner">
<span data-feather="file-text"></span>
DONNER LA BALLE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="" id="bouttoneffacer">
<span data-feather="file-text"></span>
EFFACER
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="influer()" id="bouttoninfluence">
<span data-feather="file-text"></span>
ZONE D'INFLUENCE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="editer()" id="bouttonediter">
<span data-feather="file-text"></span>
EDITER
</a>
</li>
</ul>
</div>
</div>
<div class="tab-pane fade" id="list-profile" role="tabpanel" aria-labelledby="list-profile-list">
<div class="sidebar-sticky pt-3">
<ul class="nav flex-column" id="ul">
<li class="nav-item">
<a class="nav-link active" href="#">
<span data-feather="home"></span>
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file"></span>
<img id="arbre" src="arbre.PNG" width="30" height="30" alt="">
</a>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="boutons">
<button type="button" class="btn btn-warning">
<img src="fleche_gauche.png" height="30">
</button>
<button type="button" class="btn btn-warning">
<img src="fleche_droite.png" height="30">
</button>
</div>
<div id="divTerrains">
<canvas id="terrain" style="display:block;"></canvas>
<script src ="Terrains/Horizontal/entier.js"></script>
<canvas id="demiTerrainDroit" style="display:none;"></canvas>
<script src ="Terrains/Horizontal/demiDroit.js"></script>
<canvas id="demiTerrainGauche" style="display:none;"></canvas>
<script src ="Terrains/Horizontal/demiGauche.js"></script>
</div>
<script>
function afficherFullTerrain() {
document.getElementById("terrain").style.display = "block";
document.getElementById("demiTerrainDroit").style.display = "none";
document.getElementById("demiTerrainGauche").style.display = "none";
}
function afficherDemiTerrainDroit() {
document.getElementById("terrain").style.display = "none";
document.getElementById("demiTerrainDroit").style.display = "block";
document.getElementById("demiTerrainGauche").style.display = "none";
}
function afficherDemiTerrainGauche() {
document.getElementById("terrain").style.display = "none";
document.getElementById("demiTerrainDroit").style.display = "none";
document.getElementById("demiTerrainGauche").style.display = "block";
}
</script>
<button type="button" class="btn btn-warning fixed-bottom font-weight-bold">+</button>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="rectest.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

@ -1,34 +0,0 @@
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes.symbols}
\usetikzlibrary{shadows}
\usetikzlibrary{decorations.pathmorphing, patterns,shapes}
\usetikzlibrary{positioning, decorations.markings}
\usepgflibrary{arrows}
\usetikzlibrary{arrows}
\pagestyle{empty}
%http://www.basket40.com/UserFiles/Site/File/administratif/SALLES%20ET%20TERRAINS/salles_et_terrains_2010__2015.pdf
\begin{document}
\begin{center}
\resizebox{.48\linewidth}{!}{
\input{haut1}
}
\end{center}
\begin{center}
\resizebox{.48\linewidth}{!}{
\input{maison-press1}
}
\end{center}
\end{document}

@ -1,31 +0,0 @@
\begin{tikzpicture}
\fill[color=gray!20] (11,2) -- (4,2) -- (7,5) -- (10, 5) -- cycle;
\input{demi-terrain}
%%%% Attaquants
\node[draw, circle] (1) at (7.5, 10) {\LARGE 1};
\node (2) at (2, 7) {\LARGE 2};
\node (3) at (13, 7) {\LARGE 3};
\node (4) at (4.5, 2.5) {\LARGE 4};
\node (5) at (11, 2.5) {\LARGE 5};
\draw[thick] [-[] (1) -- (3);
\draw[thick,dashed] [-latex] (1) -- (2);
\draw[thick] [-[] (4) -- (5);
\draw[thick] [-latex] (5) .. controls (10,3) .. (7.5,3);
\draw[thick] [-latex] (3) .. controls (10,10) .. (1);
\draw[thick] [-latex] (10.5,2.5) -- (7.15,5) ;
\end{tikzpicture}

@ -1,34 +0,0 @@
%%% TOUR du terrain
\draw (0,0) -- (0,14);
\draw (15,0) -- (15,14);
\draw (0,14) -- (15,14);
\draw (0,0) -- (15,0);
%%% ligne mediane
\draw (15,14) -- (0,14);
%%% rond central
% \draw (7.5,14) circle [radius=2.4];;
\draw (5,14) arc [radius=2.4, start angle=180, end angle= 360];
%% panier bas
\draw (7.5,1.776) circle [radius=0.2];;
\draw (6.5,1.575) -- (8.5,1.575);
%% raquette basse
\draw (5,0) -- (5,5.8);
\draw (10,0) -- (10,5.8);
\draw (10,5.8) -- (5,5.8);
\draw (9.3,5.8) arc [radius=1.8, start angle=0, end angle= 180];
%% 3 points bas
\draw (14.1,1.7) arc [radius=6.6, start angle=0, end angle= 180];
\draw (.9,0) -- (.9,1.7);
\draw (14.1,0) -- (14.1,1.7);

@ -1,32 +0,0 @@
\begin{tikzpicture}
\fill[color=gray!20] (9,2) -- (4,2) -- (7,7) -- (10, 7) -- cycle;
\input{demi-terrain}
%%%% Attaquants
\node[draw, circle] (1) at (7.5, 10) {\LARGE 1};
\node (2) at (2, 7) {\LARGE 2};
\node (3) at (13, 7) {\LARGE 3};
\node (4) at (4.5, 2.5) {\LARGE 4};
\node (5) at (10, 6) {\LARGE 5};
\draw[thick] [-[] (1) -- (3);
\draw[thick,dashed] [-latex] (1) -- (2);
\draw[thick] [-[] (4) -- (5);
\draw[thick] [-latex] (5) .. controls (7,6) .. (6,3);
\draw[thick, decoration = {zigzag}, decorate] [-latex] (3) .. controls (10,10) .. (1);
\draw[thick] [-latex] (9.5,5.7) -- (8,2.5) ;
\end{tikzpicture}

@ -1,22 +0,0 @@
\begin{tikzpicture}
\fill[color=gray!20] (3,25) -- (12,25) -- (12,16.5) --
(7.5,9) -- (3,16.5) -- cycle;
\input{terrain}
\node (1) at (11, 24) {\LARGE 1};
\node (2) at (4, 24) {\LARGE 2};
\node (3) at (11, 17.5) {\LARGE 3};
\node (4) at (4, 17.5) {\LARGE 4};
\node (5) at (7.5, 11) {\LARGE 5};
\node[draw,circle] (B) at (6.5,29) {\LARGE X};
\end{tikzpicture}

@ -1,53 +0,0 @@
%%% TOUR du terrain
\draw (0,0) -- (0,28);
\draw (15,0) -- (15,28);
\draw (0,28) -- (15,28);
\draw (0,0) -- (15,0);
%%% ligne mediane
\draw (15,14) -- (0,14);
%%% rond central
\draw (7.5,14) circle [radius=2.4];;
%% panier bas
\draw (7.5,1.776) circle [radius=0.2];;
\draw (6.5,1.575) -- (8.5,1.575);
%% panier haut
\draw (7.5,26.2) circle [radius=0.2];;
\draw (6.5,26.425) -- (8.5,26.425);
% 4.6+1.776 = 6.376
%% raquette basse
\draw (5,0) -- (5,5.8);
\draw (10,0) -- (10,5.8);
\draw (10,5.8) -- (5,5.8);
\draw (9.3,5.8) arc [radius=1.8, start angle=0, end angle= 180];
%% raquette haute
\draw (10,28) -- (10,22.2);
\draw (5,28) -- (5,22.2);
\draw (5,22.2) -- (10,22.2);
\draw (5.6,22.2) arc [radius=1.8, start angle=180, end angle= 360];
%% 3 points bas
\draw (14.1,1.7) arc [radius=6.6, start angle=0, end angle= 180];
\draw (.9,0) -- (.9,1.7);
\draw (14.1,0) -- (14.1,1.7);
%% 3 points haut
\draw (0.9,26.3) arc [radius=6.6, start angle=180, end angle= 360];
\draw (.9,28) -- (.9,26.2);
\draw (14.1,28) -- (14.1,26.2);
% \draw (0.9,19.675) -- (14.1,19.675);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

@ -170,3 +170,153 @@ body{
#bouttonadd:active{
box-shadow: 1px 1px 10px black inset, 0 1px 0 rgba( 255, 255, 255, 0.4);
}
.red {
background-color: "red";
margin-left: 15%;
}
.yay {
display: none;
}
.popup .overlay {
top:0px;
left:0px;
width:100vw;
height:100vh;
background:rgba(0,0,0,0.7);
z-index:1;
display:none;
}
.popup .content {
position:absolute;
top:183px;
left:215px;
transform:translate(-50%,-50%) scale(0);
background:#fff;
width:430px;
height:370px;
z-index:2;
text-align:center;
padding:20px;
box-sizing:border-box;
font-family:"Open Sans",sans-serif;
}
.popup .close-btn {
cursor:pointer;
position:absolute;
right: 15px;
top:20px;
width:30px;
height:30px;
background:#222;
color:#fff;
font-size:25px;
font-weight:600;
line-height:30px;
text-align:center;
border-radius:50%;
}
.close-btn2 {
cursor:pointer;
position:absolute;
left: 15px;
top:20px;
width:30px;
height:30px;
background:#222;
color:#fff;
font-size:25px;
font-weight:600;
line-height:30px;
text-align:center;
border-radius:50%;
}
.popup.active .overlay {
display:block;
}
.popup.active .content {
transition:all 300ms ease-in-out;
transform:translate(-50%,-50%) scale(1);
}
.skin_barre /* on reprend le nom qu'on a mis dans 'class=' */
{
width:30px;
height:300px;
/* on définit la taille du div (celle de l'image) */
/* et sa position initiale */
position:absolute;
/* le div n'est plus fixe mais libre */
background-image:url('degrade.jpg');
/* on définit ici l'image à afficher dans le div */
cursor:s-resize;
/* et enfin on définit le curseur à afficher lorsque la souris passe sur ce div */
}
/* ===== de même pour les autres ===== */
/* skin curseur1*/
.skin_curseur1
{
width:45px;
height:15px;
position:absolute;
top:12px;
left:15px;
cursor:s-resize;
background-image:url('curseur1.png');
}
/*skin carre */
.skin_carre
{
width:300px;
height:300px;
position:absolute;
top:20px;left:60px;
cursor:move;
background-color:red; /* on définit la couleur initiale du carré */
background-image:url('degrade_n-b.png');
}
/*skin curseur2*/
.skin_curseur2
{
width:20px;
height:20px;
position:absolute;
top:10px;
left:350px;
cursor:move;
background-image:url('curseur2.png');
}
/* skin resultat */
.skin_resultat
{
position:absolute;
top:330px;
left:60px;
border:1px solid black; /* dessine un cadre noir autour du 'input' et d'un pixel d'épaisseur */
text-align:center; /* on aligne le texte au centre */
}

@ -46,14 +46,48 @@
Partager
</a>
<div class="dropdown-menu text-white" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#">PDF</a>
<a href="#" class="button dropdown-item" id="btn-download">PNG</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">JPG</a>
<script src="https://cdn.jsdelivr.net/npm/three@0.118.3/build/three.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
<button class="dropdown-item" id="download">PDF</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" id="download" onclick="exporterTex()">TeX</button>
</div>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="#">Sauvegarder</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Modifier
</a>
<div class="dropdown-menu text-white" aria-labelledby="navbarDropdown">
<button class="button dropdown-item" onclick="togglePopup()">Attaquant</button>
<div class="dropdown-divider"></div>
<button class="button dropdown-item" onclick="togglePopup2()">Defenseur</button>
<div class="dropdown-divider"></div>
<button class="button dropdown-item" onclick="togglePopup3()">Terrain</button>
<div class="dropdown-divider"></div>
<button class="button dropdown-item" onclick="togglePopup4()">Centreinter</button>
<div class="dropdown-divider"></div>
<button class="button dropdown-item" onclick="togglePopup5()">Zone</button>
<div class="dropdown-divider"></div>
<button class="button dropdown-item" onclick="togglePopup6()">Mouvement</button>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Taille
</a>
<div class="dropdown-menu text-white" aria-labelledby="navbarDropdown">
<button id="boutonatt+" class="button dropdown-item">+</button>
<div class="dropdown-divider"></div>
<button id="boutonatt-" class="button dropdown-item">-</button>
</div>
</li>
</ul>
</div>
</nav>
@ -83,13 +117,13 @@
</h6>
<ul class="nav flex-column" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="ajouterjoueur()" href="#">
<a class="nav-link" onclick="ajouterjoueur()" id="bouttonattaquant">
<span data-feather="file"></span>
ATTAQUANT
</a>
</li>
<li class="nav-item" id="bouttonadd">
<a class="nav-link " onclick="ajouteradversaire()" href="#">
<a class="nav-link " onclick="ajouteradversaire()" id="bouttonadversaire">
<span data-feather="shopping-cart"></span>
DÉFENSEUR
</a>
@ -103,47 +137,79 @@
</h6>
<ul class="nav flex-column mb-2" id="ul">
<li class="nav-item">
<a class="nav-link" onclick="triggerfairepasse()"href="#">
<a class="nav-link" onclick="triggerfairepasse()" id="bouttonpasse">
<span data-feather="file-text"></span>
PASSE
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<a class="nav-link" onclick="deplace()" id="bouttondeplacer">
<span data-feather="file-text"></span>
DÉPLACER
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<a class="nav-link" onclick="dribble()" id="bouttondribbler">
<span data-feather="file-text"></span>
DRIBBLER
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<a class="nav-link" id="bouttonecran" onclick="ecraner()">
<span data-feather="file-text"></span>
ÉCRAN
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<a class="nav-link" onclick="tire()" id="bouttontirer">
<span data-feather="file-text"></span>
TIRER
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="retourarriere()" href="#">
<a class="nav-link" onclick="retourarriere()" id="bouttonretour">
<span data-feather="file-text"></span>
RETOUR ARRIERE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="triggerdonnerlaballe()" href="#">
<a class="nav-link" onclick="triggerdonnerlaballe()" id="bouttondonner">
<span data-feather="file-text"></span>
DONNER LA BALLE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="influer()" id="bouttoninfluence">
<span data-feather="file-text"></span>
ZONE D'INFLUENCE
</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="editer()" id="bouttonediter">
<span data-feather="file-text"></span>
EDITER
</a>
</li>
<li class="nav-item yay" id="gauche">
<a class="nav-link" onclick="tournergauche()" id="tournergauche">
<span data-feather="file"></span>
<--
</a>
</li>
<li class="nav-item yay" id="droite">
<a class="nav-link" onclick="tournerdroite()" id="tournerdroite">
<span data-feather="file"></span>
-->
</a>
</li>
<li class="nav-item yay" id="perso">
<form name="myform" action="" method="get">
Entrez un angle personalisé <br>
<input type="text" name="inputbox" value="" id="myTextBox">
<input type="button" name="button" value="Set" onclick="showData(this.form)">
</form>
</li>
</ul>
</div>
</div>
@ -191,7 +257,107 @@
<canvas id="demiTerrainGauche" style="display:none;"></canvas>
<script src ="Terrains/Horizontal/demiGauche.js"></script>
</div>
<div class="popup" id="popup-1">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup()">&times;</div>
<div id="barre" class="skin_barre" onmousedown="clique('barre')"> </div>
<div id="curseur1" class="skin_curseur1" onmousedown="clique('barre')"> </div>
<div id="carre" class="skin_carre" onmousedown="clique('carre')"> </div>
<div id="curseur2" class="skin_curseur2" onmousedown="clique('carre')"> </div>
<form>
<input type="text" id="resultat" class="skin_resultat" size=20 name="affichage_couleur" disabled="true" value="#FF0000" />
</form>
</div>
</div>
<div class="popup" id="popup-2">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup2()">&times;</div>
<div id="labarre" class="skin_barre" onmousedown="clique('barre')"> </div>
<div id="curseur1def" class="skin_curseur1" onmousedown="clique('barre')"> </div>
<div id="lecarre" class="skin_carre" onmousedown="clique('carre')"> </div>
<div id="curseur2def" class="skin_curseur2" onmousedown="clique('carre')"> </div>
<form>
<input type="text" id="resultatdef" class="skin_resultat" size=20 name="affichage_couleur" disabled="true" value="#4A51CE " />
</form>
</div>
</div>
<div class="popup" id="popup-3">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup3()">&times;</div>
<div id="labarreTer" class="skin_barre" onmousedown="clique('barre')"> </div>
<div id="curseur1ter" class="skin_curseur1" onmousedown="clique('barre')"> </div>
<div id="lecarret" class="skin_carre" onmousedown="clique('carre')"> </div>
<div id="curseur2ter" class="skin_curseur2" onmousedown="clique('carre')"> </div>
<form>
<input type="text" id="resultatter" class="skin_resultat" size=20 name="affichage_couleur" disabled="true" value="#808080 " />
</form>
</div>
</div>
<div class="popup" id="popup-4">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup4()">&times;</div>
<div id="labarreinTer" class="skin_barre" onmousedown="clique('barre')"> </div>
<div id="curseur1inter" class="skin_curseur1" onmousedown="clique('barre')"> </div>
<div id="lecarreint" class="skin_carre" onmousedown="clique('carre')"> </div>
<div id="curseur2inter" class="skin_curseur2" onmousedown="clique('carre')"> </div>
<form>
<input type="text" id="resultatinter" class="skin_resultat" size=20 name="affichage_couleur" disabled="true"value="#9E0E40" />
</form>
</div>
</div>
<div class="popup" id="popup-5">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup5()">&times;</div>
<div id="labarrezone" class="skin_barre" onmousedown="clique('barre')"> </div>
<div id="curseur1zone" class="skin_curseur1" onmousedown="clique('barre')"> </div>
<div id="lecarrezone" class="skin_carre" onmousedown="clique('carre')"> </div>
<div id="curseur2zone" class="skin_curseur2" onmousedown="clique('carre')"> </div>
<form>
<input id="resultatzone" class="skin_resultat" size=20 name="affichage_couleur" disabled="true" value="#40E0D0" />
</form>
</div>
</div>
<div class="popup" id="popup-6">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopupTa()">&times;</div>
<button id="boutonatt+" >+</button>
<button id="boutonatt-" >-</button>
</div>
</div>
<div class="popup" id="popup-7">
<div class="overlay"></div>
<div class="content">
<div class="close-btn" onclick="togglePopup2Td()">&times;</div>
<button id="boutondef+" >+</button>
<button id="boutondef-" >-</button>
</div>
</div>
<script>
function afficherFullTerrain() {
document.getElementById("terrain").style.display = "block";
@ -212,12 +378,13 @@
}
</script>
<button type="button" class="btn btn-warning fixed-bottom font-weight-bold">+</button>
<button type="button" class="btn btn-warning fixed-bottom font-weight-bold" onclick="nextStep()">+</button>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="rectest.js"></script>
<script src="latex.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 821 B

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 706 B

@ -0,0 +1,4 @@
enlever le flag dragging quand 2 ballons
enlever le fait de se faire une passe a soit meme
fix la passe avec le toogle et untoggle

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

@ -0,0 +1,174 @@
function exporterTex(){
let txt;
let nomFichier;
let nom = prompt("Veuillez entrer le nom du schéma", "Schéma1");
if (nom == null || nom == "") {
txt = "Schéma1";
}
let TeX = '';
let i;
TeX = TeX.concat('\\', 'begin{figure}\n');
TeX = TeX.concat('\\', 'begin{center}\n');
TeX = TeX.concat('\\', 'resizebox{.48\\linewidth}{!}{\n');
TeX = TeX.concat('\\', 'begin{tikzpicture}\n');
TeX = TeX.concat('\n\n', '%%%Zone d\'action');
if(zone.length != 0) {
TeX = TeX.concat('\n','\\fill[color=gray!20] ');
for (i = 0; i < zone.length; i++) {
TeX = TeX.concat('', '(');
TeX = TeX.concat(findY(zone[i].y), ',');
TeX = TeX.concat(findX(zone[i].x), ') -- ');
}
TeX = TeX.concat('','cycle;');
}
TeX = TeX.concat('\n\n', '%%%Terrain');
TeX = TeX.concat('\n', '\\draw (0,0) -- (0,28);');
TeX = TeX.concat('\n', '\\draw (15,0) -- (15,28);');
TeX = TeX.concat('\n', '\\draw (0,28) -- (15,28);');
TeX = TeX.concat('\n', '\\draw (0,0) -- (15,0);');
TeX = TeX.concat('\n', '\\draw (15,14) -- (0,14);');
TeX = TeX.concat('\n', '\\draw (7.5,14) circle [radius=2.4];;');
TeX = TeX.concat('\n', '\\draw (7.5,1.776) circle [radius=0.2];;');
TeX = TeX.concat('\n', '\\draw (6.5,1.575) -- (8.5,1.575);');
TeX = TeX.concat('\n', '\\draw (7.5,26.2) circle [radius=0.2];;');
TeX = TeX.concat('\n', '\\draw (6.5,26.425) -- (8.5,26.425);');
TeX = TeX.concat('\n', '\\draw (5,0) -- (5,5.8);');
TeX = TeX.concat('\n', '\\draw (10,0) -- (10,5.8);');
TeX = TeX.concat('\n', '\\draw (10,5.8) -- (5,5.8);;');
TeX = TeX.concat('\n', '\\draw (9.3,5.8) arc [radius=1.8, start angle=0, end angle= 180];');
TeX = TeX.concat('\n', '\\draw (10,28) -- (10,22.2);');
TeX = TeX.concat('\n', '\\draw (5,28) -- (5,22.2);');
TeX = TeX.concat('\n', '\\draw (5,22.2) -- (10,22.2);');
TeX = TeX.concat('\n', '\\draw (5.6,22.2) arc [radius=1.8, start angle=180, end angle= 360]; ');
TeX = TeX.concat('\n', '\\draw (14.1,1.7) arc [radius=6.6, start angle=0, end angle= 180];');
TeX = TeX.concat('\n', '\\draw (.9,0) -- (.9,1.7);');
TeX = TeX.concat('\n', '\\draw (14.1,0) -- (14.1,1.7);');
TeX = TeX.concat('\n', '\\draw (0.9,26.3) arc [radius=6.6, start angle=180, end angle= 360];');
TeX = TeX.concat('\n', '\\draw (.9,28) -- (.9,26.2);');
TeX = TeX.concat('\n', '\\draw (14.1,28) -- (14.1,26.2);');
TeX = TeX.concat('\n\n', '%%%Joueurs\n');
for (i = 0; i < joueurs.length; i++) {
let z = joueurs[i];
TeX = TeX.concat('\\','node[draw, circle] (');
TeX = TeX.concat('', z.nom);
TeX = TeX.concat('', ') at ');
TeX = TeX.concat('(', findY(z.y));
TeX = TeX.concat(', ', findX(z.x));
TeX = TeX.concat(') {\\LARGE ', i+1);
TeX = TeX.concat('', '};\n');
}
TeX = TeX.concat('\n', '%%%Adversaires\n');
for (i = 0; i < adversaire.length; i++) {
let r = adversaire[i];
let tx = r.a + r.rayon*Math.cos(r.angle);
let ty = r.b+ r.rayon *Math.sin(r.angle);
let px = r.a + r.rayon*Math.cos(r.inverse);
let py = r.b+ r.rayon *Math.sin(r.inverse);
let rx = tx + r.rretour *Math.cos(r.rangle);
let ry = ty+ r.rretour *Math.sin(r.rangle);
let ox = px + r.rretour*Math.cos(r.rangle);
let oy = py + r.rretour *Math.sin(r.rangle);
TeX = TeX.concat('\n', '\\draw (');
TeX = TeX.concat(findY(ty), ',');
TeX = TeX.concat(findX(tx), ') -- (');
TeX = TeX.concat(findY(ry), ',');
TeX = TeX.concat(findX(rx), ');');
TeX = TeX.concat('\n', '\\draw (');
TeX = TeX.concat(findY(py), ',');
TeX = TeX.concat(findX(px), ') -- (');
TeX = TeX.concat(findY(oy), ',');
TeX = TeX.concat(findX(ox), ');');
TeX = TeX.concat('\n', '\\draw (');
TeX = TeX.concat(findY(ty), ',');
TeX = TeX.concat(findX(tx), ') -- (');
TeX = TeX.concat(findY(py), ',');
TeX = TeX.concat(findX(px), ');\n');
}
TeX = TeX.concat('\n', '%%%Passes\n');
for (i = 0; i < passes.length; i++) {
TeX = TeX.concat('\\', 'draw[thick,dashed] [-latex] (');
TeX = TeX.concat(passes[i].x.nom, ') -- (');
TeX = TeX.concat(passes[i].x2.nom, ');');
TeX = TeX.concat('', '\n');
}
TeX = TeX.concat('\n', '%%%Déplacements/Écrans\n');
for (i = 0; i < deple.length/4; i++) {
let r = deple[3+i*4];
if (r.ec == true){
TeX = TeX.concat('\\', 'draw[thick] [-[] (' );
} else {
TeX = TeX.concat('\\', 'draw[thick] [-latex] (' );
}
TeX = TeX.concat(deple[0+i*4].jbase + 1, ') .. controls (');
TeX = TeX.concat(findY(deple[1+i*4].y),', ');
TeX = TeX.concat(findX(deple[1+i*4].x),') and ');
TeX = TeX.concat('(', '');
TeX = TeX.concat(findY(deple[2+i*4].y), ', ');
TeX = TeX.concat(findX(deple[2+i*4].x), ') .. (');
TeX = TeX.concat(findY(deple[3+i*4].y), ', ');
TeX = TeX.concat(findX(deple[3+i*4].x), ');\n');
}
TeX = TeX.concat('\n', '%%%Dribbles\n');
for (i = 0; i < dribblement.length/4; i++) {
TeX = TeX.concat('\\', '\draw[thick, decoration = {zigzag}, decorate] [-latex] (' );
TeX = TeX.concat(dribblement[0+i*4].dbase + 1, ') .. controls (');
TeX = TeX.concat(findY(dribblement[1+i*4].y),', ');
TeX = TeX.concat(findX(dribblement[1+i*4].x),') and ');
TeX = TeX.concat('(', '');
TeX = TeX.concat(findY(dribblement[2+i*4].y), ', ');
TeX = TeX.concat(findX(dribblement[2+i*4].x), ') .. (');
TeX = TeX.concat(findY(dribblement[3+i*4].y), ', ');
TeX = TeX.concat(findX(dribblement[3+i*4].x), ');\n');
}
TeX = TeX.concat('\n', '%%%Tir\n');
let t;
for (i = 0; i < joueurs.length; i++) {
let r = joueurs[i];
if (r.tiring == true) {
t = r;
TeX = TeX.concat('\\', '\draw[thick, dashed] [-latex] (' );
TeX = TeX.concat(findY(t.y),',');
TeX = TeX.concat(findX(t.x),') -- (');
TeX = TeX.concat(findY(ht/2),',');
TeX = TeX.concat(findX(lt-lt*0.072),');\n');
}
}
TeX = TeX.concat('\n', '%%%Dribbles\n');
TeX = TeX.concat('','\n');
TeX = TeX.concat('\\', 'end{tikzpicture}\n}\n');
TeX = TeX.concat('\\', 'end{center}\n');
TeX = TeX.concat('\\', 'caption{');
TeX = TeX.concat(nom, '}\n');
TeX = TeX.concat('\\', 'end{figure}');
nomFichier = nom + ".tex";
download(nomFichier, TeX);
}
//Permet de trouver la position en longueur du terrain (vertical) en LaTeX + questions décimales
function findX(dim) {
let longueur = 28;
return Math.round((dim*longueur/lt)*100)/100;
}
//Permet de trouver la position en largeur du terrain (vertical) en LaTeX
function findY(dim) {
let largeur = 15;
return Math.round((dim*largeur/ht)*100)/100;
}
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:application/x-tex;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save