File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export class GridBroadphase extends Broadphase {
7777 * Get all the collision pairs in the physics world
7878 */
7979 collisionPairs ( world : World , pairs1 : Body [ ] , pairs2 : Body [ ] ) : void {
80- const N = world . numObjects ( )
80+ const N = world . bodies . length
8181 const bodies = world . bodies
8282 const max = this . aabbMax
8383 const min = this . aabbMin
Original file line number Diff line number Diff line change @@ -265,14 +265,6 @@ export class World extends EventTarget {
265265 return this . contactMaterialTable . get ( m1 . id , m2 . id )
266266 }
267267
268- /**
269- * Get number of objects in the world.
270- * @deprecated
271- */
272- numObjects ( ) : number {
273- return this . bodies . length
274- }
275-
276268 /**
277269 * Store old collision state info
278270 */
@@ -527,7 +519,7 @@ export class World extends EventTarget {
527519 const contacts = this . contacts
528520 const p1 = World_step_p1
529521 const p2 = World_step_p2
530- const N = this . numObjects ( )
522+ const N = this . bodies . length
531523 const bodies = this . bodies
532524 const solver = this . solver
533525 const gravity = this . gravity
You can’t perform that action at this time.
0 commit comments