Commit c629277
committed
Fix a bug in QuadTree.clear()
- According to this comment, only the root bounds should be resized: https://github.com/melonjs/melonJS/blob/61ed171238cbe75c842963e1fed7b66e7ab7f862/src/physics/quadtree.js#L281
- QuadTree nodes have a fake me.Rect for their bounds: https://github.com/melonjs/melonJS/blob/61ed171238cbe75c842963e1fed7b66e7ab7f862/src/physics/quadtree.js#L83-L88
- Together, these cause an exception when `bounds` is passed to the clear() method: "this.bounds.setShape is not a function"1 parent 941fed4 commit c629277
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
0 commit comments