From b444f5010c81da1e537b79df48e85037abc25b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Sat, 9 May 2020 14:33:48 +0200 Subject: [PATCH] Remove obstacles from constructor --- boids.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boids.mjs b/boids.mjs index e9a2ebc..41e0b41 100644 --- a/boids.mjs +++ b/boids.mjs @@ -46,7 +46,7 @@ class Boid class Boids { - constructor(canvas, obstacles, params = {}) + constructor(canvas, params = {}) { this.canvas = canvas; this.ctx = canvas.getContext('2d'); @@ -81,7 +81,7 @@ class Boids this.boids = []; // List of obstacles - this.obstacles = obstacles; + this.obstacles = []; // Vector registers used for holding temporary values this.registers = [