Remove obstacles from constructor

This commit is contained in:
Mattéo Delabre 2020-05-09 14:33:48 +02:00
parent 9ef76536ca
commit b444f5010c
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class Boid
class Boids class Boids
{ {
constructor(canvas, obstacles, params = {}) constructor(canvas, params = {})
{ {
this.canvas = canvas; this.canvas = canvas;
this.ctx = canvas.getContext('2d'); this.ctx = canvas.getContext('2d');
@ -81,7 +81,7 @@ class Boids
this.boids = []; this.boids = [];
// List of obstacles // List of obstacles
this.obstacles = obstacles; this.obstacles = [];
// Vector registers used for holding temporary values // Vector registers used for holding temporary values
this.registers = [ this.registers = [