-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
COLLISION_START_EVENT.js
32 lines (30 loc) · 1.39 KB
/
COLLISION_START_EVENT.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent
*
* @property {Phaser.Types.Physics.Matter.MatterCollisionData[]} pairs - A list of all affected pairs in the collision.
* @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.
* @property {any} source - The source object of the event.
* @property {string} name - The name of the event.
*/
/**
* The Matter Physics Collision Start Event.
*
* This event is dispatched by a Matter Physics World instance after the engine has updated.
* It provides a list of all pairs that have started to collide in the current tick (if any).
*
* Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`.
*
* @event Phaser.Physics.Matter.Events#COLLISION_START
* @type {string}
* @since 3.0.0
*
* @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object.
* @param {MatterJS.BodyType} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.
* @param {MatterJS.BodyType} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.
*/
module.exports = 'collisionstart';