@@ -291,6 +291,16 @@ var InputManager = new Class({
291291 */
292292 this . _tempSkip = false ;
293293
294+ /**
295+ * An internal private array that avoids needing to create a new array on every DOM mouse event.
296+ *
297+ * @name Phaser.Input.InputManager#mousePointerContainer
298+ * @type {Phaser.Input.Pointer[] }
299+ * @private
300+ * @since 3.18.0
301+ */
302+ this . mousePointerContainer = [ this . mousePointer ] ;
303+
294304 game . events . once ( GameEvents . BOOT , this . boot , this ) ;
295305 } ,
296306
@@ -678,13 +688,12 @@ var InputManager = new Class({
678688 * @method Phaser.Input.InputManager#updateInputPlugins
679689 * @since 3.16.0
680690 *
681- * @param {number } time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now() .
682- * @param {number } delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class .
691+ * @param {integer } type - The type of event to process .
692+ * @param {Phaser.Input.Pointer[] } pointers - An array of Pointers on which the event occurred .
683693 */
684- updateInputPlugins : function ( type , time )
694+ updateInputPlugins : function ( type , pointers )
685695 {
686696 var scenes = this . game . scene . getScenes ( true , true ) ;
687- var delta = this . game . loop . delta ;
688697
689698 this . _tempSkip = false ;
690699
@@ -694,7 +703,7 @@ var InputManager = new Class({
694703
695704 if ( scene . sys . input )
696705 {
697- var capture = scene . sys . input . update ( type , time , delta ) ;
706+ var capture = scene . sys . input . update ( type , pointers ) ;
698707
699708 if ( ( capture && this . globalTopOnly ) || this . _tempSkip )
700709 {
@@ -723,7 +732,7 @@ var InputManager = new Class({
723732 pointer . updateMotion ( ) ;
724733 } ) ;
725734
726- this . updateInputPlugins ( CONST . TOUCH_START , event . timeStamp ) ;
735+ this . updateInputPlugins ( CONST . TOUCH_START , event . timeStamp , changed ) ;
727736 } ,
728737
729738 /**
@@ -744,7 +753,7 @@ var InputManager = new Class({
744753 pointer . updateMotion ( ) ;
745754 } ) ;
746755
747- this . updateInputPlugins ( CONST . TOUCH_MOVE , event . timeStamp ) ;
756+ this . updateInputPlugins ( CONST . TOUCH_MOVE , event . timeStamp , changed ) ;
748757 } ,
749758
750759 /**
@@ -765,7 +774,7 @@ var InputManager = new Class({
765774 pointer . updateMotion ( ) ;
766775 } ) ;
767776
768- this . updateInputPlugins ( CONST . TOUCH_END , event . timeStamp ) ;
777+ this . updateInputPlugins ( CONST . TOUCH_END , event . timeStamp , changed ) ;
769778 } ,
770779
771780 /**
@@ -786,7 +795,7 @@ var InputManager = new Class({
786795 pointer . updateMotion ( ) ;
787796 } ) ;
788797
789- this . updateInputPlugins ( CONST . TOUCH_CANCEL , event . timeStamp ) ;
798+ this . updateInputPlugins ( CONST . TOUCH_CANCEL , event . timeStamp , changed ) ;
790799 } ,
791800
792801 /**
@@ -804,7 +813,7 @@ var InputManager = new Class({
804813
805814 this . mousePointer . updateMotion ( ) ;
806815
807- this . updateInputPlugins ( CONST . MOUSE_DOWN , event . timeStamp ) ;
816+ this . updateInputPlugins ( CONST . MOUSE_DOWN , event . timeStamp , this . mousePointerContainer ) ;
808817 } ,
809818
810819 /**
@@ -822,7 +831,7 @@ var InputManager = new Class({
822831
823832 this . mousePointer . updateMotion ( ) ;
824833
825- this . updateInputPlugins ( CONST . MOUSE_MOVE , event . timeStamp ) ;
834+ this . updateInputPlugins ( CONST . MOUSE_MOVE , event . timeStamp , this . mousePointerContainer ) ;
826835 } ,
827836
828837 /**
@@ -840,7 +849,7 @@ var InputManager = new Class({
840849
841850 this . mousePointer . updateMotion ( ) ;
842851
843- this . updateInputPlugins ( CONST . MOUSE_UP , event . timeStamp ) ;
852+ this . updateInputPlugins ( CONST . MOUSE_UP , event . timeStamp , this . mousePointerContainer ) ;
844853 } ,
845854
846855 /**
0 commit comments