()
| 37 | } |
| 38 | |
| 39 | function draw() { |
| 40 | background('#faf8e2') |
| 41 | // translate(width/2, height/2) |
| 42 | |
| 43 | for (const blob of blobs) { |
| 44 | blob.update() |
| 45 | } |
| 46 | Matter.Engine.update(engine, 1000 / 60) |
| 47 | |
| 48 | for (const blob of blobs) { |
| 49 | blob.drawBlob() |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | const BLOB_NODE_SIZE = 20 |
| 54 | const BLOB_NODE_R = 15 |