QuadTree#insert()

insert(body)

Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.

Parameters
Name Type Description
body Phaser.Physics.Arcade.Body | object

The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties.

Source code: math/QuadTree.js (Line 151)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.