Spaces:
Running
Running
Add 2 files
Browse files- index.html +10 -9
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -214,14 +214,15 @@
|
|
| 214 |
tableHeight: 400,
|
| 215 |
cushionWidth: 20,
|
| 216 |
ballRadius: 15,
|
| 217 |
-
friction: 0.
|
| 218 |
-
cushionRestitution: 0.
|
| 219 |
-
ballRestitution: 0.
|
| 220 |
basePower: 15, // Potencia base (100%)
|
| 221 |
maxPower: 30, // Potencia m谩xima (200%)
|
| 222 |
powerIncrementBase: 0.5, // Incremento base
|
| 223 |
powerIncrementDecay: 0.02, // Reducci贸n gradual del incremento
|
| 224 |
-
maxPowerPercentage: 200 // Permite cargar hasta 200%
|
|
|
|
| 225 |
};
|
| 226 |
|
| 227 |
// Estado del juego
|
|
@@ -479,7 +480,7 @@
|
|
| 479 |
|
| 480 |
// Verificar si las bolas est谩n en movimiento
|
| 481 |
function ballsMoving() {
|
| 482 |
-
return state.balls.some(ball => Math.abs(ball.vx) >
|
| 483 |
}
|
| 484 |
|
| 485 |
// Actualizar f铆sica del juego con efectos mejorados
|
|
@@ -487,14 +488,14 @@
|
|
| 487 |
state.balls.forEach(ball => {
|
| 488 |
// Aplicar fricci贸n (dependiendo de la velocidad)
|
| 489 |
const speed = Math.sqrt(ball.vx * ball.vx + ball.vy * ball.vy);
|
| 490 |
-
const friction = speed > 5 ? config.friction * 0.
|
| 491 |
|
| 492 |
ball.vx *= friction;
|
| 493 |
ball.vy *= friction;
|
| 494 |
|
| 495 |
// Detener bolas cuando sean muy lentas
|
| 496 |
-
if (Math.abs(ball.vx) <
|
| 497 |
-
if (Math.abs(ball.vy) <
|
| 498 |
|
| 499 |
// Actualizar posici贸n
|
| 500 |
ball.x += ball.vx;
|
|
@@ -839,7 +840,7 @@
|
|
| 839 |
const rect = canvas.getBoundingClientRect();
|
| 840 |
powerIndicator.style.position = 'absolute';
|
| 841 |
powerIndicator.style.left = `${rect.left}px`;
|
| 842 |
-
powerIndicator.style.top = `${rect.top}px
|
| 843 |
}
|
| 844 |
|
| 845 |
// Bucle principal del juego
|
|
|
|
| 214 |
tableHeight: 400,
|
| 215 |
cushionWidth: 20,
|
| 216 |
ballRadius: 15,
|
| 217 |
+
friction: 0.992, // Reducida la fricci贸n para que rueden m谩s
|
| 218 |
+
cushionRestitution: 0.75, // Aumentado el rebote en bandas
|
| 219 |
+
ballRestitution: 0.95, // Aumentado el rebote entre bolas
|
| 220 |
basePower: 15, // Potencia base (100%)
|
| 221 |
maxPower: 30, // Potencia m谩xima (200%)
|
| 222 |
powerIncrementBase: 0.5, // Incremento base
|
| 223 |
powerIncrementDecay: 0.02, // Reducci贸n gradual del incremento
|
| 224 |
+
maxPowerPercentage: 200, // Permite cargar hasta 200%
|
| 225 |
+
minSpeed: 0.05 // Velocidad m铆nima para detener las bolas (reducida)
|
| 226 |
};
|
| 227 |
|
| 228 |
// Estado del juego
|
|
|
|
| 480 |
|
| 481 |
// Verificar si las bolas est谩n en movimiento
|
| 482 |
function ballsMoving() {
|
| 483 |
+
return state.balls.some(ball => Math.abs(ball.vx) > config.minSpeed || Math.abs(ball.vy) > config.minSpeed);
|
| 484 |
}
|
| 485 |
|
| 486 |
// Actualizar f铆sica del juego con efectos mejorados
|
|
|
|
| 488 |
state.balls.forEach(ball => {
|
| 489 |
// Aplicar fricci贸n (dependiendo de la velocidad)
|
| 490 |
const speed = Math.sqrt(ball.vx * ball.vx + ball.vy * ball.vy);
|
| 491 |
+
const friction = speed > 5 ? config.friction * 0.995 : config.friction;
|
| 492 |
|
| 493 |
ball.vx *= friction;
|
| 494 |
ball.vy *= friction;
|
| 495 |
|
| 496 |
// Detener bolas cuando sean muy lentas
|
| 497 |
+
if (Math.abs(ball.vx) < config.minSpeed) ball.vx = 0;
|
| 498 |
+
if (Math.abs(ball.vy) < config.minSpeed) ball.vy = 0;
|
| 499 |
|
| 500 |
// Actualizar posici贸n
|
| 501 |
ball.x += ball.vx;
|
|
|
|
| 840 |
const rect = canvas.getBoundingClientRect();
|
| 841 |
powerIndicator.style.position = 'absolute';
|
| 842 |
powerIndicator.style.left = `${rect.left}px`;
|
| 843 |
+
powerIndicator.style.top = `${rect.top}px';
|
| 844 |
}
|
| 845 |
|
| 846 |
// Bucle principal del juego
|
prompts.txt
CHANGED
|
@@ -2,4 +2,5 @@
|
|
| 2 |
Con la anterior informacion dise帽a el juego del billar tres bandas donde la barra espaciadora sea la fuerza del taco, que esten las tres bolas y los diamantes
|
| 3 |
Dale mas fuerza al taco por medio de la barra espaciadora
|
| 4 |
Revisa la fuerza y los efectos
|
| 5 |
-
No se muestras las bolas ni el taco
|
|
|
|
|
|
| 2 |
Con la anterior informacion dise帽a el juego del billar tres bandas donde la barra espaciadora sea la fuerza del taco, que esten las tres bolas y los diamantes
|
| 3 |
Dale mas fuerza al taco por medio de la barra espaciadora
|
| 4 |
Revisa la fuerza y los efectos
|
| 5 |
+
No se muestras las bolas ni el taco
|
| 6 |
+
haz que la bola ruede mas
|