Automatic deploy 28996852

This commit is contained in:
Renan LE CARO 2025-02-17 17:52:20 +01:00
parent 7b1305b581
commit b458780558
5 changed files with 60 additions and 40 deletions

View file

@ -789,7 +789,7 @@ function shouldPierceByColor(ballOrCoin, vhit, hhit, chit) {
function brickHitCheck(ballOrCoin, radius, isBall) {
// Make ball/coin bonce, and return bricks that were hit
const {x, y, previousx, previousy, hitSinceBounce} = ballOrCoin;
const {x, y, previousx, previousy} = ballOrCoin;
const vhit = hitsSomething(previousx, y, radius);
const hhit = hitsSomething(x, previousy, radius);
@ -1348,8 +1348,10 @@ function explodeBrick(index, ball, isExplosion) {
color, ...coord,
previousx: coord.x,
previousy: coord.y,
vx: ball.vx * (0.5 + Math.random()),
vy: ball.vy * (0.5 + Math.random()),
// Use previous speed because the ball has already bounced
vx: ball.previousvx * (0.5 + Math.random()),
vy: ball.previousvy * (0.5 + Math.random()),
sx: 0,
sy: 0,
weight: 0.8 + Math.random() * 0.2