Skip to content

Commit

Permalink
Fix docs for collisionend event (#7112)
Browse files Browse the repository at this point in the history
* Fix docs for collisionend event

* Remove hyphen
  • Loading branch information
willeastcott authored Nov 14, 2024
1 parent 5574db2 commit 3b54515
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/framework/components/collision/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CollisionComponent extends Component {
static EVENT_COLLISIONSTART = 'collisionstart';

/**
* Fired two rigid-bodies stop touching. The handler is passed an {@link Entity} that
* Fired when two rigid bodies stop touching. The handler is passed an {@link Entity} that
* represents the other rigid body involved in the collision.
*
* @event
Expand Down
8 changes: 4 additions & 4 deletions src/framework/components/rigid-body/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ class RigidBodyComponent extends Component {
static EVENT_COLLISIONSTART = 'collisionstart';

/**
* Fired when two rigid bodies stop touching. The handler is passed a {@link ContactResult}
* object containing details of the contact between the two rigid bodies.
* Fired when two rigid bodies stop touching. The handler is passed an {@link Entity} that
* represents the other rigid body involved in the collision.
*
* @event
* @example
* entity.rigidbody.on('collisionend', (result) => {
* console.log(`Collision ended between ${entity.name} and ${result.other.name}`);
* entity.rigidbody.on('collisionend', (other) => {
* console.log(`${entity.name} stopped touching ${other.name}`);
* });
*/
static EVENT_COLLISIONEND = 'collisionend';
Expand Down

0 comments on commit 3b54515

Please sign in to comment.