Commit d089e16
jdotrjs
[fixes phaserjs#3535] Fix constructed bounding box functions for RTree
The previous patch didn't take into account that the accessors passed
in as the format array were dot-prefixed due to the previous eval-based
construction.
The only two uses of RTree that I found were in World.js:
```javascript
this.tree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]);
this.staticTree = new RTree(this.maxEntries, [ '.left', '.top', '.right', '.bottom' ]);
```
It's likely that this could be updated to just not pass dotted attribute
names but I wasn't super comfortable that they weren't needed in this form
elsewhere despite a quick search. I'd honestly say that it might be a better
change if we remove the dots before merge but I'll leave that up to the
discretion of the reviewers/merger.
I'm not super familiar with Phaser's style but I passed lint sooo :D
Buyer beware: the only testing I did was on the repo case I left in the
bug and I did not verify that this is still within the twitch CSP (though
it should be).1 parent 97cd94b commit d089e16
1 file changed
Lines changed: 31 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
469 | 480 | | |
470 | 481 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
480 | 492 | | |
481 | | - | |
482 | | - | |
| 493 | + | |
| 494 | + | |
483 | 495 | | |
484 | | - | |
| 496 | + | |
485 | 497 | | |
486 | 498 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
493 | 505 | | |
494 | 506 | | |
495 | 507 | | |
| |||
0 commit comments