Skip to content

Commit

Permalink
WebXRController: dispatch move event when moving
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Apr 22, 2021
1 parent 392fee6 commit a63ff05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderers/webxr/WebXRController.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ class WebXRController {
targetRay.matrix.fromArray( inputPose.transform.matrix );
targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );

this.dispatchEvent( { type: 'move' } );

This comment has been minimized.

Copy link
@Mugen87

Mugen87 Apr 22, 2021

Collaborator

How about defining the event object in module scope and then reuse it? Like in Object3D.

const _moveEvent = { type: 'move' };

This comment has been minimized.

Copy link
@mrdoob

mrdoob Apr 22, 2021

Author Owner

Yep! I'll change that πŸ‘

This comment has been minimized.

Copy link
@mrdoob

mrdoob Apr 22, 2021

Author Owner

This comment has been minimized.

Copy link
@arodic

arodic Apr 23, 2021

Contributor

Works!


}

}
Expand Down

0 comments on commit a63ff05

Please sign in to comment.