Graphe 2e version

This commit is contained in:
2025-10-19 09:08:49 +02:00
parent 27a2e99706
commit d3b100192c
6 changed files with 352 additions and 148 deletions

View File

@@ -1,13 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Graphe Mes Amis</title>
</head>
<body>
<div id="app" style="width: 100vw; height: 100vh; background: white"></div>
<script type="module" src="/src/main.ts"></script>
</body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>Simulation de graphe d'amis</title>
<script type="module" src="src/network.ts"></script>
<style>
body { font-family: sans-serif; }
#sigma-container { width: 100%; height: 400px; border: 1px solid #ccc; margin-top: 1rem; }
#graph-container canvas {
display: block;
margin: 0 auto; /* si vous voulez le centrer sans perturber Sigma */
}
</style>
</head>
<body>
<h1>Simulation de réseau damitiés</h1>
<input type="file" id="fileInput" accept="application/json" />
<button id="generateGraph">Générer le graphe</button>
<button id="stopSim" disabled>⏸️ Stop</button>
<div id="sigma-container"></div>
</body>
</html>