Skip to content

Commit 9cede9b

Browse files
committed
Hopefully centred?
1 parent 6688c00 commit 9cede9b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Boids.html

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ <h2> Contents </h2>
3030

3131
<h2> What you'll create </h2>
3232

33+
<div id="BoidContainer"></div>
3334
<script src="/SimulationLabs/Scripts/Boids/Boids.js"></script>
3435

3536
<h2> Prereqs </h2>

Scripts/Boids/Boids.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ function addRandomDirection(){
2020
}
2121

2222
function setup(){
23-
createCanvas(400, 400);
23+
let cnv = createCanvas(400, 400);
24+
cnv.parent('BoidContainer');
25+
2426
background(140, 205, 230);
2527
}
2628

0 commit comments

Comments
 (0)