Set body margin: 0 so body fills the entire screen
This commit is contained in:
parent
04d15f2b1d
commit
a039dbbccd
|
@ -113,7 +113,7 @@ function collide(a, b, c, n) {
|
|||
|
||||
// Collision of object a with wall at position k and direction d
|
||||
function wallCollide(a, k, d) {
|
||||
if ((d == 0 && Math.abs(a.x - k) < a.r) || (d == 1 && Math.abs(a.y - k) < a.r)) {
|
||||
if ((d == 0 && Math.abs(a.x - k) < a.r + rad) || (d == 1 && Math.abs(a.y - k) < a.r + rad)) {
|
||||
let c = {x: 0, y: 0, cnt: 0}
|
||||
for (const p of a.p.map(x => rot(a, x))) {
|
||||
if ((d == 0 && Math.abs(p.x - k) < rad) || (d == 1 && Math.abs(p.y - k) < rad)) {
|
||||
|
|
Loading…
Reference in a new issue